unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stephen Berman <stephen.berman@gmx.net>
To: 64433@debbugs.gnu.org
Subject: bug#64433: 30.0.50; Fix and improve setting priority of todo-mode items
Date: Mon, 03 Jul 2023 11:52:36 +0200	[thread overview]
Message-ID: <87h6ql5nkr.fsf@gmx.net> (raw)

There are several bugs in setting the priority of todo items in
todo-mode:

- On typing `#' you are prompted to enter a priority; for example, in a
  category with 7 items the prompt is this:
    Set item priority (1-7) (default 1):
  If you enter a number outside of this range, there is another prompt:
    Priority must be an integer between 1 and 7.
     (default 1)
  This prompt is infelicitous, occupying two lines and lacking a colon
  to indicate an expected input.

- You can also set the priority by passing a numerical prefix argument,
  e.g. `C-u 7 #' or simply `7 #' sets the priority to 7 directly without
  prompting.  However, here out-of-range prefix arguments are accepted
  and the result is at least in two cases odd: typing `0 #' sets the
  priority in a category with 7 items 1 by default (1 is always the
  highest priority).  And typing `8 #' or e.g. `8761 #' sets the
  priority to 7, which may seem reasonable; however, with a negative
  prefix, e.g. `-3 #', the priority is also set to 7.

- If, in a category with, say, 7 items, with point on the item with
  priority 4, you type `#' and at the prompt enter 4, or if you invoke
  `4 #', then the priority of the item is correctly unchanged, however,
  the buffer is marked as modified.  Since setting the priority to the
  item's current priority is useless, doing so is probably
  unintentional, so it would be better for todo-mode to respond with a
  prompt for a different priority.  (An exception is moving an item to
  another category: it is and should remain possibly to move an item
  from a category in which it has priority 4 to another category and
  there give it priority 4.)

I have a fix for these bugs and will install it on master when I get a
bug number.

In addition, I will install a minor improvement in the usability of
priority setting: making the minibuffer history for priority setting
consist of the range of item numbers (or in the case of adding a new
item, the maximum priority number is one more then the last item
number).  This is useful to quickly invert the default (set by a user
option); e.g., with the default priority 1, in a category with 37 items,
typing `M-p' at the prompt to enter the priority will insert 37 in the
minibuffer (or 38 if a new item is being inserted in the category).


In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
 3.24.38, cairo version 1.17.6) of 2023-07-02 built on strobelfssd
Repository revision: f893ace8352d39c95048b143bf01d35973343ea0
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101008
System Description: Linux From Scratch r11.3-100-systemd

Configured using:
 'configure -C --with-xwidgets 'CFLAGS=-Og -g3'
 PKG_CONFIG_PATH=/opt/qt5/lib/pkgconfig'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LCMS2 LIBSYSTEMD LIBXML2 MODULES NOTIFY INOTIFY PDUMPER PNG RSVG
SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS WEBP X11 XDBE XIM
XINPUT2 XPM XWIDGETS GTK3 ZLIB





             reply	other threads:[~2023-07-03  9:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-03  9:52 Stephen Berman [this message]
2023-07-03 12:23 ` bug#64433: 30.0.50; Fix and improve setting priority of todo-mode items Stephen Berman

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.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=87h6ql5nkr.fsf@gmx.net \
    --to=stephen.berman@gmx.net \
    --cc=64433@debbugs.gnu.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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.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).