all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Heerdegen via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Viewing the default capture template
Date: Thu, 26 Dec 2024 23:45:25 +0100	[thread overview]
Message-ID: <871pxu2hdm.fsf@web.de> (raw)
In-Reply-To: 87o70ydr40.fsf@librehacker.com

Christopher Howard <christopher@librehacker.com> writes:

> For posterity: the same default template string is used for all
> captures, if you don't specify one. The docstring for
> org-capture-templates indicates it is...
>
> ```
> \"* %?\n %a\"
> ```
>
> The %a refers to the annotation:
>
> ```
>   %a          Annotation, normally the link created with `org-store-link'.
> ```

Oh - you already had found that, good.

If you are even more curious: the code that fills the template is in -
surprise! - `org-capture-fill-template'.  "%a" gets expanded to the
value of this expression:

#+begin_src emacs-lisp
(let ((a (or (plist-get org-store-link-plist :annotation)
		       annotation
		       (org-capture-get :annotation)
		       "")))
	    ;; Is the link empty?  Then we do not want it...
	    (if (equal a "[[]]") "" a))
#+end_src

look for a helper var named `v-a' in that defun.


Michael.




  reply	other threads:[~2024-12-26 22:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-26 22:19 Viewing the default capture template Christopher Howard
2024-12-26 22:45 ` Michael Heerdegen via Users list for the GNU Emacs text editor [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-12-24 23:47 Christopher Howard
2024-12-25 19:49 ` Michael Heerdegen via Users list for the GNU Emacs text editor
2024-12-26 16:14   ` Christopher Howard
2024-12-26 22:35     ` Michael Heerdegen via Users list for the GNU Emacs text editor

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=871pxu2hdm.fsf@web.de \
    --to=help-gnu-emacs@gnu.org \
    --cc=michael_heerdegen@web.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.