all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@gmail.com>
To: stasvlasov@disroot.org
Cc: emacs-orgmode@gnu.org
Subject: Re: [BUG] org-agenda passes current-prefix-arg to commands instead of arg [9.5.3 (9.5.3-g69c588 @ /Users/stas/.emacs.d/straight/build/org/)]
Date: Thu, 07 Jul 2022 18:05:31 +0800	[thread overview]
Message-ID: <874jztw844.fsf@localhost> (raw)
In-Reply-To: <m2pmimnymk.fsf@air.local.mail-host-address-is-not-set>

stasvlasov@disroot.org writes:

> `org-agenda' function passes `current-prefix-arg' to its commands (e.g., `org-agenda-tags') instead of `arg'
>
> This might create unexpected behaviour if one uses `org-agenda' function inside another interactive function that accepts on universal prefix. For example if I define `my/agenda-done-todos' it wont show any DONE todos if I call it with prefix to restrict it to current buffer because `org-agenda-tags' will be limited only to active todos by `current-prefix-arg' and this will always produce empty set:

Thanks for reporting!
Your examples makes sense and I do not see any reason why
`current-prefix-arg' should be used instead of ARG. The present usage
appears to be introduced in the initial agenda implementation back 14
years ago.

Fixed on main via db12a497d.

Best,
Ihor



      reply	other threads:[~2022-07-07 10:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-03 12:56 [BUG] org-agenda passes current-prefix-arg to commands instead of arg [9.5.3 (9.5.3-g69c588 @ /Users/stas/.emacs.d/straight/build/org/)] stasvlasov
2022-07-07 10:05 ` 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:
  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=874jztw844.fsf@localhost \
    --to=yantar92@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=stasvlasov@disroot.org \
    /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.