GNU bug report logs - #64433
30.0.50; Fix and improve setting priority of todo-mode items

Previous Next

Package: emacs;

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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 64433 in the body.
You can then email your comments to 64433 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#64433; Package emacs. (Mon, 03 Jul 2023 09:53:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stephen Berman <stephen.berman <at> gmx.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 03 Jul 2023 09:53:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Stephen Berman <stephen.berman <at> gmx.net>
To: bug-gnu-emacs <at> gnu.org
Subject: 30.0.50; Fix and improve setting priority of todo-mode items
Date: Mon, 03 Jul 2023 11:52:36 +0200
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 sent to Stephen Berman <stephen.berman <at> gmx.net>:
You have taken responsibility. (Mon, 03 Jul 2023 12:24:01 GMT) Full text and rfc822 format available.

Notification sent to Stephen Berman <stephen.berman <at> gmx.net>:
bug acknowledged by developer. (Mon, 03 Jul 2023 12:24:01 GMT) Full text and rfc822 format available.

Message #10 received at 64433-done <at> debbugs.gnu.org (full text, mbox):

From: Stephen Berman <stephen.berman <at> gmx.net>
To: 64433-done <at> debbugs.gnu.org
Subject: Re: bug#64433: 30.0.50; Fix and improve setting priority of
 todo-mode items
Date: Mon, 03 Jul 2023 14:23:08 +0200
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




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 01 Aug 2023 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 17 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.