GNU bug report logs - #70594
30.0.50; Error when tabbing with only one active widget

Previous Next

Package: emacs;

Reported by: Stephen Berman <stephen.berman <at> gmx.net>

Date: Fri, 26 Apr 2024 12:45:09 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

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Stephen Berman <stephen.berman <at> gmx.net>
Subject: bug#70594: closed (Re: bug#70594: 30.0.50; Error when tabbing
 with only one active widget)
Date: Tue, 25 Jun 2024 10:44:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#70594: 30.0.50; Error when tabbing with only one active widget

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 70594 <at> debbugs.gnu.org.

-- 
70594: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=70594
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Stephen Berman <stephen.berman <at> gmx.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: maurooaranda <at> gmail.com, 70594-done <at> debbugs.gnu.org
Subject: Re: bug#70594: 30.0.50; Error when tabbing with only one active widget
Date: Tue, 25 Jun 2024 12:43:04 +0200
Fixed in commit 2f18929319a to emacs-30 and closing.

Steve Berman

On Sat, 08 Jun 2024 14:49:20 +0300 Eli Zaretskii <eliz <at> gnu.org> wrote:

>> From: Stephen Berman <stephen.berman <at> gmx.net>
>> Cc: maurooaranda <at> gmail.com,  70594 <at> debbugs.gnu.org
>> Date: Sat, 25 May 2024 11:30:01 +0200
>>
>> On Sat, 25 May 2024 10:42:33 +0300 Eli Zaretskii <eliz <at> gnu.org> wrote:
>>
>> > Ping! Ping!  Can we please make some progress here?
>>
>> Since the patch fixes (according to me testing) a clear bug, either the
>> patch should be installed (or a better one, if someone comes up with
>> one) or commit 91333dacfa1, which introduced the bug, should be
>> reverted; my preference is to install the patch.
>
> Mauro, what do you prefer?
>
>> >> Cc: 70594 <at> debbugs.gnu.org
>> >> Date: Thu, 09 May 2024 10:23:13 +0300
>> >> From: Eli Zaretskii <eliz <at> gnu.org>
>> >>
>> >> Ping!
>> >>
>> >> > Cc: 70594 <at> debbugs.gnu.org
>> >> > Date: Fri, 26 Apr 2024 18:02:13 +0300
>> >> > From: Eli Zaretskii <eliz <at> gnu.org>
>> >> >
>> >> > > Date: Fri, 26 Apr 2024 14:43:42 +0200
>> >> > > From:  Stephen Berman via "Bug reports for GNU Emacs,
>> >> > >  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
>> >> > >
>> >> > > Commit 91333dacfa1, which adds the feature of optionally skipping over
>> >> > > inactive widgets when tabbing (bug#70413), fails to handle buffers that
>> >> > > contain only one active widget; in that case, pressing TAB or S-TAB
>> >> > > raises the error "No buttons or fields found".  To reproduce:
>> >> > >
>> >> > > 0. emacs -Q
>> >> > > 1. Load the attached file widget-test.el and then type `M-x
>> >> > >    my-widget-test'.
>> >> > > 2. In the buffer "*My Widget Test*" repeatedly press TAB and S-TAB and
>> >> > >    observe that point moves successively between the active radio
>> >> > >    buttons labelled "One" and "Two" and the active push button "Submit",
>> >> > >    but skips the inactive push button "Reset", since the user option
>> >> > >    widget-skip-inactive is enabled.
>> >> > > 3. Now press (via RET or mouse-click) the "Submit" button, which makes
>> >> > >    the radio buttons and the "Submit" button inactive and the "Reset"
>> >> > >    button active.
>> >> > > 4. Pressing TAB once moves point to the "Reset" button, then pressing
>> >> > >    TAB again moves point to BOB and raises the error "No buttons or
>> >> > >    fields found".  Likewise, pressing S-TAB once moves point to "Reset",
>> >> > >    then pressing S-TAB again moves to EOB and raises the same error.
>> >> > >
>> >> > > The attached patched fixes this bug.  In addition, when only one widget
>> >> > > is active and point is on it, since pressing TAB or S-TAB does not move
>> >> > > point, the informational message "Only one tabable widget" is displayed.
>> >> > >
>> >> > > The original code in widget-move contained separate loops to handle
>> >> > > forward and backward movement and this involved some code duplication.
>> >> > > The changes to this code to fix the bug would have required further
>> >> > > duplication, so I took the opportunity to parameterize the
>> >> > > directionality, allowing handling both directions in a single loop.
>> >> > > This shortens the code and IMO makes the similarities and differences in
>> >> > > the handling easier to see.
>> >> >
>> >> > Adding Mauro to the discussion.
>> >> >
>> >> >
>> >> >
>> >> >
>> >>
>> >>
>> >>
>> >>
>>

[Message part 3 (message/rfc822, inline)]
From: Stephen Berman <stephen.berman <at> gmx.net>
To: bug-gnu-emacs <at> gnu.org
Subject: 30.0.50; Error when tabbing with only one active widget
Date: Fri, 26 Apr 2024 14:43:42 +0200
[Message part 4 (text/plain, inline)]
Commit 91333dacfa1, which adds the feature of optionally skipping over
inactive widgets when tabbing (bug#70413), fails to handle buffers that
contain only one active widget; in that case, pressing TAB or S-TAB
raises the error "No buttons or fields found".  To reproduce:

0. emacs -Q
1. Load the attached file widget-test.el and then type `M-x
   my-widget-test'.
2. In the buffer "*My Widget Test*" repeatedly press TAB and S-TAB and
   observe that point moves successively between the active radio
   buttons labelled "One" and "Two" and the active push button "Submit",
   but skips the inactive push button "Reset", since the user option
   widget-skip-inactive is enabled.
3. Now press (via RET or mouse-click) the "Submit" button, which makes
   the radio buttons and the "Submit" button inactive and the "Reset"
   button active.
4. Pressing TAB once moves point to the "Reset" button, then pressing
   TAB again moves point to BOB and raises the error "No buttons or
   fields found".  Likewise, pressing S-TAB once moves point to "Reset",
   then pressing S-TAB again moves to EOB and raises the same error.

The attached patched fixes this bug.  In addition, when only one widget
is active and point is on it, since pressing TAB or S-TAB does not move
point, the informational message "Only one tabable widget" is displayed.

The original code in widget-move contained separate loops to handle
forward and backward movement and this involved some code duplication.
The changes to this code to fix the bug would have required further
duplication, so I took the opportunity to parameterize the
directionality, allowing handling both directions in a single loop.
This shortens the code and IMO makes the similarities and differences in
the handling easier to see.


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

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

[widget-test.el (application/emacs-lisp, attachment)]
[Message part 6 (text/x-patch, attachment)]

This bug report was last modified 327 days ago.

Previous Next


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