emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Allen Li <darkfeline@felesatra.moe>
To: emacs-orgmode@gnu.org
Subject: [BUG] org-todo (C-c C-t) bad negative prefix behavior [9.5.2 (9.5.2-gfbff08 @ /home/ionasal/.emacs.d/elpa/org-9.5.2/)]
Date: Sat, 01 Jan 2022 01:31:31 -0800	[thread overview]
Message-ID: <80o84vol8s.fsf@felesatra.moe> (raw)

The docstring for org-todo (C-c C-t) is unclear about the handling of -
prefix compared to -1 prefix.

Here is the relevant part of the docstring:

    With ‘C-u’ prefix ARG, force logging the state change and take a
    logging note.
    With a ‘C-u C-u’ prefix, switch to the next set of TODO keywords (nextset).
    Another way to achieve this is ‘S-C-<right>’.
    With a ‘C-u C-u C-u’ prefix, circumvent any state blocking.
    With numeric prefix arg, switch to the Nth state.

    With a numeric prefix arg of 0, inhibit note taking for the change.
    With a numeric prefix arg of -1, cancel repeater to allow marking as DONE.

The actual behavior is that - (along with any other negative numeric
prefix excluding -1) switches to the first state and -1 cancels
the repeater.

It seems like the right fix here is to make - behave the same as -1, and
raise a user error for any other negative numeric prefix, since it is
likely not doing whatever the user wanted.

Emacs  : GNU Emacs 27.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.27, cairo version 1.17.4)
 of 2021-03-26
Package: Org mode version 9.5.2 (9.5.2-gfbff08 @ /home/ionasal/.emacs.d/elpa/org-9.5.2/)


             reply	other threads:[~2022-01-01  9:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-01  9:31 Allen Li [this message]
2022-01-01  9:44 ` Allen Li
2022-02-07 14:11   ` Ihor Radchenko
2022-06-18  6:10     ` Ihor Radchenko
2022-06-26  4:30       ` Allen Li
2022-06-26  4:49         ` Ihor Radchenko
2022-06-26  5:41           ` Allen Li
2022-06-26  6:31             ` Ihor Radchenko

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

  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=80o84vol8s.fsf@felesatra.moe \
    --to=darkfeline@felesatra.moe \
    --cc=emacs-orgmode@gnu.org \
    --subject='Re: [BUG] org-todo (C-c C-t) bad negative prefix behavior [9.5.2 (9.5.2-gfbff08 @ /home/ionasal/.emacs.d/elpa/org-9.5.2/)]' \
    /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

Code repositories for project(s) associated with this inbox:

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

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