From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#50236: 27.2; electric-pair-mode is inconvenient in comint Date: Wed, 24 Aug 2022 12:19:35 +0200 Message-ID: <87k06yoseg.fsf@gnus.org> References: <87bl5heuva.fsf@gmail.com> <87zgn4nxv7.fsf@gmail.com> <87tu642sso.fsf@gnus.org> <87v8qk5kit.fsf@gmail.com> <875yijuvzf.fsf@gnus.org> <87tu62sxt7.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1817"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 50236@debbugs.gnu.org To: Augusto Stoffel Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Aug 24 14:05:34 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oQp8Y-0000CI-Kq for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 24 Aug 2022 14:05:34 +0200 Original-Received: from localhost ([::1]:47242 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oQp8X-0001UB-JX for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 24 Aug 2022 08:05:33 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59762) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oQnUR-000883-11 for bug-gnu-emacs@gnu.org; Wed, 24 Aug 2022 06:20:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55947) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oQnUQ-0007bv-MR for bug-gnu-emacs@gnu.org; Wed, 24 Aug 2022 06:20:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oQnUQ-0006AA-Au for bug-gnu-emacs@gnu.org; Wed, 24 Aug 2022 06:20:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 24 Aug 2022 10:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50236 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 50236-submit@debbugs.gnu.org id=B50236.166133638823664 (code B ref 50236); Wed, 24 Aug 2022 10:20:02 +0000 Original-Received: (at 50236) by debbugs.gnu.org; 24 Aug 2022 10:19:48 +0000 Original-Received: from localhost ([127.0.0.1]:45696 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oQnUC-00069c-9g for submit@debbugs.gnu.org; Wed, 24 Aug 2022 06:19:48 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:47984) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oQnUB-00069O-E7 for 50236@debbugs.gnu.org; Wed, 24 Aug 2022 06:19:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=OJ5YHYufNYoIEo74JZMYc5Wtkdlovax48a7bz/+VKW4=; b=CCxeq1K3tbSCBGxsy/fad56pg8 VOl5c0tWjpwSeDAjcwzsz2roYuXGamFWhoyPSwGChgPuPNQPGReP89wSdmICHa2UKhll4tAVX7eNt gWlxC475zxz6PpFDTgxNVnR+4FMnBaHEOjKo+OJes/7p5uFWloQOL3ZECmMYK8EUT/eE=; Original-Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oQnU3-0004Jx-3N; Wed, 24 Aug 2022 12:19:41 +0200 In-Reply-To: <87tu62sxt7.fsf@gmail.com> (Augusto Stoffel's message of "Tue, 23 Aug 2022 18:56:52 +0200") Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAD1BMVEUfWT/brS2Abn3g zrX///8fLI/6AAAAAWJLR0QEj2jZUQAAAAd0SU1FB+YIGAoHLjcUeFAAAAFxSURBVDjLdZSJtcQg CEWVaUBjA4oNROm/t8/iku0zc+ZErjwQyTg3zAdwcLi3efnJb/+Hawh9w6i+8gr3h62CLeGZAi1w BbA+6ArxkO0rwM8d7Au3zNPCjygR1UbnA1Qa1iE/QJvAItoTNO1QLwXZfWCeUq35KIAIay1X0PVE vVPH2lK9AK0KsddOLe0IMtCZEMWDw+6AM/SOnJz1zL0BIYMSBohLiiWQqzpVKvFhBuAkRKXXc+ZI s6ph+ae1rnL/NWmTdiuIpMQg7rYn/jCopG3Il/vgYgIC8hcWaPM+0GFmGTAlaDOJRGRw+Lpzbgo7 4QYaJ6cTlKDLloNUics8IYMwyCtC9gtgIU4jYyxXm6xai1CVzJt5ENU/gVQ7cmipqdmYQUaZ4rw7 IrPZudHaa8t9KClc1qlXsA64BlyGL+5x57fD20oqLAEuIF5e0v3s3QDewpZWvD/oqaJVO/caL8Pv 4iXDPTa8wNdfzf1kn+APysxK5VK9dhMAAAAldEVYdGRhdGU6Y3JlYXRlADIwMjItMDgtMjRUMTA6 MDc6NDYrMDA6MDCzKa94AAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIyLTA4LTI0VDEwOjA3OjQ2KzAw OjAwwnQXxAAAAABJRU5ErkJggg== X-Now-Playing: The Flying Lizards's _The Flying Lizards_: "The Window" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:240603 Archived-At: Augusto Stoffel writes: > This makes sense. However, in comint the "input" field has no field > property; only the output is labeled as such. So the suggestion to do > something special if inside a field wouldn't solve the original problem > described in the bug. Ah, right. > So the conclusion seems to be that a comint-specific > electric-pair-skip-self function is needed (namely, one that narrows to > the current field provided the current field property is nil, to avoid > those performance issues.) The other possible solution (that I mentioned, but didn't expand on) is that we could just fix this in electric-pair without relying on narrow-to-field. That is, once electric-pair has found the matching pair, we just look at the region between the two chars and see whether they are part of the same field. That should be reasonably fast, since electric-pair already limits the range it's willing to search for a pair.