GNU bug report logs - #30502
26.0.91; electric-pair-mode documentation

Previous Next

Package: emacs;

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.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: charles <at> aurox.ch (Charles A. Roelli)
Cc: tracker <at> debbugs.gnu.org
Subject: bug#30502: closed (26.0.91; electric-pair-mode documentation)
Date: Sat, 17 Feb 2018 19:52:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Sat, 17 Feb 2018 21:00:58 +0100
with message-id <m2r2pjidxh.fsf <at> aurox.ch>
and subject line Re: bug#30502: 26.0.91; electric-pair-mode documentation
has caused the debbugs.gnu.org bug report #30502,
regarding 26.0.91; electric-pair-mode documentation
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
30502: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=30502
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: charles <at> aurox.ch (Charles A. Roelli)
To: bug-gnu-emacs <at> gnu.org
Subject: 26.0.91; electric-pair-mode documentation
Date: Sat, 17 Feb 2018 17:07:53 +0100
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.


[Message part 3 (message/rfc822, inline)]
From: charles <at> aurox.ch (Charles A. Roelli)
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 30502-done <at> debbugs.gnu.org
Subject: Re: bug#30502: 26.0.91; electric-pair-mode documentation
Date: Sat, 17 Feb 2018 21:00:58 +0100
> 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.


This bug report was last modified 7 years and 96 days ago.

Previous Next


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