emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: No Wayman <iarchivedmywholelife@gmail.com>
To: emacs-orgmode@gnu.org, No Wayman <iarchivedmywholelife@gmail.com>
Subject: [PATCH] capture: respect KEYS with GOTO arg [9.3.7 (release_9.3.7-661-g4aa4dd @ /home/n/.emacs.d/straight/build/org/)]
Date: Wed, 01 Jul 2020 14:00:52 -0400	[thread overview]
Message-ID: <87mu4j8697.fsf@gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 308 bytes --]

`org-capture' does not pass its KEYS argument to 
(Must not be a common use-case, as git blame points to 
org-capture's introduction 10 years ago!)

The attached patch does just that.
Wasn't sure if this was worthy of a NEWS entry. Will add if 

Nicholas Vollmer

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: org-capture-pass-keys-to-org-capture-goto-target --]
[-- Type: text/x-patch, Size: 970 bytes --]

From 4aa4dd120a74679afe33b7fe603035dd0379441a Mon Sep 17 00:00:00 2001
From: Nicholas Vollmer <iarchivedmywholelife@gmail.com>
Date: Wed, 1 Jul 2020 13:43:29 -0400
Subject: [PATCH] capture: org-capture pass KEYS with GOTO arg

* org-capture.el (org-capture): pass `keys' arg to `org-capture-goto-target'.

Allows programmatically visiting a specific template.
 lisp/org-capture.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/org-capture.el b/lisp/org-capture.el
index cc91251e0..2cc1ce394 100644
--- a/lisp/org-capture.el
+++ b/lisp/org-capture.el
@@ -628,7 +628,7 @@ of the day at point (if any) or the current HH:MM time."
     (setq org-overriding-default-time
 	  (org-get-cursor-date (equal goto 1))))
-   ((equal goto '(4)) (org-capture-goto-target))
+   ((equal goto '(4))  (org-capture-goto-target keys))
    ((equal goto '(16)) (org-capture-goto-last-stored))
     (let* ((orig-buf (current-buffer))

             reply	other threads:[~2020-07-01 18:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-01 18:00 No Wayman [this message]
2020-07-03  6:34 ` [PATCH] capture: respect KEYS with GOTO arg [9.3.7 (release_9.3.7-661-g4aa4dd @ /home/n/.emacs.d/straight/build/org/)] Kyle Meyer
2020-07-05  6:14   ` No Wayman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mu4j8697.fsf@gmail.com \
    --to=iarchivedmywholelife@gmail.com \
    --cc=emacs-orgmode@gnu.org \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).