GNU bug report logs -
#64433
30.0.50; Fix and improve setting priority of todo-mode items
Previous Next
Reported by: Stephen Berman <stephen.berman <at> gmx.net>
Date: Mon, 3 Jul 2023 09:53:02 UTC
Severity: normal
Found in version 30.0.50
Done: Stephen Berman <stephen.berman <at> gmx.net>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Mon, 03 Jul 2023 14:23:08 +0200
with message-id <87cz195glv.fsf <at> gmx.net>
and subject line Re: bug#64433: 30.0.50; Fix and improve setting priority of todo-mode items
has caused the debbugs.gnu.org bug report #64433,
regarding 30.0.50; Fix and improve setting priority of todo-mode items
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
64433: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=64433
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
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
[Message part 3 (message/rfc822, inline)]
On Mon, 03 Jul 2023 11:52:36 +0200 Stephen Berman <stephen.berman <at> gmx.net> 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
This bug report was last modified 2 years and 36 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.