From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#19356: electric-pair-mode painful quotes in latex-mode Date: Sat, 13 Dec 2014 23:53:06 -0500 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1418532869 24851 80.91.229.3 (14 Dec 2014 04:54:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 14 Dec 2014 04:54:29 +0000 (UTC) Cc: 19356@debbugs.gnu.org To: joaotavora@gmail.com (=?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?=) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Dec 14 05:54:22 2014 Return-path: Envelope-to: geb-bug-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 1Y01CH-00080T-69 for geb-bug-gnu-emacs@m.gmane.org; Sun, 14 Dec 2014 05:54:21 +0100 Original-Received: from localhost ([::1]:35012 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y01CG-0003wA-PH for geb-bug-gnu-emacs@m.gmane.org; Sat, 13 Dec 2014 23:54:20 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37518) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y01C6-0003w3-2k for bug-gnu-emacs@gnu.org; Sat, 13 Dec 2014 23:54:17 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y01By-0008Sr-I3 for bug-gnu-emacs@gnu.org; Sat, 13 Dec 2014 23:54:10 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:35812) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y01By-0008Sm-F2 for bug-gnu-emacs@gnu.org; Sat, 13 Dec 2014 23:54:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Y01By-0007jC-3J for bug-gnu-emacs@gnu.org; Sat, 13 Dec 2014 23:54:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 14 Dec 2014 04:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19356 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 19356-submit@debbugs.gnu.org id=B19356.141853279429647 (code B ref 19356); Sun, 14 Dec 2014 04:54:02 +0000 Original-Received: (at 19356) by debbugs.gnu.org; 14 Dec 2014 04:53:14 +0000 Original-Received: from localhost ([127.0.0.1]:45178 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y01BC-0007i6-D8 for submit@debbugs.gnu.org; Sat, 13 Dec 2014 23:53:14 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:1180) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y01BA-0007hs-NZ for 19356@debbugs.gnu.org; Sat, 13 Dec 2014 23:53:13 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjwPAOwQflTO+ILA/2dsb2JhbABbgweDYIVaxR0EAgKBJBcBAQEBAQF8hAMBAQMBDkgPFAULCzQSFBgNUogcCdZZAQEBAQYBAQEBHpBvB4RIBYsBpC6BeIQZIYJ3AQEB X-IPAS-Result: AjwPAOwQflTO+ILA/2dsb2JhbABbgweDYIVaxR0EAgKBJBcBAQEBAQF8hAMBAQMBDkgPFAULCzQSFBgNUogcCdZZAQEBAQYBAQEBHpBvB4RIBYsBpC6BeIQZIYJ3AQEB X-IronPort-AV: E=Sophos;i="5.07,502,1413259200"; d="scan'208";a="101000801" Original-Received: from 206-248-130-192.dsl.teksavvy.com (HELO ceviche.home) ([206.248.130.192]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 13 Dec 2014 23:53:07 -0500 Original-Received: by ceviche.home (Postfix, from userid 20848) id E418D660D3; Sat, 13 Dec 2014 23:53:06 -0500 (EST) In-Reply-To: ("=?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?="'s message of "Sat, 13 Dec 2014 14:54:02 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:97306 Archived-At: > What kind of surrounding should take place? Should it be > ``wordityped'' > or should it be > "wordityped" > ? I think either way would be OK. I guess ideally C-M-SPC " should do ``wordityped'' and C-M-SPC " " should do "wordityped" but it's OK if we don't reach this ideal. > 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? I don't see the need to extend electric-pair's code for this use case, indeed, except if it can be done with a well-placed hook. > 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? I wouldn't punish you for it. > If it seems OK, I'll add some tests and commit it to the emacs-24 branch > (someone else will cherry-pick it to the master, right?). The patch looks OK. Installing it on emacs-24 sounds good, thank you (and no, it won't be cherry picked: it'll be merged instead). Stefan