Subject: bug#19356: closed (Re: bug#19356: electric-pair-mode painful quotes in latex-mode)

From: [email-masked] (GNU bug Tracking System)
Date: Sun, 14 Dec 2014 11:44:03 +0000

Your bug report

#19356: electric-pair-mode painful quotes in latex-mode

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 [email-masked].

-- 
19356: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=19356
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#19356: electric-pair-mode painful quotes in latex-mode
From: [email-masked] (João Távora)
To: Stefan Monnier <[email-masked]>
Cc: [email-masked]
Date: Sun, 14 Dec 2014 11:43:09 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

Stefan Monnier <[email-masked]> writes:

>> What kind of surrounding should take place? Should it be
>>   ``wordityped''
>> or should it be
>>   "wordityped"
>> ?
>
> I think either way would be OK.
> I guess ideally
>
>    C-M-SPC "
>
> should do
>
>    ``wordityped''
>
> and
>
>    C-M-SPC " "
>
> should do
>
>    "wordityped"
>
> but it's OK if we don't reach this ideal.

Not sure If I agree that's ideal, but I'll try to implement it for and
use in my tex-mode this week.

> I don't see the need to extend electric-pair's code for this use
> case, indeed, except if it can be done with a well-placed hook.

I don't think it can. Not without heroic sophistication.

> The patch looks OK.  Installing it on emacs-24 sounds good, thank you

Done. Hope I haven't forgotten anything...

> (and no, it won't be cherry picked: it'll be merged instead).

So this very same commit to emacs-24 (and all other commits) will be an
ancestor of master. OK, that works, I suppose. I hear talk (and
misunderstandings) of rebasing in emacs-devel, which is basically
cherry-picking, and that's why I asked. I probably misunderstood (and
sure as hell don't want to fuel that discusssion).

J

Subject: electric-pair-mode painful quotes in latex-mode
From: Stefan Monnier <[email-masked]>
To: [email-masked]
Date: Thu, 11 Dec 2014 21:57:05 -0500
List-Id: <debbugs-submit.debbugs.gnu.org>

Package: Emacs
Version: 24.4

   ./src/emacs -Q -f electric-pair-mode ~/tmp/foo.tex

then type a word, go back to before this word and try:

   C-M-SPC "

this will not surround the word in quotes as electric-pair-mode should.

Similarly, type

   hello " "

Notice how the second " inserts `""' instead of just modifying the ''
into a single ".  This same problem happens before a word.

        Stefan

In GNU Emacs 25.0.50.1 (x86_64-unknown-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2014-12-10 on pastel
Repository revision: 30075cf7025c17542f23610de1b54d84bbde192b
Windowing system distributor `The X.Org Foundation', version 11.0.11601901
System Description:	Debian GNU/Linux 8.0 (jessie)

Configured using:
 `configure -C --enable-checking --enable-check-lisp-object-type
 'CFLAGS=-Wall -g3 -Og -Wno-pointer-sign'
 PKG_CONFIG_PATH=/home/monnier/lib/pkgconfig'

Configured features:
XAW3D XPM JPEG TIFF GIF PNG SOUND GPM DBUS NOTIFY GNUTLS LIBXML2
FREETYPE M17N_FLT LIBOTF XFT ZLIB

Important settings:
  value of $LANG: fr_CH.UTF-8
  locale-coding-system: utf-8-unix

Major mode: InactiveMinibuffer

Minor modes in effect:
  electric-pair-mode: t
  url-handler-mode: t
  global-reveal-mode: t
  reveal-mode: t
  auto-insert-mode: t
  savehist-mode: t
  minibuffer-electric-default-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  global-prettify-symbols-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t

Recent messages:
Loading /home/monnier/src/elisp/ProofGeneral/generic/proof-site.el (source)...done
Loading /home/monnier/etc/emacs/X11.el (source)...done
Loading /home/monnier/etc/emacs/custom.el (source)...done
Warning: turn-on-eldoc-mode is obsolete!
Ispell-kill: nil american
Starting new Ispell process /usr/bin/aspell with american dictionary...
For information about GNU Emacs and the GNU system, type C-h C-a.
<C-drag-mouse-2> is undefined [2 times]
Quit
funcall-interactively: End of buffer

Load-path shadows:
/home/monnier/src/emacs/elpa/packages/ada-mode/ada-ref-man hides /home/monnier/src/emacs/elpa/packages/ada-ref-man/ada-ref-man
/home/monnier/src/emacs/elpa/packages/ada-mode/ada-prj hides /home/monnier/src/emacs/work/lisp/progmodes/ada-prj
/home/monnier/src/emacs/elpa/packages/ada-mode/ada-stmt hides /home/monnier/src/emacs/work/lisp/progmodes/ada-stmt
/home/monnier/src/emacs/elpa/packages/ada-mode/ada-mode hides /home/monnier/src/emacs/work/lisp/progmodes/ada-mode
/home/monnier/src/emacs/elpa/packages/ada-mode/ada-xref hides /home/monnier/src/emacs/work/lisp/progmodes/ada-xref
/home/monnier/src/emacs/elpa/packages/crisp/crisp hides /home/monnier/src/emacs/work/lisp/obsolete/crisp

Features:
(shadow sort mail-extr emacsbug message dired format-spec rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mail-utils
server noutline outline easy-mmode flyspell ispell checkdoc thingatpt
help-mode load-dir elec-pair url-handlers url-parse auth-source eieio
byte-opt bytecomp byte-compile cl-extra cconv eieio-core gnus-util
time-date mm-util mail-prsvr password-cache url-vars reveal autoinsert
proof-site proof-autoloads cl-macs cl gv pg-vars savehist minibuf-eldef
disp-table finder-inf edmacro kmacro cl-loaddefs cl-lib advice help-fns
info easymenu package epg-config bbdb-autoloads agda2 vm-autoloads
tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type
mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list newcomment elisp-mode lisp-mode prog-mode register page
menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock
syntax font-core frame cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak
czech european ethiopic indian cyrillic chinese case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer nadvice loaddefs button
faces cus-face macroexp files text-properties overlay sha1 md5 base64
format env code-pages mule custom widget hashtable-print-readable
backquote make-network-process dbusbind inotify dynamic-setting
font-render-setting x-toolkit x multi-tty emacs)

Memory information:
((conses 8 127506 20873)
 (symbols 24 21454 0) (miscs 20 1455 173) (strings 16 36084 3039)
 (string-bytes 1 1186490)
 (vectors 8 17258) (vector-slots 4 478789 3036) (floats 8 107 266)
 (intervals 28 285 0)
 (buffers 520 11) (heap 1024 8693 640))