From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 21 13:31:28 2021 Received: (at submit) by debbugs.gnu.org; 21 Apr 2021 17:31:28 +0000 Received: from localhost ([127.0.0.1]:59722 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lZGhE-0003dg-C1 for submit@debbugs.gnu.org; Wed, 21 Apr 2021 13:31:28 -0400 Received: from lists.gnu.org ([209.51.188.17]:33350) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lZGhB-0003dX-Nc for submit@debbugs.gnu.org; Wed, 21 Apr 2021 13:31:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48916) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lZGhB-0000xu-EL for bug-auctex@gnu.org; Wed, 21 Apr 2021 13:31:25 -0400 Received: from mout01.posteo.de ([185.67.36.65]:60625) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lZGh2-0001d6-KB for bug-auctex@gnu.org; Wed, 21 Apr 2021 13:31:25 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 598CB240028 for ; Wed, 21 Apr 2021 19:31:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1619026273; bh=5SGN0qCDn49dLorTexzUgLOeI2QdR5fhKcXWAZNFW6A=; h=From:To:Subject:Date:From; b=pIIAAAlexJJfNbKwVDXzFd5tuU/WK2lRUoS7ze/ey7XKKA6MwhN23Q6lAgRCa2S4H H/YNNZONc5bqTThbdTkIpF7jvGOyc15nkpnV0ub6L8Y2pPq3cjnKzj5RYNBkHBkP+w AgTVAYcfwy7IrVAOsh8L3uSPbLCJtd6jvkL9jyaQQTbp2u6RWvA23efpOoNfgYo+yz iy2858xkgozVwhGN4oHOBPjag828iytr0a5KERnAQ+1MTXJz8JouXNtVJIcwJ95zcd vNZ3C6xPZgqeS5Qm6i6j/PtpNF8aMc0NMS+NWaA1PG/0aVhn34VgQmoR/acHNO0Hrb Be9kkKFaeYwdQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4FQSJb2Pjtz9rxN for ; Wed, 21 Apr 2021 19:31:11 +0200 (CEST) From: Philip Kaludercic To: bug-auctex@gnu.org Subject: AucTeX and electric-pair-mode Date: Wed, 21 Apr 2021 17:31:10 +0000 Message-ID: <87zgxrv929.fsf@posteo.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=185.67.36.65; envelope-from=philipk@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --=-=-= Content-Type: text/plain Hi, an annoyance I have with auctex is it's interaction with electric-pair-mode. If both LaTeX-electric-left-right-brace and electric-pair-mode are enabled, typing '(' inserts "())", because both AucTeX and the electric function insert a closing parentheses. I still want to keep LaTeX-electric-left-right-brace enabled, because it handles TeX-specific parentheses (\{, \left , ...) better. I'm not sure if there is a real fix for this, but I couldn't find anything and my go-to solution of locally removing electric-pair-post-self-insert-function from post-self-insert-hook is also unstable. The attached patch would propose a solution that respects electric-pair-mode and doesn't insert an extra closing pair if enabled. It seems to work on my system, and if there are no issues it would be great if something along these lines could be done to avoid this behaviour. -- Philip K. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Improve-handling-for-parentheses-with-electric-pair-.patch >From d47f68ddf8c7d1d9c90adbc2ea9ee09588010ce3 Mon Sep 17 00:00:00 2001 From: Philip K Date: Wed, 21 Apr 2021 19:25:16 +0200 Subject: [PATCH] Improve handling for parentheses with electric-pair-mode --- latex.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/latex.el b/latex.el index 83d50caf..512639d5 100644 --- a/latex.el +++ b/latex.el @@ -2979,6 +2979,8 @@ is nil, consult user which brace should be used." (if rmacro (insert TeX-esc rmacro)) (cond + ((and (string= (char-to-string last-command-event) lbrace) + electric-pair-mode)) ((and TeX-arg-right-insert-p rbrace) (insert rbrace)) (rmacro -- 2.30.2 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 21 16:09:20 2021 Received: (at submit) by debbugs.gnu.org; 21 Apr 2021 20:09:20 +0000 Received: from localhost ([127.0.0.1]:59877 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lZJA0-0001B3-Ai for submit@debbugs.gnu.org; Wed, 21 Apr 2021 16:09:20 -0400 Received: from lists.gnu.org ([209.51.188.17]:50806) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lZJ9w-0001Au-ST for submit@debbugs.gnu.org; Wed, 21 Apr 2021 16:09:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52358) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lZJ9v-0005Ga-5X for bug-auctex@gnu.org; Wed, 21 Apr 2021 16:09:15 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:34736) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lZJ9u-0007WM-EK; Wed, 21 Apr 2021 16:09:14 -0400 Received: from auth2-smtp.messagingengine.com ([66.111.4.228]:35183) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.82) (envelope-from ) id 1lZJ9u-0004sG-0F; Wed, 21 Apr 2021 16:09:14 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailauth.nyi.internal (Postfix) with ESMTP id AB83627C0054; Wed, 21 Apr 2021 16:09:13 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Wed, 21 Apr 2021 16:09:13 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvddtkedgudegkecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpehffgfhvffuffgjkfggtgesthdtredttdertdenucfhrhhomhepvfgrshhs ihhlohcujfhorhhnuceothhsughhsehgnhhurdhorhhgqeenucggtffrrghtthgvrhhnpe evveeikeetkeeviefgfeffiedvteeguddvffeuueduveegtddthedvhfeuveffhfenucfk phepkeejrdduieefrdefuddrudehgeenucevlhhushhtvghrufhiiigvpedtnecurfgrrh grmhepmhgrihhlfhhrohhmpehthhhorhhnodhmvghsmhhtphgruhhthhhpvghrshhonhgr lhhithihqdekieejfeekjeekgedqieefhedvleekqdhtshguhheppehgnhhurdhorhhgse hfrghsthhmrghilhdrfhhm X-ME-Proxy: Received: from thinkpad-t440p (p57a31f9a.dip0.t-ipconnect.de [87.163.31.154]) by mail.messagingengine.com (Postfix) with ESMTPA id 84EB4240054; Wed, 21 Apr 2021 16:09:12 -0400 (EDT) References: <87zgxrv929.fsf@posteo.net> User-agent: mu4e 1.5.11; emacs 28.0.50 From: Tassilo Horn To: Philip Kaludercic Subject: Re: bug#47936: AucTeX and electric-pair-mode Date: Wed, 21 Apr 2021 21:54:57 +0200 In-reply-to: <87zgxrv929.fsf@posteo.net> Message-ID: <87y2dbqu1k.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit Cc: 47936-done@debbugs.gnu.org, bug-auctex@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Philip Kaludercic writes: Hi Philip, > an annoyance I have with auctex is it's interaction with > electric-pair-mode. If both LaTeX-electric-left-right-brace and > electric-pair-mode are enabled, typing '(' inserts "())", because both > AucTeX and the electric function insert a closing parentheses. I still > want to keep LaTeX-electric-left-right-brace enabled, because it > handles TeX-specific parentheses (\{, \left , ...) better. Ok, makes sense. > The attached patch would propose a solution that respects > electric-pair-mode and doesn't insert an extra closing pair if > enabled. > @@ -2979,6 +2979,8 @@ is nil, consult user which brace should be used." > (if rmacro > (insert TeX-esc rmacro)) > (cond > + ((and (string= (char-to-string last-command-event) lbrace) > + electric-pair-mode)) > ((and TeX-arg-right-insert-p rbrace) > (insert rbrace)) > (rmacro LGTM, I've applied it with slight modifications and a ChangeLog style commit message following our/Emacs conventions. Thanks a lot, Philip! Bye, Tassilo From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 22 00:33:45 2021 Received: (at 47936) by debbugs.gnu.org; 22 Apr 2021 04:33:45 +0000 Received: from localhost ([127.0.0.1]:60322 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lZR28-0002zM-VX for submit@debbugs.gnu.org; Thu, 22 Apr 2021 00:33:45 -0400 Received: from smtp1a.inetd.co.jp ([210.129.88.11]:60810) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lZR23-0002z6-KO for 47936@debbugs.gnu.org; Thu, 22 Apr 2021 00:33:43 -0400 Received: from localhost (42-146-120-70.rev.home.ne.jp [42.146.120.70]) by smtp1a.inetd.co.jp (Postfix) with ESMTPA id 9123F246; Thu, 22 Apr 2021 13:33:36 +0900 (JST) To: Philip Kaludercic Subject: Re: bug#47936: AucTeX and electric-pair-mode In-reply-to: <87zgxrv929.fsf@posteo.net> References: <87zgxrv929.fsf@posteo.net> Comments: In-reply-to Philip Kaludercic message dated "Wed, 21 Apr 2021 17:31:10 +0000." X-Mailer: MH-E 8.6+git; nmh 1.7.1; GNU Emacs 27.2 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" From: Ikumi Keita Date: Thu, 22 Apr 2021 13:33:34 +0900 Message-ID: <17324.1619066014@localhost> X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 47936 Cc: 47936@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Hi Philip, >>>>> Philip Kaludercic writes: > an annoyance I have with auctex is it's interaction with > electric-pair-mode. If both LaTeX-electric-left-right-brace and > electric-pair-mode are enabled, typing '(' inserts "())", because both > AucTeX and the electric function insert a closing parentheses. I still > want to keep LaTeX-electric-left-right-brace enabled, because it handles > TeX-specific parentheses (\{, \left , ...) better. AUCTeX already has the following code in `LaTeX-common-initialization' to turn off `electric-pair-mode' explicitly. So I guess you customize `LaTeX-mode-hook' to re-enable `electric-pair-mode'. ;; AUCTeX's brace pairing feature (`LaTeX-electric-left-right-brace') doesn't ;; play nice with `electric-pair-mode' which is a global minor mode as of ;; emacs 24.4. (when (and LaTeX-electric-left-right-brace (boundp 'electric-pair-mode)) (set (make-local-variable 'electric-pair-mode) nil)) > The attached patch would propose a solution that respects > electric-pair-mode and doesn't insert an extra closing pair if > enabled. It seems to work on my system, and if there are no issues it > would be great if something along these lines could be done to avoid > this behaviour. Thanks. Maybe the attached patch might be better so that `LaTeX-insert-left-brace' can get rid of all unexpected interactions with `self-insert-command'. Tassilo, what do you think about it? Regards, Ikumi Keita --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=diff diff --git a/latex.el b/latex.el index 83d50caf..7e14de75 100644 --- a/latex.el +++ b/latex.el @@ -2899,7 +2899,7 @@ Normally bound to keys \(, { and [." (TeX-active-mark) (> (point) (mark))) (exchange-point-and-mark)) - (self-insert-command (prefix-numeric-value arg)) + (insert (make-string (prefix-numeric-value arg) last-command-event)) (if auto-p (let ((lbrace (char-to-string last-command-event)) lmacro skip-p) (save-excursion @@ -6810,13 +6810,6 @@ function would return non-nil and `(match-string 1)' would return (define-key LaTeX-mode-map "\C-xne" #'LaTeX-narrow-to-environment) - ;; AUCTeX's brace pairing feature (`LaTeX-electric-left-right-brace') doesn't - ;; play nice with `electric-pair-mode' which is a global minor mode as of - ;; emacs 24.4. - (when (and LaTeX-electric-left-right-brace - (boundp 'electric-pair-mode)) - (set (make-local-variable 'electric-pair-mode) nil)) - ;; Initialization of `add-log-current-defun-function': (set (make-local-variable 'add-log-current-defun-function) #'TeX-current-defun-name)) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 22 01:03:40 2021 Received: (at submit) by debbugs.gnu.org; 22 Apr 2021 05:03:40 +0000 Received: from localhost ([127.0.0.1]:60412 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lZRV6-0003m5-CN for submit@debbugs.gnu.org; Thu, 22 Apr 2021 01:03:40 -0400 Received: from lists.gnu.org ([209.51.188.17]:47714) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lZRV2-0003lw-Ft for submit@debbugs.gnu.org; Thu, 22 Apr 2021 01:03:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52322) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lZRV2-0000RD-9l for bug-auctex@gnu.org; Thu, 22 Apr 2021 01:03:36 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:42220) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lZRUz-0000Fq-KM; Thu, 22 Apr 2021 01:03:33 -0400 Received: from auth1-smtp.messagingengine.com ([66.111.4.227]:39295) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.82) (envelope-from ) id 1lZRUw-0005v5-VI; Thu, 22 Apr 2021 01:03:31 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailauth.nyi.internal (Postfix) with ESMTP id D6C8C27C0054; Thu, 22 Apr 2021 01:03:29 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Thu, 22 Apr 2021 01:03:29 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvddtledgledtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfhgfhffvufffjgfkgggtsehttdertddtredtnecuhfhrohhmpefvrghsshhi lhhoucfjohhrnhcuoehtshguhhesghhnuhdrohhrgheqnecuggftrfgrthhtvghrnhepve evieekteekveeigfefffeivdetgeduvdffueeuudevgedttdehvdfhueevfffhnecukfhp peekjedrudeifedrfedurdduheegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrg hmpehmrghilhhfrhhomhepthhhohhrnhdomhgvshhmthhprghuthhhphgvrhhsohhnrghl ihhthidqkeeijeefkeejkeegqdeifeehvdelkedqthhsughhpeepghhnuhdrohhrghesfh grshhtmhgrihhlrdhfmh X-ME-Proxy: Received: from thinkpad-t440p (p57a31f9a.dip0.t-ipconnect.de [87.163.31.154]) by mail.messagingengine.com (Postfix) with ESMTPA id 511DA24005B; Thu, 22 Apr 2021 01:03:28 -0400 (EDT) References: <87zgxrv929.fsf@posteo.net> <17324.1619066014@localhost> User-agent: mu4e 1.5.11; emacs 28.0.50 From: Tassilo Horn To: Ikumi Keita Subject: Re: bug#47936: AucTeX and electric-pair-mode Date: Thu, 22 Apr 2021 06:56:06 +0200 In-reply-to: <17324.1619066014@localhost> Message-ID: <87mttq6hcy.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit Cc: 47936@debbugs.gnu.org, bug-auctex@gnu.org, Philip Kaludercic X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Ikumi Keita writes: > AUCTeX already has the following code in `LaTeX-common-initialization' > to turn off `electric-pair-mode' explicitly. Oh, I've already forgotten. :-) > Thanks. Maybe the attached patch might be better so that > `LaTeX-insert-left-brace' can get rid of all unexpected interactions > with `self-insert-command'. Tassilo, what do you think about it? Ah, yes, that's a a much better idea! Feel free to install it and undo Philip's change which shouldn't be needed anymore when not using `self-insert-command'. Thanks, Tassilo From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 22 01:47:09 2021 Received: (at submit) by debbugs.gnu.org; 22 Apr 2021 05:47:09 +0000 Received: from localhost ([127.0.0.1]:60507 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lZSBB-00053Z-CU for submit@debbugs.gnu.org; Thu, 22 Apr 2021 01:47:09 -0400 Received: from lists.gnu.org ([209.51.188.17]:38014) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lZSB9-00053R-Q4 for submit@debbugs.gnu.org; Thu, 22 Apr 2021 01:47:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36612) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lZSB9-00078B-GC for bug-auctex@gnu.org; Thu, 22 Apr 2021 01:47:07 -0400 Received: from smtp1a.inetd.co.jp ([210.129.88.11]:35684) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lZSB7-0000UL-4w; Thu, 22 Apr 2021 01:47:07 -0400 Received: from localhost (42-146-120-70.rev.home.ne.jp [42.146.120.70]) by smtp1a.inetd.co.jp (Postfix) with ESMTPA id 9B25B246; Thu, 22 Apr 2021 14:46:58 +0900 (JST) From: Ikumi Keita To: Tassilo Horn Subject: Re: bug#47936: AucTeX and electric-pair-mode In-reply-to: <87mttq6hcy.fsf@gnu.org> References: <87zgxrv929.fsf@posteo.net> <17324.1619066014@localhost> <87mttq6hcy.fsf@gnu.org> Comments: In-reply-to Tassilo Horn message dated "Thu, 22 Apr 2021 06:56:06 +0200." X-Mailer: MH-E 8.6+git; nmh 1.7.1; GNU Emacs 27.2 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <4057.1619070416.1@localhost> Date: Thu, 22 Apr 2021 14:46:56 +0900 Message-ID: <4058.1619070416@localhost> Received-SPF: pass client-ip=210.129.88.11; envelope-from=ikumi@ikumi.que.jp; helo=smtp1a.inetd.co.jp X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit Cc: 47936@debbugs.gnu.org, bug-auctex@gnu.org, Philip Kaludercic X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) >>>>> Tassilo Horn writes: > Ah, yes, that's a a much better idea! Feel free to install it and undo > Philip's change which shouldn't be needed anymore when not using > `self-insert-command'. Done! Bye, Ikumi Keita From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 22 08:08:51 2021 Received: (at 47936) by debbugs.gnu.org; 22 Apr 2021 12:08:51 +0000 Received: from localhost ([127.0.0.1]:33122 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lZY8Y-0004km-Ve for submit@debbugs.gnu.org; Thu, 22 Apr 2021 08:08:51 -0400 Received: from smtp1a.inetd.co.jp ([210.129.88.11]:33950) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lZY8V-0004kb-Uo for 47936@debbugs.gnu.org; Thu, 22 Apr 2021 08:08:49 -0400 Received: from localhost (42-146-120-70.rev.home.ne.jp [42.146.120.70]) by smtp1a.inetd.co.jp (Postfix) with ESMTPA id DFFF2248; Thu, 22 Apr 2021 21:08:45 +0900 (JST) From: Ikumi Keita To: Tassilo Horn Subject: Re: bug#47936: AucTeX and electric-pair-mode In-reply-to: <87mttq6hcy.fsf@gnu.org> References: <87zgxrv929.fsf@posteo.net> <17324.1619066014@localhost> <87mttq6hcy.fsf@gnu.org> Comments: In-reply-to Tassilo Horn message dated "Thu, 22 Apr 2021 06:56:06 +0200." X-Mailer: MH-E 8.6+git; nmh 1.7.1; GNU Emacs 27.2 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <6098.1619093321.1@localhost> Date: Thu, 22 Apr 2021 21:08:41 +0900 Message-ID: <6099.1619093321@localhost> X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 47936 Cc: 47936@debbugs.gnu.org, bug-auctex@gnu.org, Philip Kaludercic X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >>>>> Tassilo Horn writes: > Ikumi Keita writes: >> AUCTeX already has the following code in `LaTeX-common-initialization' >> to turn off `electric-pair-mode' explicitly. > Oh, I've already forgotten. :-) >> Thanks. Maybe the attached patch might be better so that >> `LaTeX-insert-left-brace' can get rid of all unexpected interactions >> with `self-insert-command'. Tassilo, what do you think about it? > Ah, yes, that's a a much better idea! Feel free to install it and undo > Philip's change which shouldn't be needed anymore when not using > `self-insert-command'. I reconsidered it and committed a modification so that `LaTeX-insert-left-brace' suppresses such interaction only when it inserts the right delimeter by itself. Now `electric-pair-mode' does its job when e.g. prefix argument is given. Regards, Ikumi Keita From unknown Tue Aug 19 07:26:02 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 21 May 2021 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator