emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: Kevin Foley <kevin@kevinjfoley.me>
Cc: Org Mode List <emacs-orgmode@gnu.org>
Subject: Re: [PATCH] Org Capture Add Tags with org-toggle-tag
Date: Wed, 19 Oct 2022 08:29:50 +0000	[thread overview]
Message-ID: <87v8ogb4ht.fsf@localhost> (raw)
In-Reply-To: <87h79gydfh.fsf@kevinjfoley.me>

Kevin Foley <kevin@kevinjfoley.me> writes:

> I have a capture template which utilizes %^g to prompt me for a tag to
> add to a headline which already has a tag.  An example to demonstrate
> is:
> * TODO %? %^g                                             :foo:
> If I call this template and give it "bar" when prompted for a tag, it
> results in (where | is the cursor position):
> * TODO | :bar:                                            :foo:
> And bar is recognized as a tag.
> I've been able to resolve this with the attached patch.  However,
> looking at the git history of that code it seems the intent might have
> been to prevent some recursive resolution so I'm not sure if this breaks
> that.
> I've realized I could also attach the %^g to :foo: tag in the template
> and things work as expected but if that's the expectation then I think
> it's worth mentioning in the docstring for org-capture-templates.

It sounds logical to me that every %-escape will be replaced with
corresponding text. So, your toggle behaviour would actually be
surprising for me.

If you think that the existing docstring is confusing, could you provide
a patch explaining what is not clear?

Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>

      reply	other threads:[~2022-10-19  8:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-03  0:57 [PATCH] Org Capture Add Tags with org-toggle-tag Kevin Foley
2022-10-19  8:29 ` Ihor Radchenko [this message]

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=87v8ogb4ht.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=emacs-orgmode@gnu.org \
    --cc=kevin@kevinjfoley.me \


* 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).