GNU bug report logs - #70413
30.0.50; FR: skip inactive widgets when tabbing

Previous Next

Package: emacs;

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

Date: Tue, 16 Apr 2024 09:21:02 UTC

Severity: wishlist

Found in version 30.0.50

Done: Stephen Berman <stephen.berman <at> gmx.net>

To reply to this bug, email your comments to 70413 AT debbugs.gnu.org.
There is no need to reopen the bug first.

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#70413; Package emacs. (Tue, 16 Apr 2024 09:21:03 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. (Tue, 16 Apr 2024 09:21:03 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; FR: skip inactive widgets when tabbing
Date: Tue, 16 Apr 2024 11:20:10 +0200
[Message part 1 (text/plain, inline)]
In buffers containing widgets, such as the Customize buffers, the
widgets can be either active or inactive: when you click (with the mouse
or RET) on an active widget, its associated action is executed, and when
you click on an inactive widget, this raises the error "Attempt to
perform action on inactive widget".  You can navigate among the widgets
by pressing TAB or S-TAB to move point to the next or previous widget.

I think it would be useful and convenient to skip over inactive widgets
when tabbing; e.g. you then avoid accidentally tabbing to an inactive
widget, typing RET and getting the error, and in a buffer with many
active and inactive widgets, you can tab more quickly to the desired
active widget by skipping over the inactive ones.

The attached patch implements this behavior.  Since tabbing to inactive
widgets has always been the behavior in the widget library, skipping is
conditioned on the value of a boolean defcustom, with the default being
the current non-skipping.


In GNU Emacs 30.0.50 (build 2, x86_64-pc-linux-gnu, GTK+ Version
 3.24.41, cairo version 1.18.0) of 2024-04-16 built on strobelfs
Repository revision: b436f430e3897e1aa6dcb5a39564a3553bbf631f
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101013
System Description: Linux From Scratch r12.1-41

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

