From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Laurent Hoeltgen Newsgroups: gmane.emacs.help Subject: Re: electric pair mode and latex Date: Thu, 21 Jun 2012 05:16:32 +0200 Message-ID: <4FE29210.9040701@gmail.com> References: <4FE1626C.6070602@gmail.com> <87a9zyttu8.fsf@friendface.gateway.2wire.net> <4FE17A7A.8060504@gmail.com> <87zk7yp33e.fsf@friendface.i-did-not-set--mail-host-address--so-tickle-me> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1340248612 13321 80.91.229.3 (21 Jun 2012 03:16:52 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 21 Jun 2012 03:16:52 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Jeremiah Dodds Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jun 21 05:16:51 2012 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ShXt1-00046F-Cm for geh-help-gnu-emacs@m.gmane.org; Thu, 21 Jun 2012 05:16:47 +0200 Original-Received: from localhost ([::1]:58401 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ShXt0-0006qz-9J for geh-help-gnu-emacs@m.gmane.org; Wed, 20 Jun 2012 23:16:46 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:37761) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ShXsu-0006qI-7z for help-gnu-emacs@gnu.org; Wed, 20 Jun 2012 23:16:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ShXss-00047m-C0 for help-gnu-emacs@gnu.org; Wed, 20 Jun 2012 23:16:39 -0400 Original-Received: from mail-wg0-f41.google.com ([74.125.82.41]:53580) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ShXss-00047W-2y for help-gnu-emacs@gnu.org; Wed, 20 Jun 2012 23:16:38 -0400 Original-Received: by wgbds1 with SMTP id ds1so3840798wgb.0 for ; Wed, 20 Jun 2012 20:16:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; bh=yRuz0zVGtQlTSZ0sIkwRe6V5ha9jk6+gXkyPcIuzgrY=; b=KicjO3O/HcNHbPV4udCFzS8v0DtdO4YzXdRvbbK8OIEvJnVF1HMTKiKYXo9kRoMdgI 2cyg8rzj/TPwjJWYP9zjw7wE70Fhv6xATjUn+RIXvtEJDSLt1Kv9BVNy2H8b8xv1dDYR RV2IKMJIe3xFW+1KhV8jKl+7+Ogde7iuCbVwLUgoEX2FYtclE1EADVctfIBCNyc/9UpF OcgO2FJGRIGlgsVkgtUPblwBXAIh/CgfIngmv90dcMxzITCiedT3kaJGVCqu6a5oLqHL o9XNrez8U8W9SzX4MCB4JLTwEG0qzdzOBg+xEReX1wjcjkTNfrqtkBjBNpfKXErfaOnf FtDA== Original-Received: by 10.216.228.202 with SMTP id f52mr14054401weq.223.1340248595790; Wed, 20 Jun 2012 20:16:35 -0700 (PDT) Original-Received: from [192.168.178.26] (p57B3BC78.dip.t-dialin.net. [87.179.188.120]) by mx.google.com with ESMTPS id hs8sm33473697wib.10.2012.06.20.20.16.33 (version=SSLv3 cipher=OTHER); Wed, 20 Jun 2012 20:16:34 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux i686; rv:13.0) Gecko/20120615 Thunderbird/13.0.1 In-Reply-To: <87zk7yp33e.fsf@friendface.i-did-not-set--mail-host-address--so-tickle-me> X-Enigmail-Version: 1.4.2 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 74.125.82.41 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:85338 Archived-At: On 06/20/2012 02:41 PM, Jeremiah Dodds wrote: > Laurent Hoeltgen writes: > >> On 06/20/2012 07:50 AM, Jeremiah Dodds wrote: >>> Laurent Hoeltgen 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