GNU bug report logs - #19356
electric-pair-mode painful quotes in latex-mode

Previous Next

Package: emacs;

Reported by: Stefan Monnier <monnier <at> iro.umontreal.ca>

Date: Fri, 12 Dec 2014 04:21:01 UTC

Severity: minor

Found in version 24.4

Done: joaotavora <at> gmail.com (João Távora)

Bug is archived. No further changes may be made.

Full log


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

From: joaotavora <at> gmail.com (João Távora)
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 19356 <at> debbugs.gnu.org
Subject: Re: bug#19356: electric-pair-mode painful quotes in latex-mode
Date: Sat, 13 Dec 2014 14:54:02 +0000
> 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.

What kind of surrounding should take place? Should it be

  ``wordityped''

or should it be

  "wordityped"

?

Anyway, without having anlysed the problem thoroughly, I lean towards
making tex-mode.el's `tex-insert-quote' aware of `electric-pair-mode',
possibly downgrading and/or not respecting stuff like
`electric-pair-preserve-balance', instead of overloading the latter with
abstractions to deal with multi-character metamorphosing quotes. Do you
agree? Or do you have any other solution in mind?

Also, independent of `electric-pair-mode', typing a double quote
(`tex-insert-quote') with only whitespace preceding point gives me a
"Beginning of buffer" error. Should I also fix it?

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

Reproduced. `electric-pair-mode' does affect this.

João




This bug report was last modified 10 years and 162 days ago.

Previous Next


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