[Message part 2 (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70413; Package emacs. (Tue, 16 Apr 2024 12:55:03 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stephen Berman <stephen.berman <at> gmx.net>
Cc: 70413 <at> debbugs.gnu.org
Subject: Re: bug#70413: 30.0.50; FR: skip inactive widgets when tabbing
Date: Tue, 16 Apr 2024 15:53:48 +0300
> Date: Tue, 16 Apr 2024 11:20:10 +0200
> From:  Stephen Berman via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> 
> In buffers containing widgets, such as the Customize buffers, the
> widgets can be either active or inactive: when you click (with the mouse
> or RET) on an active widget, its associated action is executed, and when
> you click on an inactive widget, this raises the error "Attempt to
> perform action on inactive widget".  You can navigate among the widgets
> by pressing TAB or S-TAB to move point to the next or previous widget.
> 
> I think it would be useful and convenient to skip over inactive widgets
> when tabbing; e.g. you then avoid accidentally tabbing to an inactive
> widget, typing RET and getting the error, and in a buffer with many
> active and inactive widgets, you can tab more quickly to the desired
> active widget by skipping over the inactive ones.
> 
> The attached patch implements this behavior.  Since tabbing to inactive
> widgets has always been the behavior in the widget library, skipping is
> conditioned on the value of a boolean defcustom, with the default being
> the current non-skipping.

This is OK, but please announce this new option in NEWS.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70413; Package emacs. (Tue, 16 Apr 2024 21:57:03 GMT) Full text and rfc822 format available.

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

From: Stephen Berman <stephen.berman <at> gmx.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 70413 <at> debbugs.gnu.org
Subject: Re: bug#70413: 30.0.50; FR: skip inactive widgets when tabbing
Date: Tue, 16 Apr 2024 23:56:36 +0200
On Tue, 16 Apr 2024 15:53:48 +0300 Eli Zaretskii <eliz <at> gnu.org> wrote:

>> Date: Tue, 16 Apr 2024 11:20:10 +0200
>> From:  Stephen Berman via "Bug reports for GNU Emacs,
>>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
>>
>> In buffers containing widgets, such as the Customize buffers, the
>> widgets can be either active or inactive: when you click (with the mouse
>> or RET) on an active widget, its associated action is executed, and when
>> you click on an inactive widget, this raises the error "Attempt to
>> perform action on inactive widget".  You can navigate among the widgets
>> by pressing TAB or S-TAB to move point to the next or previous widget.
>>
>> I think it would be useful and convenient to skip over inactive widgets
>> when tabbing; e.g. you then avoid accidentally tabbing to an inactive
>> widget, typing RET and getting the error, and in a buffer with many
>> active and inactive widgets, you can tab more quickly to the desired
>> active widget by skipping over the inactive ones.
>>
>> The attached patch implements this behavior.  Since tabbing to inactive
>> widgets has always been the behavior in the widget library, skipping is
>> conditioned on the value of a boolean defcustom, with the default being
>> the current non-skipping.
>
> This is OK, but please announce this new option in NEWS.

Thanks; see the attached patch.  I think this user option should also be
documented in the Widget manual, so the patch includes that as well.
The Widget manual has a node for widget customizations, so I added it
there.  But I think it is helpful to mention it also in the node
"Widgets and the Buffer", where the tabbing commands `widget-forward'
and `widget-backward' are documented, so that patch does that too.  If
you confirm this is ok, I'll push the code and doc changes to master.

Steve Berman




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70413; Package emacs. (Tue, 16 Apr 2024 22:05:04 GMT) Full text and rfc822 format available.

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

From: Stephen Berman <stephen.berman <at> gmx.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 70413 <at> debbugs.gnu.org
Subject: Re: bug#70413: 30.0.50; FR: skip inactive widgets when tabbing
Date: Wed, 17 Apr 2024 00:04:33 +0200
[Message part 1 (text/plain, inline)]
On Tue, 16 Apr 2024 23:56:36 +0200 Stephen Berman <stephen.berman <at> gmx.net> wrote:

> On Tue, 16 Apr 2024 15:53:48 +0300 Eli Zaretskii <eliz <at> gnu.org> wrote:
>
>>> Date: Tue, 16 Apr 2024 11:20:10 +0200
>>> From:  Stephen Berman via "Bug reports for GNU Emacs,
>>>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
>>>
>>> In buffers containing widgets, such as the Customize buffers, the
>>> widgets can be either active or inactive: when you click (with the mouse
>>> or RET) on an active widget, its associated action is executed, and when
>>> you click on an inactive widget, this raises the error "Attempt to
>>> perform action on inactive widget".  You can navigate among the widgets
>>> by pressing TAB or S-TAB to move point to the next or previous widget.
>>>
>>> I think it would be useful and convenient to skip over inactive widgets
>>> when tabbing; e.g. you then avoid accidentally tabbing to an inactive
>>> widget, typing RET and getting the error, and in a buffer with many
>>> active and inactive widgets, you can tab more quickly to the desired
>>> active widget by skipping over the inactive ones.
>>>
>>> The attached patch implements this behavior.  Since tabbing to inactive
>>> widgets has always been the behavior in the widget library, skipping is
>>> conditioned on the value of a boolean defcustom, with the default being
>>> the current non-skipping.
>>
>> This is OK, but please announce this new option in NEWS.
>
> Thanks; see the attached patch.  I think this user option should also be
> documented in the Widget manual, so the patch includes that as well.
> The Widget manual has a node for widget customizations, so I added it
> there.  But I think it is helpful to mention it also in the node
> "Widgets and the Buffer", where the tabbing commands `widget-forward'
> and `widget-backward' are documented, so that patch does that too.  If
> you confirm this is ok, I'll push the code and doc changes to master.
>
> Steve Berman

... and here's the patch:

[Message part 2 (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70413; Package emacs. (Wed, 17 Apr 2024 12:06:03 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stephen Berman <stephen.berman <at> gmx.net>
Cc: 70413 <at> debbugs.gnu.org
Subject: Re: bug#70413: 30.0.50; FR: skip inactive widgets when tabbing
Date: Wed, 17 Apr 2024 15:04:34 +0300
> From: Stephen Berman <stephen.berman <at> gmx.net>
> Cc: 70413 <at> debbugs.gnu.org
> Date: Wed, 17 Apr 2024 00:04:33 +0200
> 
> > Thanks; see the attached patch.  I think this user option should also be
> > documented in the Widget manual, so the patch includes that as well.
> > The Widget manual has a node for widget customizations, so I added it
> > there.  But I think it is helpful to mention it also in the node
> > "Widgets and the Buffer", where the tabbing commands `widget-forward'
> > and `widget-backward' are documented, so that patch does that too.  If
> > you confirm this is ok, I'll push the code and doc changes to master.
> >
> > Steve Berman
> 
> ... and here's the patch:

LGTM, with 2 minor comments:

> +@defopt widget-skip-inactive
> +If non-@code{nil}, navigating between widgets by @kbd{M-@key{TAB}}
                                                    ^^^^^^^^^^^^^^^^^
This should probably be @kbd{key{TAB}}.

> +(@code{widget-forward}) or @kbd{S-@key{TAB}} (@code{widget-backward},
> +also bound to @kbd{M-@key{TAB}}) skips over inactive widgets.
                                   ^
I'd add a comma there.

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70413; Package emacs. (Wed, 17 Apr 2024 13:59:01 GMT) Full text and rfc822 format available.

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

From: Stephen Berman <stephen.berman <at> gmx.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 70413 <at> debbugs.gnu.org
Subject: Re: bug#70413: 30.0.50; FR: skip inactive widgets when tabbing
Date: Wed, 17 Apr 2024 15:57:56 +0200
On Wed, 17 Apr 2024 15:04:34 +0300 Eli Zaretskii <eliz <at> gnu.org> wrote:

>> From: Stephen Berman <stephen.berman <at> gmx.net>
>> Cc: 70413 <at> debbugs.gnu.org
>> Date: Wed, 17 Apr 2024 00:04:33 +0200
>> 
>> > Thanks; see the attached patch.  I think this user option should also be
>> > documented in the Widget manual, so the patch includes that as well.
>> > The Widget manual has a node for widget customizations, so I added it
>> > there.  But I think it is helpful to mention it also in the node
>> > "Widgets and the Buffer", where the tabbing commands `widget-forward'
>> > and `widget-backward' are documented, so that patch does that too.  If
>> > you confirm this is ok, I'll push the code and doc changes to master.
>> >
>> > Steve Berman
>> 
>> ... and here's the patch:
>
> LGTM, with 2 minor comments:
>
>> +@defopt widget-skip-inactive
>> +If non-@code{nil}, navigating between widgets by @kbd{M-@key{TAB}}
>                                                     ^^^^^^^^^^^^^^^^^

Oops, that was copy-pasta; thanks for catching it.

> This should probably be @kbd{key{TAB}}.

Or rather @key{TAB}, right?  That's what's used earlier in the Widget
manual and IIUC is what (info "(texinfo) @key") recommends.

>> +(@code{widget-forward}) or @kbd{S-@key{TAB}} (@code{widget-backward},
>> +also bound to @kbd{M-@key{TAB}}) skips over inactive widgets.
>                                    ^
> I'd add a comma there.

AFAIK, according to the usual rules of comma usage in English, a comma
should not be used there, since the entire phrase "navigating between
widgets by ‘<TAB>’ (‘widget-forward’) or ‘S-<TAB>’ (‘widget-backward’,
also bound to ‘M-<TAB>’)" is the subject of "skips".  But I grant that,
due to the length of this phrase and the parenthetical phrases it
includes, it does prosodically "feel" like there should be a comma.  The
following reformulation avoids this, and moreover conforms better to the
style of the Widget manual by using the imperative form "skip":

  If non-@code{nil}, skip over inactive widgets when using @key{TAB}
  (@code{widget-forward}) or @kbd{S-@key{TAB}} (@code{widget-backward},
  also bound to @kbd{M-@key{TAB}}) to navigate between widgets.

Is this formulation acceptable?

Steve Berman




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70413; Package emacs. (Wed, 17 Apr 2024 15:44:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stephen Berman <stephen.berman <at> gmx.net>
Cc: 70413 <at> debbugs.gnu.org
Subject: Re: bug#70413: 30.0.50; FR: skip inactive widgets when tabbing
Date: Wed, 17 Apr 2024 18:42:49 +0300
> From: Stephen Berman <stephen.berman <at> gmx.net>
> Cc: 70413 <at> debbugs.gnu.org
> Date: Wed, 17 Apr 2024 15:57:56 +0200
> 
> On Wed, 17 Apr 2024 15:04:34 +0300 Eli Zaretskii <eliz <at> gnu.org> wrote:
> 
> >> +@defopt widget-skip-inactive
> >> +If non-@code{nil}, navigating between widgets by @kbd{M-@key{TAB}}
> >                                                     ^^^^^^^^^^^^^^^^^
> 
> Oops, that was copy-pasta; thanks for catching it.
> 
> > This should probably be @kbd{key{TAB}}.
> 
> Or rather @key{TAB}, right?  That's what's used earlier in the Widget
> manual and IIUC is what (info "(texinfo) @key") recommends.

No, @kbd{@key{TAB}} is correct when you are talking about user typing
something (as opposed to talking about the key TAB).

Texinfo explicitly tells you that @key is for naming a key, not for
describing user input.

>   If non-@code{nil}, skip over inactive widgets when using @key{TAB}
>   (@code{widget-forward}) or @kbd{S-@key{TAB}} (@code{widget-backward},
>   also bound to @kbd{M-@key{TAB}}) to navigate between widgets.
> 
> Is this formulation acceptable?

Yes, thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70413; Package emacs. (Wed, 17 Apr 2024 17:37:01 GMT) Full text and rfc822 format available.

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

From: Stephen Berman <stephen.berman <at> gmx.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 70413 <at> debbugs.gnu.org
Subject: Re: bug#70413: 30.0.50; FR: skip inactive widgets when tabbing
Date: Wed, 17 Apr 2024 19:36:04 +0200
On Wed, 17 Apr 2024 18:42:49 +0300 Eli Zaretskii <eliz <at> gnu.org> wrote:

>> From: Stephen Berman <stephen.berman <at> gmx.net>
>> Cc: 70413 <at> debbugs.gnu.org
>> Date: Wed, 17 Apr 2024 15:57:56 +0200
>>
>> On Wed, 17 Apr 2024 15:04:34 +0300 Eli Zaretskii <eliz <at> gnu.org> wrote:
>>
>> >> +@defopt widget-skip-inactive
>> >> +If non-@code{nil}, navigating between widgets by @kbd{M-@key{TAB}}
>> >                                                     ^^^^^^^^^^^^^^^^^
>>
>> Oops, that was copy-pasta; thanks for catching it.
>>
>> > This should probably be @kbd{key{TAB}}.
>>
>> Or rather @key{TAB}, right?  That's what's used earlier in the Widget
>> manual and IIUC is what (info "(texinfo) @key") recommends.
>
> No, @kbd{@key{TAB}} is correct when you are talking about user typing
> something (as opposed to talking about the key TAB).
>
> Texinfo explicitly tells you that @key is for naming a key, not for
> describing user input.

Ah, ok.  I guess I misunderstood that, and also I misinterpreted the use
of @key{TAB} in (info "(widget) Widgets and the Buffer") that I referred
to above: it is in a table that begins with @table @kbd, so the effect
is that of @kbd{@key{TAB}}.  (But I do think there are several typos or
incorrect markup in that node and possibly elsewhere in the Widget
manual; but I'll make a separate bug report about that.)

>>   If non-@code{nil}, skip over inactive widgets when using @key{TAB}
>>   (@code{widget-forward}) or @kbd{S-@key{TAB}} (@code{widget-backward},
>>   also bound to @kbd{M-@key{TAB}}) to navigate between widgets.
>>
>> Is this formulation acceptable?
>
> Yes, thanks.

Thanks, I've pushed the changes to master as commit 91333dacfa1.

Steve Berman




Reply sent to Stephen Berman <stephen.berman <at> gmx.net>:
You have taken responsibility. (Wed, 17 Apr 2024 17:38:02 GMT) Full text and rfc822 format available.

Notification sent to Stephen Berman <stephen.berman <at> gmx.net>:
bug acknowledged by developer. (Wed, 17 Apr 2024 17:38:02 GMT) Full text and rfc822 format available.

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

From: Stephen Berman <stephen.berman <at> gmx.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 70413-done <at> debbugs.gnu.org
Subject: Re: bug#70413: 30.0.50; FR: skip inactive widgets when tabbing
Date: Wed, 17 Apr 2024 19:37:28 +0200
On Wed, 17 Apr 2024 19:36:04 +0200 Stephen Berman <stephen.berman <at> gmx.net> wrote:

> On Wed, 17 Apr 2024 18:42:49 +0300 Eli Zaretskii <eliz <at> gnu.org> wrote:
[...]
>>>   If non-@code{nil}, skip over inactive widgets when using @key{TAB}
>>>   (@code{widget-forward}) or @kbd{S-@key{TAB}} (@code{widget-backward},
>>>   also bound to @kbd{M-@key{TAB}}) to navigate between widgets.
>>>
>>> Is this formulation acceptable?
>>
>> Yes, thanks.
>
> Thanks, I've pushed the changes to master as commit 91333dacfa1.

And now closing the bug.

Steve Berman




This bug report was last modified 16 days ago.

Previous Next


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