From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#4136: 23.1; delete-pair Date: Tue, 22 Sep 2020 21:18:23 +0300 Organization: LINKOV.NET Message-ID: <873639eq9o.fsf@mail.linkov.net> References: <19075.45378.67131.491453@winooski.ccs.neu.edu> <87ljlk4snf.fsf@mail.jurta.org> <87eirfs56q.fsf@mail.jurta.org> <19076.47996.128071.281272@winooski.ccs.neu.edu> <87pray9ezq.fsf@mail.jurta.org> <19078.4981.525959.210519@winooski.ccs.neu.edu> <87ab20znhd.fsf@mail.jurta.org> <19079.19478.357436.68768@winooski.ccs.neu.edu> <87k5131d3d.fsf@mail.jurta.org> <19080.51949.798286.416193@winooski.ccs.neu.edu> <87ocqezdfd.fsf@mail.jurta.org> <4A8A549E.20605@gmx.at> <87r1r48n82.fsf@gnus.org> <874ko0rx9s.fsf@mail.linkov.net> <87imcf9qe1.fsf@gnus.org> <87sgbjosqp.fsf@mail.linkov.net> <871rj0qx76.fsf@gnus.org> <87mu1npjmj.fsf@mail.linkov.net> <87wo0rjqpu.fsf@gnus.org> <871rivdrqy.fsf@mail.linkov.net> <873639j2fk.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18629"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) Cc: Eli Barzilay , 4136@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Sep 22 20:20:13 2020 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 1kKmth-0004j5-40 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 22 Sep 2020 20:20:13 +0200 Original-Received: from localhost ([::1]:41346 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kKmtf-0005cL-RD for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 22 Sep 2020 14:20:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53408) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kKmtW-0005bZ-BF for bug-gnu-emacs@gnu.org; Tue, 22 Sep 2020 14:20:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50007) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kKmtW-0008Vu-11 for bug-gnu-emacs@gnu.org; Tue, 22 Sep 2020 14:20:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kKmtV-0001oT-SF for bug-gnu-emacs@gnu.org; Tue, 22 Sep 2020 14:20:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 22 Sep 2020 18:20:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 4136 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo fixed Original-Received: via spool by 4136-submit@debbugs.gnu.org id=B4136.16007987566882 (code B ref 4136); Tue, 22 Sep 2020 18:20:01 +0000 Original-Received: (at 4136) by debbugs.gnu.org; 22 Sep 2020 18:19:16 +0000 Original-Received: from localhost ([127.0.0.1]:33312 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kKmsm-0001mv-65 for submit@debbugs.gnu.org; Tue, 22 Sep 2020 14:19:16 -0400 Original-Received: from relay2-d.mail.gandi.net ([217.70.183.194]:44209) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kKmsj-0001me-0R for 4136@debbugs.gnu.org; Tue, 22 Sep 2020 14:19:14 -0400 X-Originating-IP: 91.129.108.13 Original-Received: from mail.gandi.net (m91-129-108-13.cust.tele2.ee [91.129.108.13]) (Authenticated sender: juri@linkov.net) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 8CD4040002; Tue, 22 Sep 2020 18:19:04 +0000 (UTC) In-Reply-To: <873639j2fk.fsf@gnus.org> (Lars Ingebrigtsen's message of "Tue, 22 Sep 2020 16:45:03 +0200") 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:188733 Archived-At: >> If it's really impossible to delete a pair in text-mode, then better >> to signal an error. > > OK; I've reapplied the patch and fixed the test, and I'm now re-closing > this bug report. Thanks. Every time I delete a pair of quotes in a long string, or a pair of parens in a long sexp, it makes me feel uneasy since I worry whether it deleted the intended characters or not. How about using the same delay blink-matching-delay that is used after showing a matching paren, but in this case to show a character at the other end of the pair with a delay before deleting it? This is achievable with this patch: diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el index ac4ba78897..88e1b26af3 100644 --- a/lisp/emacs-lisp/lisp.el +++ b/lisp/emacs-lisp/lisp.el @@ -752,6 +752,8 @@ delete-pair (if (= (length p) 3) (cdr p) p)) insert-pair-alist)) (error "Not after matching pair")) + (when blink-matching-paren + (sit-for blink-matching-delay)) (delete-char 1))) (delete-char -1)) (save-excursion @@ -764,6 +766,8 @@ delete-pair (if (= (length p) 3) (cdr p) p)) insert-pair-alist)) (error "Not before matching pair")) + (when blink-matching-paren + (sit-for blink-matching-delay)) (delete-char -1))) (delete-char 1))))