GNU bug report logs -
#65625
30.0.50; electric-pair-skip-whitespace-chars choice looks wrong
Previous Next
Reported by: Mauro Aranda <maurooaranda <at> gmail.com>
Date: Wed, 30 Aug 2023 15:36:02 UTC
Severity: normal
Found in version 30.0.50
Fixed in version 30.1
Done: Stefan Kangas <stefankangas <at> gmail.com>
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 65625 in the body.
You can then email your comments to 65625 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#65625
; Package
emacs
.
(Wed, 30 Aug 2023 15:36:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Mauro Aranda <maurooaranda <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Wed, 30 Aug 2023 15:36:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Looking at the electric-pair-skip-whitespace-chars defcustom:
(defcustom electric-pair-skip-whitespace-chars (list ?\t ?\s ?\n)
"Whitespace characters considered by `electric-pair-skip-whitespace'."
:version "24.4"
:group 'electricity
:type '(choice (set (const :tag "Space" ?\s)
(const :tag "Tab" ?\t)
(const :tag "Newline" ?\n))
(list character)))
I think the 2nd choice should be (repeat character) rather than
(list character).
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#65625
; Package
emacs
.
(Wed, 30 Aug 2023 19:22:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 65625 <at> debbugs.gnu.org (full text, mbox):
> Looking at the electric-pair-skip-whitespace-chars defcustom:
>
> (defcustom electric-pair-skip-whitespace-chars (list ?\t ?\s ?\n)
> "Whitespace characters considered by `electric-pair-skip-whitespace'."
> :version "24.4"
> :group 'electricity
> :type '(choice (set (const :tag "Space" ?\s)
> (const :tag "Tab" ?\t)
> (const :tag "Newline" ?\n))
> (list character)))
>
> I think the 2nd choice should be (repeat character) rather than
> (list character).
With `list' I get this:
Hide Electric Pair Skip Whitespace Chars: Choice: Value Menu List:
Character: ^@
State : EDITED, shown value does not take effect until you set or save it.
Whitespace characters considered by ‘electric-pair-skip-whitespace’.
Groups: Electricity
And with `repeat', I get this:
Hide Electric Pair Skip Whitespace Chars: Choice: Value Menu Repeat:
INS
State : EDITED, shown value does not take effect until you set or save it.
Whitespace characters considered by ‘electric-pair-skip-whitespace’.
Groups: Electricity
If I now hit "INS", I see this:
Hide Electric Pair Skip Whitespace Chars: Choice: Value Menu Repeat:
INS DEL Character: ^@
INS
State : EDITED, shown value does not take effect until you set or save it.
Whitespace characters considered by ‘electric-pair-skip-whitespace’.
Groups: Electricity
And then when I try to delete "^@" to edit it, it changes to "\s", and
then I can't delete it to enter something else. So this all seems
pretty wonky to me. Is `repeat' that much of an improvement?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#65625
; Package
emacs
.
(Wed, 30 Aug 2023 22:49:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 65625 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Stefan Kangas <stefankangas <at> gmail.com> writes:
>> Looking at the electric-pair-skip-whitespace-chars defcustom:
>>
>> (defcustom electric-pair-skip-whitespace-chars (list ?\t ?\s ?\n)
>> "Whitespace characters considered by
`electric-pair-skip-whitespace'."
>> :version "24.4"
>> :group 'electricity
>> :type '(choice (set (const :tag "Space" ?\s)
>> (const :tag "Tab" ?\t)
>> (const :tag "Newline" ?\n))
>> (list character)))
>>
>> I think the 2nd choice should be (repeat character) rather than
>> (list character).
>
> With `list' I get this:
>
> Hide Electric Pair Skip Whitespace Chars: Choice: Value Menu List:
> Character: ^@
> State : EDITED, shown value does not take effect until you set or
save it.
> Whitespace characters considered by ‘electric-pair-skip-whitespace’.
> Groups: Electricity
>
> And with `repeat', I get this:
>
> Hide Electric Pair Skip Whitespace Chars: Choice: Value Menu Repeat:
> INS
> State : EDITED, shown value does not take effect until you set or
save it.
> Whitespace characters considered by ‘electric-pair-skip-whitespace’.
> Groups: Electricity
>
> If I now hit "INS", I see this:
>
> Hide Electric Pair Skip Whitespace Chars: Choice: Value Menu Repeat:
> INS DEL Character: ^@
> INS
> State : EDITED, shown value does not take effect until you set or
save it.
> Whitespace characters considered by ‘electric-pair-skip-whitespace’.
> Groups: Electricity
>
> And then when I try to delete "^@" to edit it, it changes to "\s", and
> then I can't delete it to enter something else. So this all seems
> pretty wonky to me. Is `repeat' that much of an improvement?
The character widget might be wonky, but that shouldn't matter when
choosing between list or repeat. You would have observed the same
behavior if the character widget were part of the list widget (delete
"^@" to edit it, changes to "\s", then hitting C-d looks like it does
nothing).
What's important here is that the 2nd choice lets the user choose only
one whitespace character, while it seems pretty clear to me
that the intention was for the user to be able to customize it to a list
of whitespace characters, not just to a list of one. And that's what
the repeat widget is for, so yes, it is a real improvement.
I attach a patch.
[0001-Fix-choice-in-electric-pair-skip-whitespace-chars.patch (text/x-patch, attachment)]
Reply sent
to
Stefan Kangas <stefankangas <at> gmail.com>
:
You have taken responsibility.
(Thu, 31 Aug 2023 06:26:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Mauro Aranda <maurooaranda <at> gmail.com>
:
bug acknowledged by developer.
(Thu, 31 Aug 2023 06:26:01 GMT)
Full text and
rfc822 format available.
Message #16 received at 65625-done <at> debbugs.gnu.org (full text, mbox):
Version: 30.1
Mauro Aranda <maurooaranda <at> gmail.com> writes:
> What's important here is that the 2nd choice lets the user choose only
> one whitespace character, while it seems pretty clear to me
> that the intention was for the user to be able to customize it to a list
> of whitespace characters, not just to a list of one. And that's what
> the repeat widget is for, so yes, it is a real improvement.
OK, makes sense.
> I attach a patch.
Thanks. Installed on master as commit 4adedd29961, and I'm closing this bug.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 28 Sep 2023 11:24:09 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 year and 225 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.