GNU bug report logs -
#30502
26.0.91; electric-pair-mode documentation
Previous Next
Reported by: charles <at> aurox.ch (Charles A. Roelli)
Date: Sat, 17 Feb 2018 15:59:02 UTC
Severity: minor
Found in version 26.0.91
Done: charles <at> aurox.ch (Charles A. Roelli)
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 30502 in the body.
You can then email your comments to 30502 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#30502
; Package
emacs
.
(Sat, 17 Feb 2018 15:59:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
charles <at> aurox.ch (Charles A. Roelli)
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sat, 17 Feb 2018 15:59:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
When you turn on electric-pair-mode from emacs -q, then select a
region and type an opening delimeter like "(", the region is
surrounded by the "(" and ")" characters, the mark is deactivated, and
point is left after the opening delimeter. This should be documented.
(I searched for documentation but have not found any.)
Also, this functionality requires transient-mark-mode to be on. Are
there any equivalent "wrapping" commands for use when
transient-mark-mode is off? If not, maybe we should add some.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#30502
; Package
emacs
.
(Sat, 17 Feb 2018 16:22:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 30502 <at> debbugs.gnu.org (full text, mbox):
> Date: Sat, 17 Feb 2018 17:07:53 +0100
> From: charles <at> aurox.ch (Charles A. Roelli)
>
> When you turn on electric-pair-mode from emacs -q, then select a
> region and type an opening delimeter like "(", the region is
> surrounded by the "(" and ")" characters, the mark is deactivated, and
> point is left after the opening delimeter. This should be documented.
> (I searched for documentation but have not found any.)
Which part of this is undocumented? Did you see the description of
Electric pair mode in the "Matching" node of the user manual?
> Also, this functionality requires transient-mark-mode to be on.
I don't see it. I can turn off transient-mark-mode, and the feature
still works. Maybe I don't understand what you mean by "this
functionality"?
Thanks.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#30502
; Package
emacs
.
(Sat, 17 Feb 2018 16:43:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 30502 <at> debbugs.gnu.org (full text, mbox):
> Date: Sat, 17 Feb 2018 18:21:16 +0200
> From: Eli Zaretskii <eliz <at> gnu.org>
> CC: 30502 <at> debbugs.gnu.org
> Reply-to: Eli Zaretskii <eliz <at> gnu.org>
>
> > Date: Sat, 17 Feb 2018 17:07:53 +0100
> > From: charles <at> aurox.ch (Charles A. Roelli)
> >
> > When you turn on electric-pair-mode from emacs -q, then select a
> > region and type an opening delimeter like "(", the region is
> > surrounded by the "(" and ")" characters, the mark is deactivated, and
> > point is left after the opening delimeter. This should be documented.
> > (I searched for documentation but have not found any.)
>
> Which part of this is undocumented? Did you see the description of
> Electric pair mode in the "Matching" node of the user manual?
Yes, I did. The node does not mention anything about automatically
inserting a matching delimeter at the mark when the region is active
and a delimeter character is typed. For example, it could say,
Whenever you insert an opening delimiter, the matching closing
delimiter is automatically inserted as well (at the mark, if the
region is active), leaving point between the two.
instead of,
Whenever you insert an opening delimiter, the matching closing
delimiter is automatically inserted as well, leaving point between the
two.
> > Also, this functionality requires transient-mark-mode to be on.
>
> I don't see it. I can turn off transient-mark-mode, and the feature
> still works. Maybe I don't understand what you mean by "this
> functionality"?
By "this functionality" I mean auto-inserting a matching delimeter at
the mark when a delimeter character is typed, when electric-pair-mode
is on. The region has to be active for this to work, therefore
transient-mark-mode must be on (even if temporarily). I suggest
adding a command that wraps point and mark with some given delimeters,
regardless of whether the region is active.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#30502
; Package
emacs
.
(Sat, 17 Feb 2018 17:32:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 30502 <at> debbugs.gnu.org (full text, mbox):
> Date: Sat, 17 Feb 2018 17:51:45 +0100
> From: charles <at> aurox.ch (Charles A. Roelli)
> CC: 30502 <at> debbugs.gnu.org
>
> The node does not mention anything about automatically
> inserting a matching delimeter at the mark when the region is active
> and a delimeter character is typed.
Thanks, I documented that now. In the doc string of the mode as well.
> By "this functionality" I mean auto-inserting a matching delimeter at
> the mark when a delimeter character is typed, when electric-pair-mode
> is on. The region has to be active for this to work, therefore
> transient-mark-mode must be on (even if temporarily). I suggest
> adding a command that wraps point and mark with some given delimeters,
> regardless of whether the region is active.
We have "C-u C-x C-x" that turns on transient-mark-mode temporarily.
Isn't that enough? If not, the issue is general, not specific to this
mode.
Reply sent
to
charles <at> aurox.ch (Charles A. Roelli)
:
You have taken responsibility.
(Sat, 17 Feb 2018 19:52:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
charles <at> aurox.ch (Charles A. Roelli)
:
bug acknowledged by developer.
(Sat, 17 Feb 2018 19:52:02 GMT)
Full text and
rfc822 format available.
Message #19 received at 30502-done <at> debbugs.gnu.org (full text, mbox):
> Date: Sat, 17 Feb 2018 19:31:42 +0200
> From: Eli Zaretskii <eliz <at> gnu.org>
>
> Thanks, I documented that now. In the doc string of the mode as well.
Thanks a lot for the improvement. With that, I'll close this bug.
> > By "this functionality" I mean auto-inserting a matching delimeter at
> > the mark when a delimeter character is typed, when electric-pair-mode
> > is on. The region has to be active for this to work, therefore
> > transient-mark-mode must be on (even if temporarily). I suggest
> > adding a command that wraps point and mark with some given delimeters,
> > regardless of whether the region is active.
>
> We have "C-u C-x C-x" that turns on transient-mark-mode temporarily.
> Isn't that enough? If not, the issue is general, not specific to this
> mode.
"C-u C-x C-x" does work well enough, but Emacs normally also provides
commands that explicitly do some subset of what a region-aware command
would do in the same situation. For example, if you want to comment
out the region with transient-mark-mode switched off, you can either
type:
C-u C-x C-x [exchange-point-and-mark]
M-; [comment-dwim]
or more memorably, clearly, and without moving point,
M-x comment-region RET
I like having both options available, but the latter is preferable IMO.
Hence we could have some command that would be used like,
M-x wrap-region RET ( RET
to wrap a region explicitly.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 18 Mar 2018 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 7 years and 95 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.