From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id Wx64IEJaKWDaawAA0tVLHw (envelope-from ) for ; Sun, 14 Feb 2021 17:13:38 +0000 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id AZTTG0JaKWC7JQAAbx9fmQ (envelope-from ) for ; Sun, 14 Feb 2021 17:13:38 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 6C9982F1C4 for ; Sun, 14 Feb 2021 18:13:37 +0100 (CET) Received: from localhost ([::1]:41476 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lBKxk-0006DE-4g for larch@yhetil.org; Sun, 14 Feb 2021 12:13:36 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:53538) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lBKwb-0006AH-Uv for emacs-orgmode@gnu.org; Sun, 14 Feb 2021 12:12:25 -0500 Received: from mail-qk1-x730.google.com ([2607:f8b0:4864:20::730]:44235) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lBKwZ-0006MQ-Vo for emacs-orgmode@gnu.org; Sun, 14 Feb 2021 12:12:25 -0500 Received: by mail-qk1-x730.google.com with SMTP id c3so3885724qkj.11 for ; Sun, 14 Feb 2021 09:12:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:references:user-agent:from:to:cc:subject:in-reply-to :message-id:date:mime-version:content-transfer-encoding; bh=ESecNU+5n6rTbeBD5/wYBq6DwQ6IaV2NBG9TUTXYs5w=; b=RoiZ2CEzHy+uP+nWo/5TzRQuU7IuR4smKAW4/3cj7Etp4+3zQFSBZmQuACx0YYrBWh hm8yMoY1R8VZREoRslYByf5WSit1n13I2xrqyaPchV7uii+7lEhgBfvupQk3jdaWQrKS WpTS8q9QLmi/R4+peD8c9NS2TTSzkBiYaHF7v4077Bpcg87BBV6MubIOkdDgNTO+wPa3 XIrIh0iyRmuUVtEV30rMohMM5zrN/gBoZAMgHxN6zF7oC9TWZVB81g8jwDtH2HEqfFHQ aIjYk9+4TXRc1WtdUd48LlQv67RaWQChLzWF8S6g7lyztnqdGViTFoJsYBwfYOgbGb3v ff0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:references:user-agent:from:to:cc:subject :in-reply-to:message-id:date:mime-version:content-transfer-encoding; bh=ESecNU+5n6rTbeBD5/wYBq6DwQ6IaV2NBG9TUTXYs5w=; b=lvk6LDADnVEjodFOwi39OFlTGXJkiJvrL//OB2Bv74MCZdQOp0jJ+GmpH+mVJeNix9 m02axIIF0AdOI9IARZc2UvzDWdesrgWBkrBMH7ePsBou21bYtmpaMN+gG6Hgzz9PO9RR c46lx4/41KP5PxEdiYeuyrUExCpsJ4SqdbePkENbHKtcVQNyThyhYKV5As9QWYW9Vp67 eNyAIRBX7hTg+dnCtIKDi2RPMA7pL0w2iT2SK6GSah/sH9mrNJHOr1HlT0fb2SUWVejv R+oBKheQHgNEhr6moYAj3OEcA8riQy+z6pwziyklGMXGAQnyDraUPXvH4eqROKXYR9eF 4k3A== X-Gm-Message-State: AOAM530TNv3zSCyXzWm5JLQkOgByrgzO9weQB5pwN8UJFeYmKE93PBOX RKa7A7SLDSwwLvj8x3ugWFt0JoseMLfQ2Q== X-Google-Smtp-Source: ABdhPJxXWFf9JYmbxNCRKc7yudUQey9QR7lCmxx5gxlkdys/pO6L/OKnvbE6ACDxjlp99x7Xz7P0Qg== X-Received: by 2002:a37:470a:: with SMTP id u10mr12292241qka.304.1613322742030; Sun, 14 Feb 2021 09:12:22 -0800 (PST) Received: from Johns-iMac.local ([2601:547:901:1830:6dc2:851b:a5eb:6750]) by smtp.gmail.com with ESMTPSA id x9sm9318089qtr.74.2021.02.14.09.12.20 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 14 Feb 2021 09:12:21 -0800 (PST) References: <878s7rq1wf.fsf@m4x.org> User-agent: mu4e 1.4.13; emacs 27.1.90 From: John Kitchin To: Alan Schmitt Subject: Re: programatically generate an agenda In-reply-to: <878s7rq1wf.fsf@m4x.org> Message-ID: Date: Sun, 14 Feb 2021 12:12:18 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::730; envelope-from=johnrkitchin@gmail.com; helo=mail-qk1-x730.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -1.26 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b=RoiZ2CEz; dmarc=fail reason="SPF not aligned (relaxed)" header.from=andrew.cmu.edu (policy=none); spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 6C9982F1C4 X-Spam-Score: -1.26 X-Migadu-Scanner: scn0.migadu.com X-TUID: IjujniGnLR/Y If it is possible to set up what you want in an entry in org-agenda-custom-commands, then you can call it in a program like #+BEGIN_SRC emacs-lisp (org-agenda nil "w" nil) #+END_SRC In that snippet, I have the key in an org-agenda-custom-commands set to "w". that generates an agenda buffer for me, which I assume you can then use the org-agenda-write command on. Alan Schmitt writes: > Hello, > > In my quest/endeavor/struggle to generate an org file for what I want to > do during the day, I=E2=80=99m trying to leverage the power of org-agenda= (that > does a lot of what I want to do) to create an org file. I learned of > org-agenda-write, which I could use to write to file what I want then > include it in my org file, but for that I need to create the correct > org-agenda buffer. What is the elisp way of doing it? > > I tried using org-agenda-list, but it only seems to restore the current > agenda view. For instance, (org-agenda-list nil nil 1) generates an > agenda for the week (which is my default), even though I pass a SPAN > argument of 1. I also don=E2=80=99t know how to set the org-agenda-skip s= teps > before calling that function=E2=80=A6 > > Thanks a lot for any suggestion on how to do this. > > Best, > > Alan -- Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu