all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* electric pair mode and latex
@ 2012-06-20  5:41 Laurent Hoeltgen
  2012-06-20  5:50 ` Jeremiah Dodds
  2012-06-20 13:58 ` Andreas Röhler
  0 siblings, 2 replies; 7+ messages in thread
From: Laurent Hoeltgen @ 2012-06-20  5:41 UTC (permalink / raw)
  To: help-gnu-emacs

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



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: electric pair mode and latex
  2012-06-20  5:41 Laurent Hoeltgen
@ 2012-06-20  5:50 ` Jeremiah Dodds
  2012-06-20  7:23   ` Laurent Hoeltgen
  2012-06-20 13:58 ` Andreas Röhler
  1 sibling, 1 reply; 7+ messages in thread
From: Jeremiah Dodds @ 2012-06-20  5:50 UTC (permalink / raw)
  To: Laurent Hoeltgen; +Cc: help-gnu-emacs

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'



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: electric pair mode and latex
  2012-06-20  5:50 ` Jeremiah Dodds
@ 2012-06-20  7:23   ` Laurent Hoeltgen
  2012-06-20 12:41     ` Jeremiah Dodds
  0 siblings, 1 reply; 7+ messages in thread
From: Laurent Hoeltgen @ 2012-06-20  7:23 UTC (permalink / raw)
  To: Jeremiah Dodds; +Cc: help-gnu-emacs

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



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: electric pair mode and latex
  2012-06-20  7:23   ` Laurent Hoeltgen
@ 2012-06-20 12:41     ` Jeremiah Dodds
  2012-06-21  3:16       ` Laurent Hoeltgen
  0 siblings, 1 reply; 7+ messages in thread
From: Jeremiah Dodds @ 2012-06-20 12:41 UTC (permalink / raw)
  To: Laurent Hoeltgen; +Cc: help-gnu-emacs

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) ? 



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: electric pair mode and latex
  2012-06-20  5:41 Laurent Hoeltgen
  2012-06-20  5:50 ` Jeremiah Dodds
@ 2012-06-20 13:58 ` Andreas Röhler
  1 sibling, 0 replies; 7+ messages in thread
From: Andreas Röhler @ 2012-06-20 13:58 UTC (permalink / raw)
  To: help-gnu-emacs@gnu.org List

Am 20.06.2012 07:41, schrieb Laurent Hoeltgen:
> 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
>
>

noted, as it's not so far away

https://blueprints.launchpad.net/s-x-emacs-werkstatt/+spec/electric



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: electric pair mode and latex
       [not found] <mailman.3091.1340170870.855.help-gnu-emacs@gnu.org>
@ 2012-06-20 16:15 ` Stefan Monnier
  0 siblings, 0 replies; 7+ messages in thread
From: Stefan Monnier @ 2012-06-20 16:15 UTC (permalink / raw)
  To: help-gnu-emacs

> 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)?

I don't think you can right now.  But patches to enable such things
would be welcome,


        Stefan


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: electric pair mode and latex
  2012-06-20 12:41     ` Jeremiah Dodds
@ 2012-06-21  3:16       ` Laurent Hoeltgen
  0 siblings, 0 replies; 7+ messages in thread
From: Laurent Hoeltgen @ 2012-06-21  3:16 UTC (permalink / raw)
  To: Jeremiah Dodds; +Cc: help-gnu-emacs

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




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-06-21  3:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.3091.1340170870.855.help-gnu-emacs@gnu.org>
2012-06-20 16:15 ` electric pair mode and latex Stefan Monnier
2012-06-20  5:41 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
2012-06-20 13:58 ` Andreas Röhler

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.