Subject: bug#64433: closed (Re: bug#64433: 30.0.50; Fix and improve setting priority of todo-mode items)

From: [email-masked] (GNU bug Tracking System)
Date: Mon, 03 Jul 2023 12:24:01 +0000

Your bug report

#64433: 30.0.50; Fix and improve setting priority of todo-mode items

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
64433: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=64433
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#64433: 30.0.50; Fix and improve setting priority of todo-mode items
From: Stephen Berman <[email-masked]>
To: [email-masked]
Date: Mon, 03 Jul 2023 14:23:08 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

On Mon, 03 Jul 2023 11:52:36 +0200 Stephen Berman <[email-masked]> wrote:

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

Pushed to master as 14ae2101412, closing bug.

Steve Berman

Subject: 30.0.50; Fix and improve setting priority of todo-mode items
From: Stephen Berman <[email-masked]>
To: [email-masked]
Date: Mon, 03 Jul 2023 11:52:36 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

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