all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Laurent Hoeltgen <hoeltgman@gmail.com>
To: Jeremiah Dodds <jeremiah.dodds@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: electric pair mode and latex
Date: Thu, 21 Jun 2012 05:16:32 +0200	[thread overview]
Message-ID: <4FE29210.9040701@gmail.com> (raw)
In-Reply-To: <87zk7yp33e.fsf@friendface.i-did-not-set--mail-host-address--so-tickle-me>

On 06/20/2012 02:41 PM, Jeremiah Dodds wrote:
> Laurent Hoeltgen <hoeltgman@gmail.com> writes:
> 
>> On 06/20/2012 07:50 AM, Jeremiah Dodds wrote:
>>> Laurent Hoeltgen <hoeltgman@gmail.com> writes:
>>>
>>>> Hi,
>>>>
>>>> electric pair mode automatically closes parentheses like (,[,{,... Can I
>>>> customize this such that when I edit a latex document it also closes
>>>> expressions like \left( with \right)?
>>>>
>>>> Regards,
>>>> Laurent
>>>
>>> Yup, see 'electric-pair-pairs'
>>>
>>
>> Hi,
>>
>> if I try to change this option (through the customize interface) by
>> adding \left( and \right) to the list, emacs complains with the
>> following message:
>>
>> Saving electric-pair-pairs: This field should contain a single character.
>>
>> Regards,
>> Laurent
> 
> Sorry for the disinfo, I didn't actually attempt to customize it, only
> saw that it was customizable, and assumed that it would allow arbitrary,
> as opposed to single-character-only pair definitions.
> 
> Perhaps you can get something working with skeleton-mode
> (http://www.emacswiki.org/emacs/SkeletonPair) ? 
> 

Hi,

after a bit of googling I actually found this:

http://inthearmchair.wordpress.com/2008/11/01/automatically-inserting-matching-parentheses-for-latex-in-emacs/

which does exactly what I want.

Regards,
Laurent




  reply	other threads:[~2012-06-21  3:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-20  5:41 electric pair mode and latex Laurent Hoeltgen
2012-06-20  5:50 ` Jeremiah Dodds
2012-06-20  7:23   ` Laurent Hoeltgen
2012-06-20 12:41     ` Jeremiah Dodds
2012-06-21  3:16       ` Laurent Hoeltgen [this message]
2012-06-20 13:58 ` Andreas Röhler
     [not found] <mailman.3091.1340170870.855.help-gnu-emacs@gnu.org>
2012-06-20 16:15 ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4FE29210.9040701@gmail.com \
    --to=hoeltgman@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=jeremiah.dodds@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.