From unknown Sat Jun 14 03:55:06 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4136: 23.1; delete-pair Reply-To: Eli Barzilay , 4136@debbugs.gnu.org Resent-From: Eli Barzilay Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Thu, 13 Aug 2009 06:30:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: report 4136 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.125014458810884 (code B ref -1); Thu, 13 Aug 2009 06:30:04 +0000 Received: (at submit) by emacsbugs.donarmstrong.com; 13 Aug 2009 06:23:08 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-0.8 required=4.0 tests=AWL,FOURLA autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7D6N6MM010881 for ; Wed, 12 Aug 2009 23:23:08 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MbTiM-00050v-DY for bug-gnu-emacs@gnu.org; Thu, 13 Aug 2009 02:23:06 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MbTiG-000505-11 for bug-gnu-emacs@gnu.org; Thu, 13 Aug 2009 02:23:05 -0400 Received: from [199.232.76.173] (port=48264 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MbTiF-0004zy-OZ for bug-gnu-emacs@gnu.org; Thu, 13 Aug 2009 02:22:59 -0400 Received: from winooski.ccs.neu.edu ([129.10.115.117]:57654 helo=barzilay.org) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MbTiF-0004uO-F2 for bug-gnu-emacs@gnu.org; Thu, 13 Aug 2009 02:22:59 -0400 Received: from eli by barzilay.org with local (Exim 4.66) (envelope-from ) id 1MbTiE-0004P9-2U for bug-gnu-emacs@gnu.org; Thu, 13 Aug 2009 02:22:58 -0400 From: Eli Barzilay MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <19075.45378.67131.491453@winooski.ccs.neu.edu> Date: Thu, 13 Aug 2009 02:22:58 -0400 To: bug-gnu-emacs@gnu.org X-Mailer: VM 7.19 under Emacs 22.1.1 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) `delete-pair' is deleting what it documents -- instead of removing the open paren of the following sexp, it deletes the current one. So, if the cursor is on some whitespace that precedes an expression, the whitespace is deleted, and the open paren is left intact. In GNU Emacs 23.1.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.10.14) of 2009-08-01 on winooski.ccs.neu.edu Windowing system distributor `The X.Org Foundation', version 11.0.10300000 configured using `configure '--prefix=/home/eli/bin/local/emacs-dir'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: POSIX value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_US value of $XMODIFIERS: nil locale-coding-system: iso-latin-1-unix default-enable-multibyte-characters: t Major mode: Emacs-Lisp Minor modes in effect: cua-mode: t tooltip-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t global-auto-composition-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t temp-buffer-resize-mode: t line-number-mode: t transient-mark-mode: t From unknown Sat Jun 14 03:55:06 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4136: 23.1; delete-pair Reply-To: martin rudalics , 4136@debbugs.gnu.org Resent-From: martin rudalics Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Thu, 13 Aug 2009 10:00:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4136 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 4136-submit@emacsbugs.donarmstrong.com id=B4136.125015722013567 (code B ref 4136); Thu, 13 Aug 2009 10:00:03 +0000 Received: (at 4136) by emacsbugs.donarmstrong.com; 13 Aug 2009 09:53:40 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-4.4 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with SMTP id n7D9rcRB013556 for <4136@emacsbugs.donarmstrong.com>; Thu, 13 Aug 2009 02:53:39 -0700 Received: (qmail invoked by alias); 13 Aug 2009 09:53:31 -0000 Received: from 62-47-61-170.adsl.highway.telekom.at (EHLO [62.47.61.170]) [62.47.61.170] by mail.gmx.net (mp036) with SMTP; 13 Aug 2009 11:53:31 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX19cbkkBdjNcVvcI5hU/96RXNlZV9fgorPVj8Z5sN7 jT90yYTGRZX2ot Message-ID: <4A83E299.3060002@gmx.at> Date: Thu, 13 Aug 2009 11:53:29 +0200 From: martin rudalics User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: Eli Barzilay , 4136@debbugs.gnu.org References: <19075.45378.67131.491453@winooski.ccs.neu.edu> In-Reply-To: <19075.45378.67131.491453@winooski.ccs.neu.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.85 > `delete-pair' is deleting what it documents -- instead of removing the > open paren of the following sexp, it deletes the current one. So, if > the cursor is on some whitespace that precedes an expression, the > whitespace is deleted, and the open paren is left intact. `delete-pair' shouldn't delete anything but matching elements of `insert-pair-alist'. martin From unknown Sat Jun 14 03:55:06 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4136: 23.1; delete-pair Reply-To: Juri Linkov , 4136@debbugs.gnu.org Resent-From: Juri Linkov Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Thu, 13 Aug 2009 23:35:07 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4136 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 4136-submit@emacsbugs.donarmstrong.com id=B4136.12502062413298 (code B ref 4136); Thu, 13 Aug 2009 23:35:07 +0000 Received: (at 4136) by emacsbugs.donarmstrong.com; 13 Aug 2009 23:30:41 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.5 required=4.0 tests=AWL,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mx1.starman.ee (smtp-out1.starman.ee [85.253.0.3]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7DNUd0r003292 for <4136@emacsbugs.donarmstrong.com>; Thu, 13 Aug 2009 16:30:40 -0700 X-Virus-Scanned: by Amavisd-New at mx1.starman.ee Received: from mail.starman.ee (82.131.55.163.cable.starman.ee [82.131.55.163]) by mx1.starman.ee (Postfix) with ESMTP id 2FC383F43EF; Fri, 14 Aug 2009 02:30:31 +0300 (EEST) From: Juri Linkov To: Eli Barzilay Cc: 4136@debbugs.gnu.org Organization: JURTA References: <19075.45378.67131.491453@winooski.ccs.neu.edu> Date: Fri, 14 Aug 2009 02:28:21 +0300 In-Reply-To: <19075.45378.67131.491453@winooski.ccs.neu.edu> (Eli Barzilay's message of "Thu, 13 Aug 2009 02:22:58 -0400") Message-ID: <87eirfs56q.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii > `delete-pair' is deleting what it documents -- instead of removing the > open paren of the following sexp, it deletes the current one. So, if > the cursor is on some whitespace that precedes an expression, the > whitespace is deleted, and the open paren is left intact. This should be fixed with the following patch: Index: lisp/emacs-lisp/lisp.el =================================================================== RCS file: /sources/emacs/emacs/lisp/emacs-lisp/lisp.el,v retrieving revision 1.102 diff -u -r1.102 lisp.el --- lisp/emacs-lisp/lisp.el 22 Jul 2009 02:45:37 -0000 1.102 +++ lisp/emacs-lisp/lisp.el 13 Aug 2009 23:27:42 -0000 @@ -530,8 +530,12 @@ (defun delete-pair () "Delete a pair of characters enclosing the sexp that follows point." (interactive) - (save-excursion (forward-sexp 1) (delete-char -1)) - (delete-char 1)) + (save-excursion + (forward-sexp 1) + (save-excursion + (backward-sexp 1) + (delete-char 1)) + (delete-char -1))) (defun raise-sexp (&optional arg) "Raise ARG sexps higher up the tree." -- Juri Linkov http://www.jurta.org/emacs/ From unknown Sat Jun 14 03:55:06 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4136: 23.1; delete-pair Reply-To: Juri Linkov , 4136@debbugs.gnu.org Resent-From: Juri Linkov Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Thu, 13 Aug 2009 23:35:10 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4136 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 4136-submit@emacsbugs.donarmstrong.com id=B4136.12502062413301 (code B ref 4136); Thu, 13 Aug 2009 23:35:10 +0000 Received: (at 4136) by emacsbugs.donarmstrong.com; 13 Aug 2009 23:30:41 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.5 required=4.0 tests=AWL,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mx1.starman.ee (smtp-out1.starman.ee [85.253.0.3]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7DNUdGu003295 for <4136@emacsbugs.donarmstrong.com>; Thu, 13 Aug 2009 16:30:41 -0700 X-Virus-Scanned: by Amavisd-New at mx1.starman.ee Received: from mail.starman.ee (82.131.55.163.cable.starman.ee [82.131.55.163]) by mx1.starman.ee (Postfix) with ESMTP id A85343F43F0; Fri, 14 Aug 2009 02:30:31 +0300 (EEST) From: Juri Linkov To: martin rudalics Cc: 4136@debbugs.gnu.org, Eli Barzilay Organization: JURTA References: <19075.45378.67131.491453@winooski.ccs.neu.edu> <4A83E299.3060002@gmx.at> Date: Fri, 14 Aug 2009 02:29:09 +0300 In-Reply-To: <4A83E299.3060002@gmx.at> (martin rudalics's message of "Thu, 13 Aug 2009 11:53:29 +0200") Message-ID: <87tz0bqqhm.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii >> `delete-pair' is deleting what it documents -- instead of removing the >> open paren of the following sexp, it deletes the current one. So, if >> the cursor is on some whitespace that precedes an expression, the >> whitespace is deleted, and the open paren is left intact. > > `delete-pair' shouldn't delete anything but matching elements of > `insert-pair-alist'. This is rather vague semantics. I suggest to keep the current simple semantics and just to fix it with the patch I sent. -- Juri Linkov http://www.jurta.org/emacs/ From unknown Sat Jun 14 03:55:06 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4136: 23.1; delete-pair Reply-To: Eli Barzilay , 4136@debbugs.gnu.org Resent-From: Eli Barzilay Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 14 Aug 2009 01:25:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4136 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 4136-submit@emacsbugs.donarmstrong.com id=B4136.125021273721426 (code B ref 4136); Fri, 14 Aug 2009 01:25:06 +0000 Received: (at 4136) by emacsbugs.donarmstrong.com; 14 Aug 2009 01:18:57 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.2 required=4.0 tests=AWL,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8,SPF_HELO_PASS autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from barzilay.org (winooski.ccs.neu.edu [129.10.115.117]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7E1ItAj021423 for <4136@emacsbugs.donarmstrong.com>; Thu, 13 Aug 2009 18:18:56 -0700 Received: from eli by barzilay.org with local (Exim 4.66) (envelope-from ) id 1MblRU-0008UW-4V; Thu, 13 Aug 2009 21:18:52 -0400 From: Eli Barzilay MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <19076.47996.128071.281272@winooski.ccs.neu.edu> Date: Thu, 13 Aug 2009 21:18:52 -0400 To: martin rudalics , Juri Linkov Cc: 4136@debbugs.gnu.org In-Reply-To: <4A83E299.3060002@gmx.at> References: <19075.45378.67131.491453@winooski.ccs.neu.edu> <87eirfs56q.fsf@mail.jurta.org> <4A83E299.3060002@gmx.at> <87tz0bqqhm.fsf@mail.jurta.org> X-Mailer: VM 7.19 under Emacs 22.1.1 On Aug 13, martin rudalics wrote: > > `delete-pair' is deleting what it documents -- instead of removing the > > open paren of the following sexp, it deletes the current one. So, if > > the cursor is on some whitespace that precedes an expression, the > > whitespace is deleted, and the open paren is left intact. > > `delete-pair' shouldn't delete anything but matching elements of > `insert-pair-alist'. This is a very good point. On Aug 14, Juri Linkov wrote: > >> `delete-pair' is deleting what it documents -- instead of removing the > >> open paren of the following sexp, it deletes the current one. So, if > >> the cursor is on some whitespace that precedes an expression, the > >> whitespace is deleted, and the open paren is left intact. > > > > `delete-pair' shouldn't delete anything but matching elements of > > `insert-pair-alist'. > > This is rather vague semantics. I suggest to keep the current simple > semantics and just to fix it with the patch I sent. I disagree in two different ways: (a) it can be put into code, so it's not vague at all; (b) it sounds like a very good feature -- as it stands, this function is nearly useless without human supervision, which makes it useless for keyboard macros. Here is a version that checks that does exactly what Martin suggested. It even fails on something like (...] -- which is very useful for keyboard macros, since if you have that text in a buffer, then something is probably messed up enough to require your attention. (defun delete-pair () "Delete a pair of characters enclosing the sexp that follows point." (interactive) (save-excursion (let* ((end (progn (forward-sexp 1) (point))) (start (progn (forward-sexp -1) (point))) (start-ch (char-after start)) (end-ch (char-before end)) (match-p nil)) (let ((p insert-pair-alist)) (while p (let* ((q (car p)) (fst (if (= (length q) 3) 1 0)) (snd (1+ fst))) (if (and (equal start-ch (nth fst q)) (equal end-ch (nth snd q))) (setq p nil match-p t) (setq p (cdr p)))))) (if match-p (progn (delete-region (1- end) end) (delete-region start (1+ start))) (error "not a matching pair"))))) -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://barzilay.org/ Maze is Life! From unknown Sat Jun 14 03:55:06 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4136: 23.1; delete-pair Reply-To: martin rudalics , 4136@debbugs.gnu.org Resent-From: martin rudalics Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 14 Aug 2009 07:25:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4136 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 4136-submit@emacsbugs.donarmstrong.com id=B4136.125023423414733 (code B ref 4136); Fri, 14 Aug 2009 07:25:05 +0000 Received: (at 4136) by emacsbugs.donarmstrong.com; 14 Aug 2009 07:17:14 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-4.4 required=4.0 tests=AWL,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with SMTP id n7E7HCva014730 for <4136@emacsbugs.donarmstrong.com>; Fri, 14 Aug 2009 00:17:13 -0700 Received: (qmail invoked by alias); 14 Aug 2009 07:17:02 -0000 Received: from 62-47-41-235.adsl.highway.telekom.at (EHLO [62.47.41.235]) [62.47.41.235] by mail.gmx.net (mp064) with SMTP; 14 Aug 2009 09:17:02 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX18iT/0mpdgil6S9PHqgvBywvyjT3r1d+Hug0c1O6q tCjE/pYMfhhi9i Message-ID: <4A850F6C.2080205@gmx.at> Date: Fri, 14 Aug 2009 09:17:00 +0200 From: martin rudalics User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: Juri Linkov CC: 4136@debbugs.gnu.org, Eli Barzilay References: <19075.45378.67131.491453@winooski.ccs.neu.edu> <4A83E299.3060002@gmx.at> <87tz0bqqhm.fsf@mail.jurta.org> In-Reply-To: <87tz0bqqhm.fsf@mail.jurta.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.78 > This is rather vague semantics. I suggest to keep the current simple > semantics and just to fix it with the patch I sent. Before a quoted object your fixed version deletes the last character of the object and the first quote character. Handling quote or prefix syntax characters via (delete-char 1) doesn't strike me as very clean. martin From unknown Sat Jun 14 03:55:06 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4136: 23.1; delete-pair Reply-To: Stefan Monnier , 4136@debbugs.gnu.org Resent-From: Stefan Monnier Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 14 Aug 2009 15:55:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4136 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 4136-submit@emacsbugs.donarmstrong.com id=B4136.12502650171625 (code B ref 4136); Fri, 14 Aug 2009 15:55:05 +0000 Received: (at 4136) by emacsbugs.donarmstrong.com; 14 Aug 2009 15:50:17 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-4.3 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from chene.dit.umontreal.ca (chene.dit.umontreal.ca [132.204.246.20]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7EFoEu6001532 for <4136@emacsbugs.donarmstrong.com>; Fri, 14 Aug 2009 08:50:16 -0700 Received: from faina.iro.umontreal.ca (faina.iro.umontreal.ca [132.204.26.177]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id n7EFoCSA012612; Fri, 14 Aug 2009 11:50:12 -0400 Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 155083A0D1; Fri, 14 Aug 2009 11:50:12 -0400 (EDT) From: Stefan Monnier To: Eli Barzilay Cc: 4136@debbugs.gnu.org, martin rudalics , Juri Linkov Message-ID: References: <19075.45378.67131.491453@winooski.ccs.neu.edu> <87eirfs56q.fsf@mail.jurta.org> <4A83E299.3060002@gmx.at> <87tz0bqqhm.fsf@mail.jurta.org> <19076.47996.128071.281272@winooski.ccs.neu.edu> Date: Fri, 14 Aug 2009 11:50:12 -0400 In-Reply-To: <19076.47996.128071.281272@winooski.ccs.neu.edu> (Eli Barzilay's message of "Thu, 13 Aug 2009 21:18:52 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV3340=0 > Here is a version that checks that does exactly what Martin suggested. > It even fails on something like (...] -- which is very useful for > keyboard macros, since if you have that text in a buffer, then > something is probably messed up enough to require your attention. There's always a tension in such cases. E.g. for interactive use, I'd rather we allow such (..] cases, since it may occasionally come in handy (whereas the beep will come as a major annoyance, where Emacs will appear to the user as being dogmatic). Stefan From unknown Sat Jun 14 03:55:06 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4136: 23.1; delete-pair Reply-To: Juri Linkov , 4136@debbugs.gnu.org Resent-From: Juri Linkov Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 14 Aug 2009 23:10:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4136 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 4136-submit@emacsbugs.donarmstrong.com id=B4136.12502910669803 (code B ref 4136); Fri, 14 Aug 2009 23:10:04 +0000 Received: (at 4136) by emacsbugs.donarmstrong.com; 14 Aug 2009 23:04:26 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.6 required=4.0 tests=AWL,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mx1.starman.ee (smtp-out1.starman.ee [85.253.0.3]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7EN4PZf009798 for <4136@emacsbugs.donarmstrong.com>; Fri, 14 Aug 2009 16:04:26 -0700 X-Virus-Scanned: by Amavisd-New at mx1.starman.ee Received: from mail.starman.ee (82.131.30.119.cable.starman.ee [82.131.30.119]) by mx1.starman.ee (Postfix) with ESMTP id 8EB023F435E; Sat, 15 Aug 2009 02:04:19 +0300 (EEST) From: Juri Linkov To: martin rudalics Cc: 4136@debbugs.gnu.org, Eli Barzilay Organization: JURTA References: <19075.45378.67131.491453@winooski.ccs.neu.edu> <4A83E299.3060002@gmx.at> <87tz0bqqhm.fsf@mail.jurta.org> <4A850F6C.2080205@gmx.at> Date: Sat, 15 Aug 2009 01:45:03 +0300 In-Reply-To: <4A850F6C.2080205@gmx.at> (martin rudalics's message of "Fri, 14 Aug 2009 09:17:00 +0200") Message-ID: <873a7uc8mg.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii >> This is rather vague semantics. I suggest to keep the current simple >> semantics and just to fix it with the patch I sent. > > Before a quoted object your fixed version deletes the last character of > the object and the first quote character. Handling quote or prefix > syntax characters via (delete-char 1) doesn't strike me as very clean. This is fixed in the following version: (defun delete-pair () "Delete a pair of characters enclosing the sexp that follows point." (interactive) (save-excursion (forward-sexp 1) (save-excursion (backward-sexp 1) (skip-syntax-forward "'") (delete-char 1)) (delete-char -1))) -- Juri Linkov http://www.jurta.org/emacs/ From unknown Sat Jun 14 03:55:06 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4136: 23.1; delete-pair Reply-To: Juri Linkov , 4136@debbugs.gnu.org Resent-From: Juri Linkov Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 14 Aug 2009 23:10:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4136 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 4136-submit@emacsbugs.donarmstrong.com id=B4136.12502910679808 (code B ref 4136); Fri, 14 Aug 2009 23:10:06 +0000 Received: (at 4136) by emacsbugs.donarmstrong.com; 14 Aug 2009 23:04:27 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.6 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mx1.starman.ee (smtp-out1.starman.ee [85.253.0.3]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7EN4PDc009799 for <4136@emacsbugs.donarmstrong.com>; Fri, 14 Aug 2009 16:04:26 -0700 X-Virus-Scanned: by Amavisd-New at mx1.starman.ee Received: from mail.starman.ee (82.131.30.119.cable.starman.ee [82.131.30.119]) by mx1.starman.ee (Postfix) with ESMTP id 1AE843F4360; Sat, 15 Aug 2009 02:04:20 +0300 (EEST) From: Juri Linkov To: Eli Barzilay Cc: martin rudalics , 4136@debbugs.gnu.org Organization: JURTA References: <19075.45378.67131.491453@winooski.ccs.neu.edu> <87eirfs56q.fsf@mail.jurta.org> <4A83E299.3060002@gmx.at> <87tz0bqqhm.fsf@mail.jurta.org> <19076.47996.128071.281272@winooski.ccs.neu.edu> Date: Sat, 15 Aug 2009 01:45:45 +0300 In-Reply-To: <19076.47996.128071.281272@winooski.ccs.neu.edu> (Eli Barzilay's message of "Thu, 13 Aug 2009 21:18:52 -0400") Message-ID: <87pray9ezq.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii > Here is a version that checks that does exactly what Martin suggested. > It even fails on something like (...] -- which is very useful for > keyboard macros, since if you have that text in a buffer, then > something is probably messed up enough to require your attention. This command is useful even if it doesn't fail on (...] because forward-sexp and backward-sexp don't fail on (...]. It seems you and Martin prefer checking against the `insert-pair-alist' because the function name `delete-pair' suggests it should be a counterpart of `insert-pair'. In this case I think we sould have two commands: one more strict version `delete-pair' that checks `insert-pair-alist', and another loose version with the name e.g. `delete-parens' with the body of the current `delete-pair'. -- Juri Linkov http://www.jurta.org/emacs/ From unknown Sat Jun 14 03:55:06 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4136: 23.1; delete-pair Reply-To: Eli Barzilay , 4136@debbugs.gnu.org Resent-From: Eli Barzilay Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sat, 15 Aug 2009 01:55:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4136 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 4136-submit@emacsbugs.donarmstrong.com id=B4136.12503007936157 (code B ref 4136); Sat, 15 Aug 2009 01:55:05 +0000 Received: (at 4136) by emacsbugs.donarmstrong.com; 15 Aug 2009 01:46:33 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.5 required=4.0 tests=AWL,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8,SPF_HELO_PASS autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from barzilay.org (winooski.ccs.neu.edu [129.10.115.117]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7F1kVxT006154 for <4136@emacsbugs.donarmstrong.com>; Fri, 14 Aug 2009 18:46:32 -0700 Received: from eli by barzilay.org with local (Exim 4.66) (envelope-from ) id 1Mc8Ll-0008Hs-HK; Fri, 14 Aug 2009 21:46:29 -0400 From: Eli Barzilay MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <19078.4981.525959.210519@winooski.ccs.neu.edu> Date: Fri, 14 Aug 2009 21:46:29 -0400 To: Juri Linkov Cc: martin rudalics , 4136@debbugs.gnu.org In-Reply-To: <87pray9ezq.fsf@mail.jurta.org> References: <19075.45378.67131.491453@winooski.ccs.neu.edu> <4A83E299.3060002@gmx.at> <87tz0bqqhm.fsf@mail.jurta.org> <4A850F6C.2080205@gmx.at> <873a7uc8mg.fsf@mail.jurta.org> <87eirfs56q.fsf@mail.jurta.org> <19076.47996.128071.281272@winooski.ccs.neu.edu> <87pray9ezq.fsf@mail.jurta.org> X-Mailer: VM 7.19 under Emacs 22.1.1 On Aug 15, Juri Linkov wrote: > > Here is a version that checks that does exactly what Martin > > suggested. It even fails on something like (...] -- which is very > > useful for keyboard macros, since if you have that text in a > > buffer, then something is probably messed up enough to require > > your attention. > > This command is useful even if it doesn't fail on (...] because > forward-sexp and backward-sexp don't fail on (...]. Martin's example of '(blah) works better, but in general... > It seems you and Martin prefer checking against the > `insert-pair-alist' because the function name `delete-pair' suggests > it should be a counterpart of `insert-pair'. ...this is exactly the issue: it is much better if `delete-foo' is always an operation that reverts what `insert-foo' does. > In this case I think we sould have two commands: one more strict > version `delete-pair' that checks `insert-pair-alist', and another > loose version with the name e.g. `delete-parens' with the body of > the current `delete-pair'. The current state of `delete-pair' is so bad that my guess is that hardly anyone used it, so adding another command doesn't make much sense. How about making it do the proper thing (removing only balanced pairs as specified by `insert-pair-alist'), and ignoring errors with a prefix argument? On Aug 15, Juri Linkov wrote: > >> This is rather vague semantics. I suggest to keep the current > >> simple semantics and just to fix it with the patch I sent. > > > > Before a quoted object your fixed version deletes the last > > character of the object and the first quote character. Handling > > quote or prefix syntax characters via (delete-char 1) doesn't > > strike me as very clean. > > This is fixed in the following version: > [...] This version doesn't make much sense as an operation you'd want to do on code: (foo '(x y z)) --> (foo 'x y z) -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://barzilay.org/ Maze is Life! From unknown Sat Jun 14 03:55:06 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4136: 23.1; delete-pair Reply-To: martin rudalics , 4136@debbugs.gnu.org Resent-From: martin rudalics Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sat, 15 Aug 2009 10:20:07 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4136 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 4136-submit@emacsbugs.donarmstrong.com id=B4136.125033110027555 (code B ref 4136); Sat, 15 Aug 2009 10:20:07 +0000 Received: (at 4136) by emacsbugs.donarmstrong.com; 15 Aug 2009 10:11:40 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-4.4 required=4.0 tests=AWL,FOURLA,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with SMTP id n7FABbNv027550 for <4136@emacsbugs.donarmstrong.com>; Sat, 15 Aug 2009 03:11:39 -0700 Received: (qmail invoked by alias); 15 Aug 2009 10:11:31 -0000 Received: from 62-47-35-223.adsl.highway.telekom.at (EHLO [62.47.35.223]) [62.47.35.223] by mail.gmx.net (mp025) with SMTP; 15 Aug 2009 12:11:31 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX19h5ZVXDo5h8RlP86ICcUsGlaHoot0op3I7CdedYA gd0tniYN3bke1U Message-ID: <4A8689D1.3000408@gmx.at> Date: Sat, 15 Aug 2009 12:11:29 +0200 From: martin rudalics User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: Juri Linkov CC: Eli Barzilay , 4136@debbugs.gnu.org References: <19075.45378.67131.491453@winooski.ccs.neu.edu> <87eirfs56q.fsf@mail.jurta.org> <4A83E299.3060002@gmx.at> <87tz0bqqhm.fsf@mail.jurta.org> <19076.47996.128071.281272@winooski.ccs.neu.edu> <87pray9ezq.fsf@mail.jurta.org> In-Reply-To: <87pray9ezq.fsf@mail.jurta.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.74 > This command is useful even if it doesn't fail on (...] because > forward-sexp and backward-sexp don't fail on (...]. Is this carved in stone? The TODO file has ** (Controlled by a flag) make open and close syntax match exactly, i.e. `(' doesn't match `]'. I always wondered what that entry aimed at ... > It seems you and Martin prefer checking against the `insert-pair-alist' > because the function name `delete-pair' suggests it should be > a counterpart of `insert-pair'. In this case I think we sould have > two commands: one more strict version `delete-pair' that checks > `insert-pair-alist', and another loose version with the name e.g. > `delete-parens' with the body of the current `delete-pair'. In any case, removing the first and last character from a name doesn't strike me as very "pair-like" ;-) martin From unknown Sat Jun 14 03:55:06 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4136: 23.1; delete-pair Reply-To: martin rudalics , 4136@debbugs.gnu.org Resent-From: martin rudalics Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sat, 15 Aug 2009 10:20:10 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4136 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 4136-submit@emacsbugs.donarmstrong.com id=B4136.125033112927573 (code B ref 4136); Sat, 15 Aug 2009 10:20:10 +0000 Received: (at 4136) by emacsbugs.donarmstrong.com; 15 Aug 2009 10:12:09 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-4.4 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with SMTP id n7FAC6hW027568 for <4136@emacsbugs.donarmstrong.com>; Sat, 15 Aug 2009 03:12:08 -0700 Received: (qmail invoked by alias); 15 Aug 2009 10:12:01 -0000 Received: from 62-47-35-223.adsl.highway.telekom.at (EHLO [62.47.35.223]) [62.47.35.223] by mail.gmx.net (mp029) with SMTP; 15 Aug 2009 12:12:01 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX18dHGIrRKsdAMFacXUJcRy2Np8O0C2Hza7Jagm8Gw vxZ8Axu6OreSYg Message-ID: <4A8689EE.9020402@gmx.at> Date: Sat, 15 Aug 2009 12:11:58 +0200 From: martin rudalics User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: Juri Linkov CC: 4136@debbugs.gnu.org, Eli Barzilay References: <19075.45378.67131.491453@winooski.ccs.neu.edu> <4A83E299.3060002@gmx.at> <87tz0bqqhm.fsf@mail.jurta.org> <4A850F6C.2080205@gmx.at> <873a7uc8mg.fsf@mail.jurta.org> In-Reply-To: <873a7uc8mg.fsf@mail.jurta.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.73 > This is fixed in the following version: > > (defun delete-pair () > "Delete a pair of characters enclosing the sexp that follows point." > (interactive) > (save-excursion > (forward-sexp 1) > (save-excursion > (backward-sexp 1) > (skip-syntax-forward "'") > (delete-char 1)) > (delete-char -1))) Still doesn't seem TDTRT with `point' before something like `foo' martin From unknown Sat Jun 14 03:55:06 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4136: 23.1; delete-pair Reply-To: Juri Linkov , 4136@debbugs.gnu.org Resent-From: Juri Linkov Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sat, 15 Aug 2009 23:30:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4136 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 4136-submit@emacsbugs.donarmstrong.com id=B4136.12503786076344 (code B ref 4136); Sat, 15 Aug 2009 23:30:06 +0000 Received: (at 4136) by emacsbugs.donarmstrong.com; 15 Aug 2009 23:23:27 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.6 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mx1.starman.ee (smtp-out1.starman.ee [85.253.0.3]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7FNNPtf006337 for <4136@emacsbugs.donarmstrong.com>; Sat, 15 Aug 2009 16:23:26 -0700 X-Virus-Scanned: by Amavisd-New at mx1.starman.ee Received: from mail.starman.ee (82.131.53.206.cable.starman.ee [82.131.53.206]) by mx1.starman.ee (Postfix) with ESMTP id A95D83F4348; Sun, 16 Aug 2009 02:23:18 +0300 (EEST) From: Juri Linkov To: martin rudalics Cc: 4136@debbugs.gnu.org, Eli Barzilay Organization: JURTA References: <19075.45378.67131.491453@winooski.ccs.neu.edu> <4A83E299.3060002@gmx.at> <87tz0bqqhm.fsf@mail.jurta.org> <4A850F6C.2080205@gmx.at> <873a7uc8mg.fsf@mail.jurta.org> <4A8689EE.9020402@gmx.at> Date: Sun, 16 Aug 2009 02:03:12 +0300 In-Reply-To: <4A8689EE.9020402@gmx.at> (martin rudalics's message of "Sat, 15 Aug 2009 12:11:58 +0200") Message-ID: <87ljlk4snf.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii >> This is fixed in the following version: >> >> (defun delete-pair () >> "Delete a pair of characters enclosing the sexp that follows point." >> (interactive) >> (save-excursion >> (forward-sexp 1) >> (save-excursion >> (backward-sexp 1) >> (skip-syntax-forward "'") >> (delete-char 1)) >> (delete-char -1))) > > Still doesn't seem TDTRT with `point' before something like > > `foo' I know, I know, after I fix this, you'll come up with another test case like `foo bar' ;-) -- Juri Linkov http://www.jurta.org/emacs/ From unknown Sat Jun 14 03:55:06 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4136: 23.1; delete-pair Reply-To: Juri Linkov , 4136@debbugs.gnu.org Resent-From: Juri Linkov Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sat, 15 Aug 2009 23:30:08 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4136 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 4136-submit@emacsbugs.donarmstrong.com id=B4136.12503786076348 (code B ref 4136); Sat, 15 Aug 2009 23:30:08 +0000 Received: (at 4136) by emacsbugs.donarmstrong.com; 15 Aug 2009 23:23:27 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.6 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mx1.starman.ee (smtp-out1.starman.ee [85.253.0.3]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7FNNPhh006338 for <4136@emacsbugs.donarmstrong.com>; Sat, 15 Aug 2009 16:23:26 -0700 X-Virus-Scanned: by Amavisd-New at mx1.starman.ee Received: from mail.starman.ee (82.131.53.206.cable.starman.ee [82.131.53.206]) by mx1.starman.ee (Postfix) with ESMTP id 3E2293F434B; Sun, 16 Aug 2009 02:23:19 +0300 (EEST) From: Juri Linkov To: Eli Barzilay Cc: martin rudalics , 4136@debbugs.gnu.org Organization: JURTA References: <19075.45378.67131.491453@winooski.ccs.neu.edu> <4A83E299.3060002@gmx.at> <87tz0bqqhm.fsf@mail.jurta.org> <4A850F6C.2080205@gmx.at> <873a7uc8mg.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> Date: Sun, 16 Aug 2009 02:06:06 +0300 In-Reply-To: <19078.4981.525959.210519@winooski.ccs.neu.edu> (Eli Barzilay's message of "Fri, 14 Aug 2009 21:46:29 -0400") Message-ID: <87ab20znhd.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii >> It seems you and Martin prefer checking against the >> `insert-pair-alist' because the function name `delete-pair' suggests >> it should be a counterpart of `insert-pair'. > > ...this is exactly the issue: it is much better if `delete-foo' is > always an operation that reverts what `insert-foo' does. The exact reverse is impossible. For instance, put the cursor on the letter `f' in: foo "" bar and type `M-3 M-"' where M-" is bound to `insert-pair'. The result will be: "foo "" bar" Now what `delete-pair' should do to revert this back to the original? > The current state of `delete-pair' is so bad that my guess is that > hardly anyone used it, so adding another command doesn't make much > sense. How about making it do the proper thing (removing only > balanced pairs as specified by `insert-pair-alist'), and ignoring > errors with a prefix argument? I've been using `delete-pair' for many years several times a day without any problem because my lists are always correctly balanced thanks to `insert-pair' that I exclusively use to create balanced lists and strings. That's why even in the current state of `delete-pair' it is the useful reverse of `insert-pair' because the latter creates balanced lists and the former deletes them. >> This is fixed in the following version: >> [...] > > This version doesn't make much sense as an operation you'd want to do > on code: > > (foo '(x y z)) > --> > (foo 'x y z) It makes sense when `foo' is a multi-argument function like `list', e.g. (list 'x y z) So I see no reason to introduce more restrictions to decide what parens the user is allowed to delete in his/her code. -- Juri Linkov http://www.jurta.org/emacs/ From unknown Sat Jun 14 03:55:06 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4136: 23.1; delete-pair Reply-To: Eli Barzilay , 4136@debbugs.gnu.org Resent-From: Eli Barzilay Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sun, 16 Aug 2009 00:05:12 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4136 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 4136-submit@emacsbugs.donarmstrong.com id=B4136.125038082512608 (code B ref 4136); Sun, 16 Aug 2009 00:05:12 +0000 Received: (at 4136) by emacsbugs.donarmstrong.com; 16 Aug 2009 00:00:25 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.6 required=4.0 tests=AWL,HAS_BUG_NUMBER, SPF_HELO_PASS autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from barzilay.org (winooski.ccs.neu.edu [129.10.115.117]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7G00OQt012603 for <4136@emacsbugs.donarmstrong.com>; Sat, 15 Aug 2009 17:00:25 -0700 Received: from eli by barzilay.org with local (Exim 4.66) (envelope-from ) id 1McTAc-0006v2-Bv; Sat, 15 Aug 2009 20:00:22 -0400 From: Eli Barzilay MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <19079.19478.357436.68768@winooski.ccs.neu.edu> Date: Sat, 15 Aug 2009 20:00:22 -0400 To: Juri Linkov Cc: martin rudalics , 4136@debbugs.gnu.org In-Reply-To: <87ab20znhd.fsf@mail.jurta.org> References: <19075.45378.67131.491453@winooski.ccs.neu.edu> <4A83E299.3060002@gmx.at> <87tz0bqqhm.fsf@mail.jurta.org> <4A850F6C.2080205@gmx.at> <873a7uc8mg.fsf@mail.jurta.org> <4A8689EE.9020402@gmx.at> <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> X-Mailer: VM 7.19 under Emacs 22.1.1 On Aug 16, Juri Linkov wrote: > >> It seems you and Martin prefer checking against the > >> `insert-pair-alist' because the function name `delete-pair' > >> suggests it should be a counterpart of `insert-pair'. > > > > ...this is exactly the issue: it is much better if `delete-foo' is > > always an operation that reverts what `insert-foo' does. > > The exact reverse is impossible. Of course it isn't, but the operation is one that negates in what it "generally does" the thing that `insert-foo' does. Just like `scroll-down' and `scroll-up' are opposites even though they don't always cancel out. > > The current state of `delete-pair' is so bad that my guess is that > > hardly anyone used it, so adding another command doesn't make much > > sense. How about making it do the proper thing (removing only > > balanced pairs as specified by `insert-pair-alist'), and ignoring > > errors with a prefix argument? > > I've been using `delete-pair' for many years several times a day > without any problem because my lists are always correctly balanced > thanks to `insert-pair' that I exclusively use to create balanced > lists and strings. Believe me, I've written a paren or two, and I use `insert-pair' enough to have my own improved version of it. (In fact, guess why I almost never use smileys in emails.) Still, the first time I tried this, the cursor was at the beginning of an indented line. But the point is still the same: having two nearly identical functions is exactly what prefix arguments are for. > That's why even in the current state of `delete-pair' it is the > useful reverse of `insert-pair' because the latter creates balanced > lists and the former deletes them. ... unless you happen to have your cursor on a non-paren. > >> This is fixed in the following version: > >> [...] > > > > This version doesn't make much sense as an operation you'd want to do > > on code: > > > > (foo '(x y z)) > > --> > > (foo 'x y z) > > It makes sense when `foo' is a multi-argument function like `list', > e.g. > > (list 'x y z) > > So I see no reason to introduce more restrictions to decide what > parens the user is allowed to delete in his/her code. You've missed my point: the difference between "y" and "'y" is *huge*, changing one to the other is something that you don't want to do by mistake. On Aug 16, Juri Linkov wrote: > >> This is fixed in the following version: > >> > >> (defun delete-pair () > >> "Delete a pair of characters enclosing the sexp that follows point." > >> (interactive) > >> (save-excursion > >> (forward-sexp 1) > >> (save-excursion > >> (backward-sexp 1) > >> (skip-syntax-forward "'") > >> (delete-char 1)) > >> (delete-char -1))) > > > > Still doesn't seem TDTRT with `point' before something like > > > > `foo' > > I know, I know, after I fix this, you'll come up with another > test case like > > `foo bar' Those examples are very good IMO -- it's not being picky for nothing, it's an attempt to avoid nasty surprises that make you end up with erroneous code. Emacs is usually good at being a careful editor for code, `delete-pair' is very exceptional in this aspect. -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://barzilay.org/ Maze is Life! From unknown Sat Jun 14 03:55:06 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4136: 23.1; delete-pair Reply-To: martin rudalics , 4136@debbugs.gnu.org Resent-From: martin rudalics Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sun, 16 Aug 2009 10:35:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4136 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 4136-submit@emacsbugs.donarmstrong.com id=B4136.125041844521924 (code B ref 4136); Sun, 16 Aug 2009 10:35:04 +0000 Received: (at 4136) by emacsbugs.donarmstrong.com; 16 Aug 2009 10:27:25 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-4.4 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with SMTP id n7GARMBh021919 for <4136@emacsbugs.donarmstrong.com>; Sun, 16 Aug 2009 03:27:24 -0700 Received: (qmail invoked by alias); 16 Aug 2009 10:27:15 -0000 Received: from 62-47-43-46.adsl.highway.telekom.at (EHLO [62.47.43.46]) [62.47.43.46] by mail.gmx.net (mp009) with SMTP; 16 Aug 2009 12:27:15 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX19Skf4R/ghShRXfk60G8JNKse7cRSppLFvAh1K0lx uP2zcgJLetWPV6 Message-ID: <4A87DF00.6060005@gmx.at> Date: Sun, 16 Aug 2009 12:27:12 +0200 From: martin rudalics User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: Juri Linkov CC: 4136@debbugs.gnu.org, Eli Barzilay References: <19075.45378.67131.491453@winooski.ccs.neu.edu> <4A83E299.3060002@gmx.at> <87tz0bqqhm.fsf@mail.jurta.org> <4A850F6C.2080205@gmx.at> <873a7uc8mg.fsf@mail.jurta.org> <4A8689EE.9020402@gmx.at> <87ljlk4snf.fsf@mail.jurta.org> In-Reply-To: <87ljlk4snf.fsf@mail.jurta.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.75 > I know, I know, after I fix this, you'll come up with another > test case like > > `foo bar' I wouldn't. Doing a `forward-sexp' on `foo' wouldn't get me to the end of `bar'. So you could all too easily reject such a test case ;-) If, however, `delete-pair' were called with a prefix argument of 2 ... martin From unknown Sat Jun 14 03:55:06 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4136: 23.1; delete-pair Reply-To: martin rudalics , 4136@debbugs.gnu.org Resent-From: martin rudalics Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sun, 16 Aug 2009 10:35:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4136 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 4136-submit@emacsbugs.donarmstrong.com id=B4136.125041846321934 (code B ref 4136); Sun, 16 Aug 2009 10:35:06 +0000 Received: (at 4136) by emacsbugs.donarmstrong.com; 16 Aug 2009 10:27:43 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-4.4 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with SMTP id n7GARfYf021929 for <4136@emacsbugs.donarmstrong.com>; Sun, 16 Aug 2009 03:27:43 -0700 Received: (qmail invoked by alias); 16 Aug 2009 10:27:35 -0000 Received: from 62-47-43-46.adsl.highway.telekom.at (EHLO [62.47.43.46]) [62.47.43.46] by mail.gmx.net (mp011) with SMTP; 16 Aug 2009 12:27:35 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX18kY9FJIsckjzHc8He1YrZmM13htnmTPtM7WhEbIx 3w0koT9g6RRupo Message-ID: <4A87DF14.5000104@gmx.at> Date: Sun, 16 Aug 2009 12:27:32 +0200 From: martin rudalics User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: Juri Linkov CC: Eli Barzilay , 4136@debbugs.gnu.org References: <19075.45378.67131.491453@winooski.ccs.neu.edu> <4A83E299.3060002@gmx.at> <87tz0bqqhm.fsf@mail.jurta.org> <4A850F6C.2080205@gmx.at> <873a7uc8mg.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> In-Reply-To: <87ab20znhd.fsf@mail.jurta.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.77 > The exact reverse is impossible. For instance, put the cursor > on the letter `f' in: > > foo "" bar > > and type `M-3 M-"' where M-" is bound to `insert-pair'. > The result will be: > > "foo "" bar" Obviously `insert-pair' would have to escape the old quotes here ;-) martin, who couldn't resist From unknown Sat Jun 14 03:55:06 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4136: 23.1; delete-pair Reply-To: Juri Linkov , 4136@debbugs.gnu.org Resent-From: Juri Linkov Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Mon, 17 Aug 2009 01:35:07 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4136 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 4136-submit@emacsbugs.donarmstrong.com id=B4136.125047258519333 (code B ref 4136); Mon, 17 Aug 2009 01:35:07 +0000 Received: (at 4136) by emacsbugs.donarmstrong.com; 17 Aug 2009 01:29:45 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.6 required=4.0 tests=AWL,FOURLA,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mx1.starman.ee (smtp-out1.starman.ee [85.253.0.3]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7H1Thni019323 for <4136@emacsbugs.donarmstrong.com>; Sun, 16 Aug 2009 18:29:45 -0700 X-Virus-Scanned: by Amavisd-New at mx1.starman.ee Received: from mail.starman.ee (82.131.54.10.cable.starman.ee [82.131.54.10]) by mx1.starman.ee (Postfix) with ESMTP id 8E3863F4282; Mon, 17 Aug 2009 04:29:36 +0300 (EEST) From: Juri Linkov To: Eli Barzilay Cc: martin rudalics , 4136@debbugs.gnu.org Organization: JURTA References: <19075.45378.67131.491453@winooski.ccs.neu.edu> <4A83E299.3060002@gmx.at> <87tz0bqqhm.fsf@mail.jurta.org> <4A850F6C.2080205@gmx.at> <873a7uc8mg.fsf@mail.jurta.org> <4A8689EE.9020402@gmx.at> <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> Date: Mon, 17 Aug 2009 03:46:46 +0300 In-Reply-To: <19079.19478.357436.68768@winooski.ccs.neu.edu> (Eli Barzilay's message of "Sat, 15 Aug 2009 20:00:22 -0400") Message-ID: <87k5131d3d.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii > Believe me, I've written a paren or two, and I use `insert-pair' > enough to have my own improved version of it. (In fact, guess why I > almost never use smileys in emails.) You can write smileys using the closing parenthesis (but we should improve `delete-pair' to delete smileys completely after deleting the closing parenthesis ;-) > Still, the first time I tried this, the cursor was at the beginning of > an indented line. Where did you get this weird idea that `delete-pair' should delete a character far away from the current cursor position? Look, `insert-char' inserts a character at point and `delete-char' deletes a character at point. `insert-pair' inserts an opening character at point. So why `delete-pair' shouldn't do the same? Why it shouldn't delete an opening character at point instead of using some additional heuristics to find the position of the opening character? >> That's why even in the current state of `delete-pair' it is the >> useful reverse of `insert-pair' because the latter creates balanced >> lists and the former deletes them. > > ... unless you happen to have your cursor on a non-paren. Why would I want to put cursor on a non-paren when I want to delete a paren? >> > This version doesn't make much sense as an operation you'd want to do >> > on code: >> > >> > (foo '(x y z)) >> > --> >> > (foo 'x y z) >> >> It makes sense when `foo' is a multi-argument function like `list', >> e.g. >> >> (list 'x y z) >> >> So I see no reason to introduce more restrictions to decide what >> parens the user is allowed to delete in his/her code. > > You've missed my point: the difference between "y" and "'y" is *huge*, > changing one to the other is something that you don't want to do by > mistake. 99% of time when you write a program it is in the erroneous state until you finish editing. But this doesn't mean we should disallow the user to have an intermediate erroneous state. So of course, in the above example you can add necessary quotes after deleting a pair of parentheses. >> I know, I know, after I fix this, you'll come up with another >> test case like >> >> `foo bar' > > Those examples are very good IMO -- it's not being picky for nothing, > it's an attempt to avoid nasty surprises that make you end up with > erroneous code. Emacs is usually good at being a careful editor for > code, `delete-pair' is very exceptional in this aspect. Emacs is good at following the KISS principle to not over-engineer simple functions. -- Juri Linkov http://www.jurta.org/emacs/ From unknown Sat Jun 14 03:55:06 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4136: 23.1; delete-pair Reply-To: Eli Barzilay , 4136@debbugs.gnu.org Resent-From: Eli Barzilay Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Mon, 17 Aug 2009 03:20:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4136 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 4136-submit@emacsbugs.donarmstrong.com id=B4136.12504788346182 (code B ref 4136); Mon, 17 Aug 2009 03:20:04 +0000 Received: (at 4136) by emacsbugs.donarmstrong.com; 17 Aug 2009 03:13:54 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.5 required=4.0 tests=AWL,FOURLA,HAS_BUG_NUMBER, SPF_HELO_PASS autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from barzilay.org (winooski.ccs.neu.edu [129.10.115.117]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7H3DqJS006177 for <4136@emacsbugs.donarmstrong.com>; Sun, 16 Aug 2009 20:13:54 -0700 Received: from eli by barzilay.org with local (Exim 4.66) (envelope-from ) id 1McsfN-0008Ll-Qa; Sun, 16 Aug 2009 23:13:49 -0400 From: Eli Barzilay MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <19080.51949.798286.416193@winooski.ccs.neu.edu> Date: Sun, 16 Aug 2009 23:13:49 -0400 To: Juri Linkov Cc: martin rudalics , 4136@debbugs.gnu.org In-Reply-To: <87k5131d3d.fsf@mail.jurta.org> References: <19075.45378.67131.491453@winooski.ccs.neu.edu> <4A83E299.3060002@gmx.at> <87tz0bqqhm.fsf@mail.jurta.org> <4A850F6C.2080205@gmx.at> <873a7uc8mg.fsf@mail.jurta.org> <4A8689EE.9020402@gmx.at> <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> X-Mailer: VM 7.19 under Emacs 22.1.1 On Aug 17, Juri Linkov wrote: > > Still, the first time I tried this, the cursor was at the > > beginning of an indented line. > > Where did you get this weird idea that `delete-pair' should delete a > character far away from the current cursor position? Look, > `insert-char' inserts a character at point and `delete-char' deletes > a character at point. Only when there is a character there. > `insert-pair' inserts an opening character at point. So why > `delete-pair' shouldn't do the same? Why it shouldn't delete an > opening character at point instead of using some additional > heuristics to find the position of the opening character? We're going back in circles here: "delete *pair*" shouldn't delete an opening character unless it is part of a *pair*. If by the above you mean make it delete the character pair starting at the current point, then that seems fine -- as long as it verifies that there really is a pair. > >> That's why even in the current state of `delete-pair' it is the > >> useful reverse of `insert-pair' because the latter creates > >> balanced lists and the former deletes them. > > > > ... unless you happen to have your cursor on a non-paren. > > Why would I want to put cursor on a non-paren when I want to delete > a paren? You wouldn't, which is why throwing an error is the right thing. If you apply this exact same argument to `delete-char': Why would I want to put the cursor at the end of the buffer when I want to delete a character? it can justify making `delete-char' delete the preceding character when the cursor is at the eob. > >> > This version doesn't make much sense as an operation you'd want to do > >> > on code: > >> > > >> > (foo '(x y z)) > >> > --> > >> > (foo 'x y z) > >> > >> It makes sense when `foo' is a multi-argument function like `list', > >> e.g. > >> > >> (list 'x y z) > >> > >> So I see no reason to introduce more restrictions to decide what > >> parens the user is allowed to delete in his/her code. > > > > You've missed my point: the difference between "y" and "'y" is *huge*, > > changing one to the other is something that you don't want to do by > > mistake. > > 99% of time when you write a program it is in the erroneous state > until you finish editing. But this doesn't mean we should disallow > the user to have an intermediate erroneous state. So of course, in > the above example you can add necessary quotes after deleting a pair > of parentheses. That makes absolutely no sense. Yes, a file is usually at a bad state while it's being edited -- but that's not a reason to make things worse by an operation that hardly ever does what you (some random hacker) want to do. (And you don't want to do that because 'foo is unrelated to foo.) > >> I know, I know, after I fix this, you'll come up with another > >> test case like > >> > >> `foo bar' > > > > Those examples are very good IMO -- it's not being picky for > > nothing, it's an attempt to avoid nasty surprises that make you > > end up with erroneous code. Emacs is usually good at being a > > careful editor for code, `delete-pair' is very exceptional in this > > aspect. > > Emacs is good at following the KISS principle to not over-engineer > simple functions. Are you serious?? In v23 I'm counting about 500 lines of just elisp code for next/previous-line. It is the resulting behavior that should be simple -- and that sometimes requires considerable amount of code. Making `delete-pair' does what its name suggest *is* keeping it simple. The current version of the function is pretty much swapping the last two characters in "KISS". -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://barzilay.org/ Maze is Life! From unknown Sat Jun 14 03:55:06 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4136: 23.1; delete-pair Reply-To: Juri Linkov , 4136@debbugs.gnu.org Resent-From: Juri Linkov Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Thu, 20 Aug 2009 19:38:54 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4136 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 4136-submit@emacsbugs.donarmstrong.com id=B4136.12505444965568 (code B ref 4136); Thu, 20 Aug 2009 19:38:54 +0000 Received: (at 4136) by emacsbugs.donarmstrong.com; 17 Aug 2009 21:28:16 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.6 required=4.0 tests=AWL,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mx2.starman.ee (smtp-out2.starman.ee [85.253.0.4]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7HLSEAP005565 for <4136@emacsbugs.donarmstrong.com>; Mon, 17 Aug 2009 14:28:15 -0700 X-Virus-Scanned: by Amavisd-New at mx2.starman.ee Received: from mail.starman.ee (82.131.53.255.cable.starman.ee [82.131.53.255]) by mx2.starman.ee (Postfix) with ESMTP id D09B83F406C; Tue, 18 Aug 2009 00:28:07 +0300 (EEST) From: Juri Linkov To: Eli Barzilay Cc: martin rudalics , 4136@debbugs.gnu.org Organization: JURTA References: <19075.45378.67131.491453@winooski.ccs.neu.edu> <4A83E299.3060002@gmx.at> <87tz0bqqhm.fsf@mail.jurta.org> <4A850F6C.2080205@gmx.at> <873a7uc8mg.fsf@mail.jurta.org> <4A8689EE.9020402@gmx.at> <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> Date: Tue, 18 Aug 2009 00:17:11 +0300 In-Reply-To: <19080.51949.798286.416193@winooski.ccs.neu.edu> (Eli Barzilay's message of "Sun, 16 Aug 2009 23:13:49 -0400") Message-ID: <87ocqezdfd.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii >> `insert-pair' inserts an opening character at point. So why >> `delete-pair' shouldn't do the same? Why it shouldn't delete an >> opening character at point instead of using some additional >> heuristics to find the position of the opening character? > > We're going back in circles here: "delete *pair*" shouldn't delete an > opening character unless it is part of a *pair*. If by the above you > mean make it delete the character pair starting at the current point, > then that seems fine -- as long as it verifies that there really is a > pair. We are in violent agreement. I didn't claim that `delete-pair' shouldn't check `insert-pair-alist'. On the contrary, I think `delete-pair' should verify if the character pair starting at the current point is part of a pair according to `insert-pair-alist'. "At the current point" - that's my point. It shouldn't try finding the opening character somewhere else. So in your original test case it should throw an error when the cursor is on some whitespace that precedes an expression. >> Why would I want to put cursor on a non-paren when I want to delete >> a paren? > > You wouldn't, which is why throwing an error is the right thing. I agree. So I'd like to close this issue with the following patch: Index: lisp/emacs-lisp/lisp.el =================================================================== RCS file: /sources/emacs/emacs/lisp/emacs-lisp/lisp.el,v retrieving revision 1.102 diff -u -r1.102 lisp.el --- lisp/emacs-lisp/lisp.el 22 Jul 2009 02:45:37 -0000 1.102 +++ lisp/emacs-lisp/lisp.el 17 Aug 2009 21:16:32 -0000 @@ -530,7 +530,15 @@ (defun delete-pair () "Delete a pair of characters enclosing the sexp that follows point." (interactive) - (save-excursion (forward-sexp 1) (delete-char -1)) + (let ((open-char (char-after))) + (save-excursion + (forward-sexp 1) + (unless (member (list open-char (char-before)) + (mapcar (lambda (p) + (if (= (length p) 3) (cdr p) p)) + insert-pair-alist)) + (error "Not a matching pair")) + (delete-char -1))) (delete-char 1)) (defun raise-sexp (&optional arg) -- Juri Linkov http://www.jurta.org/emacs/ From unknown Sat Jun 14 03:55:06 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4136: 23.1; delete-pair Reply-To: Stefan Monnier , 4136@debbugs.gnu.org Resent-From: Stefan Monnier Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Thu, 20 Aug 2009 19:44:00 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4136 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 4136-submit@emacsbugs.donarmstrong.com id=B4136.12505650563774 (code B ref 4136); Thu, 20 Aug 2009 19:44:00 +0000 Received: (at 4136) by emacsbugs.donarmstrong.com; 18 Aug 2009 03:10:56 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.7 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from ironport2-out.teksavvy.com (ironport2-out.teksavvy.com [206.248.154.182]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7I3AtmN003771 for <4136@emacsbugs.donarmstrong.com>; Mon, 17 Aug 2009 20:10:56 -0700 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtgEAKO4iUpFpZNo/2dsb2JhbACBUtUPhBkFh0k X-IronPort-AV: E=Sophos;i="4.43,400,1246852800"; d="scan'208";a="43700886" Received: from 69-165-147-104.dsl.teksavvy.com (HELO ceviche.home) ([69.165.147.104]) by ironport2-out.teksavvy.com with ESMTP; 17 Aug 2009 23:10:15 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 1E629B407B; Mon, 17 Aug 2009 23:10:47 -0400 (EDT) From: Stefan Monnier To: Eli Barzilay Cc: 4136@debbugs.gnu.org, Juri Linkov Message-ID: References: <19075.45378.67131.491453@winooski.ccs.neu.edu> <4A83E299.3060002@gmx.at> <87tz0bqqhm.fsf@mail.jurta.org> <4A850F6C.2080205@gmx.at> <873a7uc8mg.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> Date: Mon, 17 Aug 2009 23:10:47 -0400 In-Reply-To: <19078.4981.525959.210519@winooski.ccs.neu.edu> (Eli Barzilay's message of "Fri, 14 Aug 2009 21:46:29 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii > ...this is exactly the issue: it is much better if `delete-foo' is > always an operation that reverts what `insert-foo' does. I don't think we shojuld make it hard to delete (...] just because it may be done by mistake. That's what `undo' is for. So, I'm in favor of making delete-pair a bit more picky, but not quite as much as you suggest. I suggest we try and make sure delete-pair indeed only eliminates chars like ([" on the left side and )]" on the right side (including by moving point a little bit in order to find the intended pair), but let's not impose that ( can only match ). > The current state of `delete-pair' is so bad that my guess is that > hardly anyone used it, so adding another command doesn't make much > sense. It works fine, tho it indeed does it in a "blind" way that means that you may get surprise results which require undo. No big deal, tho. Stefan From unknown Sat Jun 14 03:55:06 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4136: 23.1; delete-pair Reply-To: martin rudalics , 4136@debbugs.gnu.org Resent-From: martin rudalics Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Thu, 20 Aug 2009 20:19:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4136 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 4136-submit@emacsbugs.donarmstrong.com id=B4136.125057969816345 (code B ref 4136); Thu, 20 Aug 2009 20:19:04 +0000 Received: (at 4136) by emacsbugs.donarmstrong.com; 18 Aug 2009 07:14:58 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.9 required=4.0 tests=AWL,HAS_BUG_NUMBER,MIXEDBDN autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with SMTP id n7I7Es3P016337 for <4136@emacsbugs.donarmstrong.com>; Tue, 18 Aug 2009 00:14:57 -0700 Received: (qmail invoked by alias); 18 Aug 2009 07:14:48 -0000 Received: from 62-47-51-152.adsl.highway.telekom.at (EHLO [62.47.51.152]) [62.47.51.152] by mail.gmx.net (mp003) with SMTP; 18 Aug 2009 09:14:48 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1908lFj5490ZhL55kKDdN/bcOw4WwcPUBw1nyEBDy C/qUqOE53D5hXB Message-ID: <4A8A549E.20605@gmx.at> Date: Tue, 18 Aug 2009 09:13:34 +0200 From: martin rudalics User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: Juri Linkov CC: Eli Barzilay , 4136@debbugs.gnu.org References: <19075.45378.67131.491453@winooski.ccs.neu.edu> <4A83E299.3060002@gmx.at> <87tz0bqqhm.fsf@mail.jurta.org> <4A850F6C.2080205@gmx.at> <873a7uc8mg.fsf@mail.jurta.org> <4A8689EE.9020402@gmx.at> <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> In-Reply-To: <87ocqezdfd.fsf@mail.jurta.org> Content-Type: multipart/mixed; boundary="------------010001070509010703070603" X-Y-GMX-Trusted: 0 X-FuHaFi: 0.77,0.63 This is a multi-part message in MIME format. --------------010001070509010703070603 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit > We are in violent agreement. I didn't claim that `delete-pair' > shouldn't check `insert-pair-alist'. On the contrary, I think > `delete-pair' should verify if the character pair starting at the > current point is part of a pair according to `insert-pair-alist'. > "At the current point" - that's my point. It shouldn't try > finding the opening character somewhere else. So in your original > test case it should throw an error when the cursor is on some > whitespace that precedes an expression. Ne hlebom jedinnym. Why can't we be generous and provide something like the attached? martin --------------010001070509010703070603 Content-Type: text/plain; name="lisp.el.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="lisp.el.diff" *** emacs-lisp/lisp.el.~1.102.~ 2009-07-27 08:10:54.124527300 +0200 --- emacs-lisp/lisp.el 2009-08-18 08:52:42.734375000 +0200 *************** *** 527,537 **** (interactive "P") (insert-pair arg ?\( ?\))) ! (defun delete-pair () ! "Delete a pair of characters enclosing the sexp that follows point." ! (interactive) ! (save-excursion (forward-sexp 1) (delete-char -1)) ! (delete-char 1)) (defun raise-sexp (&optional arg) "Raise ARG sexps higher up the tree." --- 527,566 ---- (interactive "P") (insert-pair arg ?\( ?\))) ! (defun delete-pair (&optional arg) ! "Delete a pair of characters enclosing ARG sexps that follow point. ! A negative ARG deletes a pair around the preceding ARG sexps instead." ! (interactive "P") ! ! (if arg ! (setq arg (prefix-numeric-value arg)) ! (setq arg 1)) ! ! (if (< arg 0) ! (save-excursion ! (skip-chars-backward " \t") ! (save-excursion ! (let ((close-char (char-before))) ! (forward-sexp arg) ! (unless (member (list (char-after) close-char) ! (mapcar (lambda (p) ! (if (= (length p) 3) (cdr p) p)) ! insert-pair-alist)) ! (error "Not after matching pair")) ! (delete-char 1))) ! (delete-char -1)) ! (save-excursion ! (skip-chars-forward " \t") ! (save-excursion ! (let ((open-char (char-after))) ! (forward-sexp arg) ! (unless (member (list open-char (char-before)) ! (mapcar (lambda (p) ! (if (= (length p) 3) (cdr p) p)) ! insert-pair-alist)) ! (error "Not before matching pair")) ! (delete-char -1))) ! (delete-char 1)))) (defun raise-sexp (&optional arg) "Raise ARG sexps higher up the tree." --------------010001070509010703070603-- From unknown Sat Jun 14 03:55:06 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4136: 23.1; delete-pair Reply-To: Juri Linkov , 4136@debbugs.gnu.org Resent-From: Juri Linkov Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Thu, 20 Aug 2009 20:37:16 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4136 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 4136-submit@emacsbugs.donarmstrong.com id=B4136.125064971018252 (code B ref 4136); Thu, 20 Aug 2009 20:37:16 +0000 Received: (at 4136) by emacsbugs.donarmstrong.com; 19 Aug 2009 02:41:50 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.7 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mx2.starman.ee (smtp-out2.starman.ee [85.253.0.4]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7J2fmDv018244 for <4136@emacsbugs.donarmstrong.com>; Tue, 18 Aug 2009 19:41:49 -0700 X-Virus-Scanned: by Amavisd-New at mx2.starman.ee Received: from mail.starman.ee (82.131.55.87.cable.starman.ee [82.131.55.87]) by mx2.starman.ee (Postfix) with ESMTP id 764C33F4082; Wed, 19 Aug 2009 05:41:40 +0300 (EEST) From: Juri Linkov To: Stefan Monnier Cc: Eli Barzilay , 4136@debbugs.gnu.org Organization: JURTA References: <19075.45378.67131.491453@winooski.ccs.neu.edu> <4A83E299.3060002@gmx.at> <87tz0bqqhm.fsf@mail.jurta.org> <4A850F6C.2080205@gmx.at> <873a7uc8mg.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> Date: Wed, 19 Aug 2009 03:47:14 +0300 In-Reply-To: (Stefan Monnier's message of "Mon, 17 Aug 2009 23:10:47 -0400") Message-ID: <87ab1wr2f9.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii >> ...this is exactly the issue: it is much better if `delete-foo' is >> always an operation that reverts what `insert-foo' does. > > I don't think we shojuld make it hard to delete (...] just because it > may be done by mistake. That's what `undo' is for. > > So, I'm in favor of making delete-pair a bit more picky, but not quite > as much as you suggest. I suggest we try and make sure delete-pair > indeed only eliminates chars like ([" on the left side and )]" on the > right side (including by moving point a little bit in order to find the > intended pair), but let's not impose that ( can only match ). I don't oppose strict checking for only a pair of ( and ) because a situation with (...] is extremely rare and usually means that there is some bug. So in reality there is no problem with checking against the `insert-pair-alist' list. What I care about is simplicity. It should be easy for the user to understand and remember what the command `delete-pair' does. Failing on a non-pair character would be natural for a command that is a counterpart of `insert-pair'. -- Juri Linkov http://www.jurta.org/emacs/ From unknown Sat Jun 14 03:55:06 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4136: 23.1; delete-pair Reply-To: Juri Linkov , 4136@debbugs.gnu.org Resent-From: Juri Linkov Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Thu, 20 Aug 2009 20:37:18 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4136 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 4136-submit@emacsbugs.donarmstrong.com id=B4136.125064971018255 (code B ref 4136); Thu, 20 Aug 2009 20:37:18 +0000 Received: (at 4136) by emacsbugs.donarmstrong.com; 19 Aug 2009 02:41:50 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.7 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mx2.starman.ee (smtp-out2.starman.ee [85.253.0.4]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7J2fmWU018246 for <4136@emacsbugs.donarmstrong.com>; Tue, 18 Aug 2009 19:41:49 -0700 X-Virus-Scanned: by Amavisd-New at mx2.starman.ee Received: from mail.starman.ee (82.131.55.87.cable.starman.ee [82.131.55.87]) by mx2.starman.ee (Postfix) with ESMTP id 9BBC23F408A; Wed, 19 Aug 2009 05:41:41 +0300 (EEST) From: Juri Linkov To: martin rudalics Cc: Eli Barzilay , 4136@debbugs.gnu.org Organization: JURTA References: <19075.45378.67131.491453@winooski.ccs.neu.edu> <4A83E299.3060002@gmx.at> <87tz0bqqhm.fsf@mail.jurta.org> <4A850F6C.2080205@gmx.at> <873a7uc8mg.fsf@mail.jurta.org> <4A8689EE.9020402@gmx.at> <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> Date: Wed, 19 Aug 2009 03:48:09 +0300 In-Reply-To: <4A8A549E.20605@gmx.at> (martin rudalics's message of "Tue, 18 Aug 2009 09:13:34 +0200") Message-ID: <871vn8r2c2.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii >> We are in violent agreement. I didn't claim that `delete-pair' >> shouldn't check `insert-pair-alist'. On the contrary, I think >> `delete-pair' should verify if the character pair starting at the >> current point is part of a pair according to `insert-pair-alist'. >> "At the current point" - that's my point. It shouldn't try >> finding the opening character somewhere else. So in your original >> test case it should throw an error when the cursor is on some >> whitespace that precedes an expression. > > Ne hlebom jedinnym. Why can't we be generous and provide something like > the attached? > > martin > *** emacs-lisp/lisp.el.~1.102.~ 2009-07-27 08:10:54.124527300 +0200 > --- emacs-lisp/lisp.el 2009-08-18 08:52:42.734375000 +0200 > *************** > *** 527,537 **** > (interactive "P") > (insert-pair arg ?\( ?\))) > > ! (defun delete-pair () > ! "Delete a pair of characters enclosing the sexp that follows point." > ! (interactive) > ! (save-excursion (forward-sexp 1) (delete-char -1)) > ! (delete-char 1)) > > (defun raise-sexp (&optional arg) > "Raise ARG sexps higher up the tree." > --- 527,566 ---- > (interactive "P") > (insert-pair arg ?\( ?\))) > > ! (defun delete-pair (&optional arg) > ! "Delete a pair of characters enclosing ARG sexps that follow point. > ! A negative ARG deletes a pair around the preceding ARG sexps instead." > ! (interactive "P") > ! > ! (if arg > ! (setq arg (prefix-numeric-value arg)) > ! (setq arg 1)) > ! > ! (if (< arg 0) > ! (save-excursion > ! (skip-chars-backward " \t") > ! (save-excursion > ! (let ((close-char (char-before))) > ! (forward-sexp arg) > ! (unless (member (list (char-after) close-char) > ! (mapcar (lambda (p) > ! (if (= (length p) 3) (cdr p) p)) > ! insert-pair-alist)) > ! (error "Not after matching pair")) > ! (delete-char 1))) > ! (delete-char -1)) > ! (save-excursion > ! (skip-chars-forward " \t") > ! (save-excursion > ! (let ((open-char (char-after))) > ! (forward-sexp arg) > ! (unless (member (list open-char (char-before)) > ! (mapcar (lambda (p) > ! (if (= (length p) 3) (cdr p) p)) > ! insert-pair-alist)) > ! (error "Not before matching pair")) > ! (delete-char -1))) > ! (delete-char 1)))) > > (defun raise-sexp (&optional arg) > "Raise ARG sexps higher up the tree." Hmm, I think this makes sense. -- Juri Linkov http://www.jurta.org/emacs/ From unknown Sat Jun 14 03:55:06 2025 X-Loop: help-debbugs@gnu.org Subject: bug#4136: 23.1; delete-pair Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 14 Sep 2020 14:09: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: To: martin rudalics Cc: Juri Linkov , Eli Barzilay , 4136@debbugs.gnu.org Received: via spool by 4136-submit@debbugs.gnu.org id=B4136.160009253819081 (code B ref 4136); Mon, 14 Sep 2020 14:09:01 +0000 Received: (at 4136) by debbugs.gnu.org; 14 Sep 2020 14:08:58 +0000 Received: from localhost ([127.0.0.1]:55621 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kHpAA-0004xh-76 for submit@debbugs.gnu.org; Mon, 14 Sep 2020 10:08:58 -0400 Received: from quimby.gnus.org ([95.216.78.240]:59728) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kHpA7-0004xT-Q0 for 4136@debbugs.gnu.org; Mon, 14 Sep 2020 10:08:56 -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:In-Reply-To:Date: References: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=Rb/RvaTLsqcXEN/zQDFz3TbECyTcMFlOx2FOtU9n2EY=; b=phJ0VspMPrxV1NWgqSHF6glE1G WJzrXqmcRCUlHZ3OgMBmd8ekfkPqqbACSjS0T6oAAYi+WdqrRSqGpm7126ommtwmsnSrPnrjrFDjP Iqiajlwt1UxuPhJsnZoS51tUV6qryDV/jjTJcsTsiZk4e+dRqy35rmNib7HCyb4lEOGA=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kHp9y-0002NM-Hw; Mon, 14 Sep 2020 16:08:49 +0200 From: Lars Ingebrigtsen References: <19075.45378.67131.491453@winooski.ccs.neu.edu> <4A83E299.3060002@gmx.at> <87tz0bqqhm.fsf@mail.jurta.org> <4A850F6C.2080205@gmx.at> <873a7uc8mg.fsf@mail.jurta.org> <4A8689EE.9020402@gmx.at> <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> X-Now-Playing: Jay Glass Dubs's _Epitaph_: "To My Benefitors" Date: Mon, 14 Sep 2020 16:08:45 +0200 In-Reply-To: <4A8A549E.20605@gmx.at> (martin rudalics's message of "Tue, 18 Aug 2009 09:13:34 +0200") Message-ID: <87r1r48n82.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: martin rudalics writes: > Ne hlebom jedinnym. Why can't we be generous and provide something like > the attached? The patch no longer applied, so I've respun it for Emacs 28 (included below). Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) 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 (-) martin rudalics writes: > Ne hlebom jedinnym. Why can't we be generous and provide something like > the attached? The patch no longer applied, so I've respun it for Emacs 28 (included below). The thread here ended with Martin and Juri both agreeing that this was a good idea, but it was never applied? I don't use delete-pair myself regularly, but giving it some testing now, this new version seems to work fine. Any comments? (The patch is 11 years old.) diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el index 8c18557c79..ac4ba78897 100644 --- a/lisp/emacs-lisp/lisp.el +++ b/lisp/emacs-lisp/lisp.el @@ -735,12 +735,37 @@ insert-parentheses (insert-pair arg ?\( ?\))) (defun delete-pair (&optional arg) - "Delete a pair of characters enclosing ARG sexps following point. -A negative ARG deletes a pair of characters around preceding ARG sexps." - (interactive "p") - (unless arg (setq arg 1)) - (save-excursion (forward-sexp arg) (delete-char (if (> arg 0) -1 1))) - (delete-char (if (> arg 0) 1 -1))) + "Delete a pair of characters enclosing ARG sexps that follow point. +A negative ARG deletes a pair around the preceding ARG sexps instead." + (interactive "P") + (if arg + (setq arg (prefix-numeric-value arg)) + (setq arg 1)) + (if (< arg 0) + (save-excursion + (skip-chars-backward " \t") + (save-excursion + (let ((close-char (char-before))) + (forward-sexp arg) + (unless (member (list (char-after) close-char) + (mapcar (lambda (p) + (if (= (length p) 3) (cdr p) p)) + insert-pair-alist)) + (error "Not after matching pair")) + (delete-char 1))) + (delete-char -1)) + (save-excursion + (skip-chars-forward " \t") + (save-excursion + (let ((open-char (char-after))) + (forward-sexp arg) + (unless (member (list open-char (char-before)) + (mapcar (lambda (p) + (if (= (length p) 3) (cdr p) p)) + insert-pair-alist)) + (error "Not before matching pair")) + (delete-char -1))) + (delete-char 1)))) (defun raise-sexp (&optional arg) "Raise ARG sexps higher up the tree." -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 14 10:09:14 2020 Received: (at control) by debbugs.gnu.org; 14 Sep 2020 14:09:15 +0000 Received: from localhost ([127.0.0.1]:55625 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kHpAQ-0004ye-Hm for submit@debbugs.gnu.org; Mon, 14 Sep 2020 10:09:14 -0400 Received: from quimby.gnus.org ([95.216.78.240]:59746) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kHpAM-0004yM-Dk for control@debbugs.gnu.org; Mon, 14 Sep 2020 10:09:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=O436n9Brp1jlhX2YF7BAzDqB/L5nt7SYb5YYttxptNU=; b=I2sTOmhqYPQbDLeIbA5asNKAX/ bIK86ImC830SAafVVdu7J3CwzvoKAilZPRCKkseOm6jfhtOc0RUqusOoTC9buIT08oj/rBzXyTQnZ jhdyxbC2B903pvH0z7Bors073B/gvvYrDKPnO2/bXfKPuUevVv7Utgwz1Scbux6prLnI=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kHpAE-0002Na-QC for control@debbugs.gnu.org; Mon, 14 Sep 2020 16:09:04 +0200 Date: Mon, 14 Sep 2020 16:09:01 +0200 Message-Id: <87pn6o8n7m.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #4136 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 4136 + moreinfo quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control 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 (-) tags 4136 + moreinfo quit From unknown Sat Jun 14 03:55:06 2025 X-Loop: help-debbugs@gnu.org Subject: bug#4136: 23.1; delete-pair Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 14 Sep 2020 19:26: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 To: Lars Ingebrigtsen Cc: martin rudalics , Eli Barzilay , 4136@debbugs.gnu.org Received: via spool by 4136-submit@debbugs.gnu.org id=B4136.160011155719786 (code B ref 4136); Mon, 14 Sep 2020 19:26:01 +0000 Received: (at 4136) by debbugs.gnu.org; 14 Sep 2020 19:25:57 +0000 Received: from localhost ([127.0.0.1]:56278 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kHu6v-000593-4a for submit@debbugs.gnu.org; Mon, 14 Sep 2020 15:25:57 -0400 Received: from relay7-d.mail.gandi.net ([217.70.183.200]:58763) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kHu6t-00058V-Jj for 4136@debbugs.gnu.org; Mon, 14 Sep 2020 15:25:56 -0400 X-Originating-IP: 91.129.97.241 Received: from mail.gandi.net (m91-129-97-241.cust.tele2.ee [91.129.97.241]) (Authenticated sender: juri@linkov.net) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id 5FA4520002; Mon, 14 Sep 2020 19:25:46 +0000 (UTC) From: Juri Linkov Organization: LINKOV.NET References: <19075.45378.67131.491453@winooski.ccs.neu.edu> <4A83E299.3060002@gmx.at> <87tz0bqqhm.fsf@mail.jurta.org> <4A850F6C.2080205@gmx.at> <873a7uc8mg.fsf@mail.jurta.org> <4A8689EE.9020402@gmx.at> <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> Date: Mon, 14 Sep 2020 22:12:03 +0300 In-Reply-To: <87r1r48n82.fsf@gnus.org> (Lars Ingebrigtsen's message of "Mon, 14 Sep 2020 16:08:45 +0200") Message-ID: <874ko0rx9s.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.2 (/) 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: -0.8 (/) > I don't use delete-pair myself regularly, but giving it some testing > now, this new version seems to work fine. > > Any comments? (The patch is 11 years old.) I don't know, I use the current version of delete-pair many times every day, and happy with it. If the patch doesn't break the current behavior, that would be fine. From unknown Sat Jun 14 03:55:06 2025 X-Loop: help-debbugs@gnu.org Subject: bug#4136: 23.1; delete-pair Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 15 Sep 2020 12:28: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 To: Juri Linkov Cc: martin rudalics , Eli Barzilay , 4136@debbugs.gnu.org Received: via spool by 4136-submit@debbugs.gnu.org id=B4136.16001728507704 (code B ref 4136); Tue, 15 Sep 2020 12:28:01 +0000 Received: (at 4136) by debbugs.gnu.org; 15 Sep 2020 12:27:30 +0000 Received: from localhost ([127.0.0.1]:57614 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kIA3W-00020C-FZ for submit@debbugs.gnu.org; Tue, 15 Sep 2020 08:27:30 -0400 Received: from quimby.gnus.org ([95.216.78.240]:44056) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kIA3U-0001zw-CD for 4136@debbugs.gnu.org; Tue, 15 Sep 2020 08:27:29 -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:In-Reply-To:Date: References: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=lBvdBeYaLMkPPqFtv6BTI0jF1DKrBGGMY0QyA5DmJvk=; b=Iwkle8DpCTD5jae+kIp8QyOy3/ 29FxZLE4K4i2HY3R749yR3S5oEpFKS+q01pqzAr4TB/6drfc0xPLhtUvroZtNAll3qXDIrjEQtsV1 ywFJqrxIJMOfP5iijG0q5yS5AAWHn5T+O0JOo1SQu1bZFZvoijM0EAOPqvne/nFGeZrE=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kIA3L-0008W1-Lq; Tue, 15 Sep 2020 14:27:22 +0200 From: Lars Ingebrigtsen References: <19075.45378.67131.491453@winooski.ccs.neu.edu> <4A83E299.3060002@gmx.at> <87tz0bqqhm.fsf@mail.jurta.org> <4A850F6C.2080205@gmx.at> <873a7uc8mg.fsf@mail.jurta.org> <4A8689EE.9020402@gmx.at> <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> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAQAAAAB/ecQqAAAABGdBTUEAALGPC/xhBQAAAAJi S0dEAAHdihOkAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAB3RJTUUH5AkPCzUmaBspuQAAABBJREFU GNNj+A8GDKMUdSgAT1Qe8M8TmhgAAAAldEVYdGRhdGU6Y3JlYXRlADIwMjAtMDktMTVUMTE6NTM6 MzgrMDA6MDBIuYtMAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIwLTA5LTE1VDExOjUzOjM4KzAwOjAw OeQz8AAAAABJRU5ErkJggg== X-Now-Playing: Saito Koji's _433-1_: "433_012" Date: Tue, 15 Sep 2020 14:27:18 +0200 In-Reply-To: <874ko0rx9s.fsf@mail.linkov.net> (Juri Linkov's message of "Mon, 14 Sep 2020 22:12:03 +0300") Message-ID: <87imcf9qe1.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Juri Linkov writes: >> I don't use delete-pair myself regularly, but giving it some testing >> now, this new version seems to work fine. >> >> Any comments? (The patch is 11 years old.) > > I don't know, I use the curren [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) 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 (-) Juri Linkov writes: >> I don't use delete-pair myself regularly, but giving it some testing >> now, this new version seems to work fine. >> >> Any comments? (The patch is 11 years old.) > > I don't know, I use the current version of delete-pair many times every day, > and happy with it. If the patch doesn't break the current behavior, that > would be fine. Could you test the patch and see whether there's any problems? :-) -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Sat Jun 14 03:55:06 2025 X-Loop: help-debbugs@gnu.org Subject: bug#4136: 23.1; delete-pair Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 15 Sep 2020 18:19: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 To: Lars Ingebrigtsen Cc: martin rudalics , Eli Barzilay , 4136@debbugs.gnu.org Received: via spool by 4136-submit@debbugs.gnu.org id=B4136.160019388530174 (code B ref 4136); Tue, 15 Sep 2020 18:19:01 +0000 Received: (at 4136) by debbugs.gnu.org; 15 Sep 2020 18:18:05 +0000 Received: from localhost ([127.0.0.1]:60533 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kIFWm-0007qb-Tl for submit@debbugs.gnu.org; Tue, 15 Sep 2020 14:18:05 -0400 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:39651) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kIFWk-0007q4-A2 for 4136@debbugs.gnu.org; Tue, 15 Sep 2020 14:18:03 -0400 X-Originating-IP: 91.129.97.241 Received: from mail.gandi.net (m91-129-97-241.cust.tele2.ee [91.129.97.241]) (Authenticated sender: juri@linkov.net) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 10EDA1C0007; Tue, 15 Sep 2020 18:17:53 +0000 (UTC) From: Juri Linkov Organization: LINKOV.NET References: <19075.45378.67131.491453@winooski.ccs.neu.edu> <4A83E299.3060002@gmx.at> <87tz0bqqhm.fsf@mail.jurta.org> <4A850F6C.2080205@gmx.at> <873a7uc8mg.fsf@mail.jurta.org> <4A8689EE.9020402@gmx.at> <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> Date: Tue, 15 Sep 2020 21:07:20 +0300 In-Reply-To: <87imcf9qe1.fsf@gnus.org> (Lars Ingebrigtsen's message of "Tue, 15 Sep 2020 14:27:18 +0200") Message-ID: <87sgbjosqp.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.2 (/) 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: -0.8 (/) >>> I don't use delete-pair myself regularly, but giving it some testing >>> now, this new version seems to work fine. >>> >>> Any comments? (The patch is 11 years old.) >> >> I don't know, I use the current version of delete-pair many times every day, >> and happy with it. If the patch doesn't break the current behavior, that >> would be fine. > > Could you test the patch and see whether there's any problems? :-) Now I tested that at least it doesn't cause regression. Hopefully, its new features work equally well :-) From unknown Sat Jun 14 03:55:06 2025 X-Loop: help-debbugs@gnu.org Subject: bug#4136: 23.1; delete-pair Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 17 Sep 2020 14:46: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 To: Juri Linkov Cc: martin rudalics , Eli Barzilay , 4136@debbugs.gnu.org Received: via spool by 4136-submit@debbugs.gnu.org id=B4136.16003539143160 (code B ref 4136); Thu, 17 Sep 2020 14:46:01 +0000 Received: (at 4136) by debbugs.gnu.org; 17 Sep 2020 14:45:14 +0000 Received: from localhost ([127.0.0.1]:38561 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kIv9u-0000ou-GW for submit@debbugs.gnu.org; Thu, 17 Sep 2020 10:45:14 -0400 Received: from quimby.gnus.org ([95.216.78.240]:41696) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kIv9s-0000oc-EV for 4136@debbugs.gnu.org; Thu, 17 Sep 2020 10:45:13 -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:In-Reply-To:Date: References: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=kuFPFefWRcMbLzrzFuxZ2hY4booef5FK28fFUJ2f7r4=; b=j2jP0isu3QB45mVV88+o+63EvY hQ3BrVdtwSTrZp8xIj/6B5OwGa2m8x2Ru98+zNEKoTqPpou/BR6TUbdF/tUH2URwb/vNOy/Vf+l1p vSNVRvTChjO893AW5RoL/4P7dYtfxa/ahsqv9vaiOWSRKolDlz1olPByXtGcAixYIqYk=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kIv9i-0001Uh-OH; Thu, 17 Sep 2020 16:45:05 +0200 From: Lars Ingebrigtsen References: <19075.45378.67131.491453@winooski.ccs.neu.edu> <4A83E299.3060002@gmx.at> <87tz0bqqhm.fsf@mail.jurta.org> <4A850F6C.2080205@gmx.at> <873a7uc8mg.fsf@mail.jurta.org> <4A8689EE.9020402@gmx.at> <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> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAALVBMVEUsKym0Tl2igH3i 0c/NY27blpvMeIWZKTgCAQL49/LksrViLjSup6SyNkv////jpfwrAAAAAWJLR0QOb70wTwAAAAd0 SU1FB+QJEQ4rO2lRmPgAAAGaSURBVDjL7dC/S8NAFAdwfywRp4Mq0kk66SacEe/AQcwVDDiIXiTZ xLaD0LmCFIJToA7CWeHQpbTn8CZHxdFFx4CCCvlfvNi0FS/dHP1yGXKfXN67NzFZwggVnB9hVX4S RRPLQir+KyyFhxvcsT/x6vau7SrMfLXXJlsphFbLxT6nXYr18i7bDCikEEWtIi/SjgoAFOUHTIPK gCnerPmsCwqA4KM27WXAez4RbzYEFKs9zukQVBDU5xQF8KDIXRvoRga2YFz5a8LvgY7bJscLfeio LVDFQ8+91Q1A4HH2ntWo7dfKXrXmldOLVzgbdOUgFFccp154PZwvO2/AB/dACUo07sQJihH6gCs+ ONFoNJN+mnHy2e1UMijrHf3zTf3oMSdeXOhD2Ojn9HEY6xsGCUsla/Q2gvBFyhsrB6alFHLFhJAQ SYkw4VxiibFcMmBaPBFByboBD4JggcmFCUTXzgVBhCYTZgSROmaNtCtJ5LMBLV1AYGkZEC3r78l1 zkjO0hL3ORBNYbqYN91f+Ye/gFlrHNyNgTEHwi8k7TUCzWB9nQAAACV0RVh0ZGF0ZTpjcmVhdGUA MjAyMC0wOS0xN1QxNDo0Mzo1OSswMDowMHOgwM8AAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjAtMDkt MTdUMTQ6NDM6NTkrMDA6MDAC/XhzAAAAAElFTkSuQmCC X-Now-Playing: Consolidated's _Message to the People_: "Message To The People (12" Mix)" Date: Thu, 17 Sep 2020 16:45:01 +0200 In-Reply-To: <87sgbjosqp.fsf@mail.linkov.net> (Juri Linkov's message of "Tue, 15 Sep 2020 21:07:20 +0300") Message-ID: <871rj0qx76.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Juri Linkov writes: > Now I tested that at least it doesn't cause regression. > Hopefully, its new features work equally well :-) Thanks for checking. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) 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 (-) Juri Linkov writes: > Now I tested that at least it doesn't cause regression. > Hopefully, its new features work equally well :-) Thanks for checking. The new feature is just that it only deletes things that are part of insert-pair-alist, if I understood Martin correctly... I've now pushed it to Emacs 28. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 17 10:45:24 2020 Received: (at control) by debbugs.gnu.org; 17 Sep 2020 14:45:24 +0000 Received: from localhost ([127.0.0.1]:38564 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kIvA3-0000pI-Ok for submit@debbugs.gnu.org; Thu, 17 Sep 2020 10:45:24 -0400 Received: from quimby.gnus.org ([95.216.78.240]:41712) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kIvA2-0000p3-1K for control@debbugs.gnu.org; Thu, 17 Sep 2020 10:45:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=GrU7pKhvYrI8g0mgODbnZl8GTchEf4V17KNnQ88PYm4=; b=sbKAI6VzCQa4gg04b/IULEUpxI ARUdgWDmw85u20+9xWYkn6cVb5p3RviZCdk9izdjslYjaDAiVuGMAUaL9Pu1q96P6bI2xlz3zZ34E x+8TulMhg+VCtX5TjFCA6nWHZ7eB3e9woFqAp/xhYnsXcg1vlIC6e4YyPzK3ULC1bbXY=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kIv9u-0001Ux-6U for control@debbugs.gnu.org; Thu, 17 Sep 2020 16:45:16 +0200 Date: Thu, 17 Sep 2020 16:45:13 +0200 Message-Id: <87zh5opime.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #4136 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 4136 fixed close 4136 28.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control 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 (-) tags 4136 fixed close 4136 28.1 quit From unknown Sat Jun 14 03:55:06 2025 X-Loop: help-debbugs@gnu.org Subject: bug#4136: 23.1; delete-pair Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 18 Sep 2020 08:40:02 +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: fixed moreinfo To: Lars Ingebrigtsen Cc: martin rudalics , Eli Barzilay , 4136@debbugs.gnu.org Received: via spool by 4136-submit@debbugs.gnu.org id=B4136.16004183455736 (code B ref 4136); Fri, 18 Sep 2020 08:40:02 +0000 Received: (at 4136) by debbugs.gnu.org; 18 Sep 2020 08:39:05 +0000 Received: from localhost ([127.0.0.1]:40814 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJBv7-0001UR-JQ for submit@debbugs.gnu.org; Fri, 18 Sep 2020 04:39:05 -0400 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:34635) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJBv6-0001Tp-0G for 4136@debbugs.gnu.org; Fri, 18 Sep 2020 04:39:04 -0400 X-Originating-IP: 91.129.108.13 Received: from mail.gandi.net (m91-129-108-13.cust.tele2.ee [91.129.108.13]) (Authenticated sender: juri@linkov.net) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id F06E7E0058; Fri, 18 Sep 2020 08:38:55 +0000 (UTC) From: Juri Linkov Organization: LINKOV.NET References: <19075.45378.67131.491453@winooski.ccs.neu.edu> <87tz0bqqhm.fsf@mail.jurta.org> <4A850F6C.2080205@gmx.at> <873a7uc8mg.fsf@mail.jurta.org> <4A8689EE.9020402@gmx.at> <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> Date: Fri, 18 Sep 2020 11:35:48 +0300 In-Reply-To: <871rj0qx76.fsf@gnus.org> (Lars Ingebrigtsen's message of "Thu, 17 Sep 2020 16:45:01 +0200") Message-ID: <87mu1npjmj.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.2 (/) 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: -0.8 (/) >> Now I tested that at least it doesn't cause regression. >> Hopefully, its new features work equally well :-) > > Thanks for checking. > > The new feature is just that it only deletes things that are part of > insert-pair-alist, if I understood Martin correctly... > > I've now pushed it to Emacs 28. I see that you reverted it now because it breaks on "foo" in text-mode. But the previous version is worse: it deletes wrong text on "foo" in text-mode. From unknown Sat Jun 14 03:55:06 2025 X-Loop: help-debbugs@gnu.org Subject: bug#4136: 23.1; delete-pair Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 18 Sep 2020 11:00:02 +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: fixed moreinfo To: Juri Linkov Cc: martin rudalics , Eli Barzilay , 4136@debbugs.gnu.org Received: via spool by 4136-submit@debbugs.gnu.org id=B4136.16004267624217 (code B ref 4136); Fri, 18 Sep 2020 11:00:02 +0000 Received: (at 4136) by debbugs.gnu.org; 18 Sep 2020 10:59:22 +0000 Received: from localhost ([127.0.0.1]:41016 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJE6s-00015x-Gk for submit@debbugs.gnu.org; Fri, 18 Sep 2020 06:59:22 -0400 Received: from quimby.gnus.org ([95.216.78.240]:52646) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJE6q-00015f-Hx for 4136@debbugs.gnu.org; Fri, 18 Sep 2020 06:59:21 -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:In-Reply-To:Date: References: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=kpZlHkuDlRHm+Lgel4QQyH29+yxHRPJMkx6RzebbI0g=; b=KITGCgQMxirwJUzyykU9x2l/ot YTiHu0JSpLfhiSvBuDcdIG8LgnRmV1rKSLlewYTgNj302haY+8IwKn5FpKjT4qplBeSzeTSlk1Qtl OFHRGYgc61WCCuknXXPc04Qbq1EQ4rwDpR670bmWUkkCb4ll1N4sqXtsEuPl8AVIoTbs=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kJE6g-0004uz-Vm; Fri, 18 Sep 2020 12:59:13 +0200 From: Lars Ingebrigtsen References: <19075.45378.67131.491453@winooski.ccs.neu.edu> <4A850F6C.2080205@gmx.at> <873a7uc8mg.fsf@mail.jurta.org> <4A8689EE.9020402@gmx.at> <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> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAIVBMVEX+/vvk1dGlYGKR MjrLoJ+KGinDnZyUOUGgP0aAVFX///9OLS67AAAAAWJLR0QKaND0VgAAAAd0SU1FB+QJEgorLYg5 KpsAAAE/SURBVDjLxZLNS8NAEMXbGKLHQsF6VBe827FOvAnpx70liLciIXcZYTwqUdo/28l2Qzfj 7smDAzmEt/vmN29nMPhLDWNCMooI45iw2EYEcxnp/X4bFtL8PgKVT8PCBe/CWMWueQxD7ZswVrPn 1yBtznwXhELmINYZS/lYWbWsq/m8NgxIN3W1rKqX6/ZAOittIQEiSJXl7NneTDYkv+0HbAsfnGMB h0JilgMIVx3ot1NYwJjo7Ui6sRcArdPUQys6q9bMz8WZIRB6RkczYOgZeWTMWxVI9nQQfqWVYDsi ca6FMdg4mPTrLmwswqt7GHtc5v5Qz0duclRLlwoUfcmTsFo6gcL1KJPJFe+ptJCMVqixCqJ2dYZG YxmXUQZq6QjcwQn2li6Fz47b9LCS9THNHtaJ13HiY537IegY/6F+AKqTW3idEuXzAAAAJXRFWHRk YXRlOmNyZWF0ZQAyMDIwLTA5LTE4VDEwOjQzOjQ1KzAwOjAwNvmniQAAACV0RVh0ZGF0ZTptb2Rp ZnkAMjAyMC0wOS0xOFQxMDo0Mzo0NSswMDowMEekHzUAAAAASUVORK5CYII= X-Now-Playing: Stina Nordenstam's _Dynamite_: "Almost A Smile" Date: Fri, 18 Sep 2020 12:59:09 +0200 In-Reply-To: <87mu1npjmj.fsf@mail.linkov.net> (Juri Linkov's message of "Fri, 18 Sep 2020 11:35:48 +0300") Message-ID: <87wo0rjqpu.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Juri Linkov writes: > I see that you reverted it now because it breaks on "foo" in text-mode. > But the previous version is worse: it deletes wrong text on "foo" > in text-mode. Heh, I was misreading the tests -- I thought that the first one of these was the one that failed, and not the second, kinda weird one: Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) 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 (-) Juri Linkov writes: > I see that you reverted it now because it breaks on "foo" in text-mode. > But the previous version is worse: it deletes wrong text on "foo" > in text-mode. Heh, I was misreading the tests -- I thought that the first one of these was the one that failed, and not the second, kinda weird one: (ert-deftest lisp-delete-pair-quotation-marks () "Test \\[delete-pair] with quotation marks." (with-temp-buffer (insert "\"foo\"") (goto-char (point-min)) (delete-pair) (should (string-equal "foo" (buffer-string))))) (ert-deftest lisp-delete-pair-quotes-in-text-mode () "Test \\[delete-pair] against string in Text Mode for #15014." (with-temp-buffer (text-mode) (insert "\"foo\"") (goto-char (point-min)) (delete-pair) (should (string-equal "fo\"" (buffer-string))))) So in text mode, delete-pair just deletes two characters, and that doesn't seem helpful. The patch I reverted made it bug out instead, which seems better. However, bug#15014 says: > I'm not arguing here that we font lock double quoted strings (though > I'm not convinced either). Without font locking, I can't think of a > concrete case that yields the "pretty annoying behavior". What do you > have in mind? > > I added > > (modify-syntax-entry ?\" "$") > > to my configuration and find that forward-sexp and delete-pair seem to > work without confusion, even in the presence of odd double quotes. It > seems forward-sexp just scans forward from point. And the patch wouldn't allow this, either, so I'm not sure this behavioural change would be welcome -- the user would have to alter insert-pair-alist in text mode, too. So... I think the current thing delete-pair does in text-mode is bad, so I'm inclined to re-apply the patch, and announce this as an incompatible change in NEWS (and explain how to get the behaviour described above back). Any opinions? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 18 06:59:35 2020 Received: (at control) by debbugs.gnu.org; 18 Sep 2020 10:59:35 +0000 Received: from localhost ([127.0.0.1]:41019 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJE74-00016O-Tn for submit@debbugs.gnu.org; Fri, 18 Sep 2020 06:59:35 -0400 Received: from quimby.gnus.org ([95.216.78.240]:52662) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJE72-000168-RU for control@debbugs.gnu.org; Fri, 18 Sep 2020 06:59:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=GknXqX0+bzOSv8Lty8Tiys6sMiMY7/DEUjOqoE1cyJQ=; b=Z7qQRrHk4TcbSy8b00dIFBBzyo KChY9FBm0onYwxveo3IIas5nVKEW84ygshLAW3LEK0XSIUSmuTStZ9+sqXX2eaE9E9skRyQGD25Hd lRsPRorts9X0nRYzIKQrXAIx2bmNmbMm4y4w/ZBwBXPiWX0Nmdn/1rhXu0Aw+9ngAoSw=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kJE6u-0004vA-Pw for control@debbugs.gnu.org; Fri, 18 Sep 2020 12:59:26 +0200 Date: Fri, 18 Sep 2020 12:59:23 +0200 Message-Id: <87v9gbjqpg.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #4136 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: reopen 4136 tags 4136 - fixed patch quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control 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 (-) reopen 4136 tags 4136 - fixed patch quit From unknown Sat Jun 14 03:55:06 2025 X-Loop: help-debbugs@gnu.org Subject: bug#4136: 23.1; delete-pair Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 21 Sep 2020 19:15:02 +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 To: Lars Ingebrigtsen Cc: martin rudalics , Eli Barzilay , 4136@debbugs.gnu.org Received: via spool by 4136-submit@debbugs.gnu.org id=B4136.160071568430464 (code B ref 4136); Mon, 21 Sep 2020 19:15:02 +0000 Received: (at 4136) by debbugs.gnu.org; 21 Sep 2020 19:14:44 +0000 Received: from localhost ([127.0.0.1]:56262 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kKRGu-0007vI-Cb for submit@debbugs.gnu.org; Mon, 21 Sep 2020 15:14:44 -0400 Received: from relay12.mail.gandi.net ([217.70.178.232]:59077) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kKRGo-0007uY-A2 for 4136@debbugs.gnu.org; Mon, 21 Sep 2020 15:14:38 -0400 Received: from mail.gandi.net (m91-129-108-13.cust.tele2.ee [91.129.108.13]) (Authenticated sender: juri@linkov.net) by relay12.mail.gandi.net (Postfix) with ESMTPSA id 3D78320000D; Mon, 21 Sep 2020 19:14:29 +0000 (UTC) From: Juri Linkov Organization: LINKOV.NET References: <19075.45378.67131.491453@winooski.ccs.neu.edu> <873a7uc8mg.fsf@mail.jurta.org> <4A8689EE.9020402@gmx.at> <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> Date: Mon, 21 Sep 2020 22:12:29 +0300 In-Reply-To: <87wo0rjqpu.fsf@gnus.org> (Lars Ingebrigtsen's message of "Fri, 18 Sep 2020 12:59:09 +0200") Message-ID: <871rivdrqy.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.4 (/) 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.4 (-) > (ert-deftest lisp-delete-pair-quotes-in-text-mode () > "Test \\[delete-pair] against string in Text Mode for #15014." > (with-temp-buffer > (text-mode) > (insert "\"foo\"") > (goto-char (point-min)) > (delete-pair) > (should (string-equal "fo\"" (buffer-string))))) > > So in text mode, delete-pair just deletes two characters, and that > doesn't seem helpful. The patch I reverted made it bug out instead, > which seems better. Yes, it's better to bug out than to delete text instead of deleting quotes. > I think the current thing delete-pair does in text-mode is bad, so I'm > inclined to re-apply the patch, and announce this as an incompatible > change in NEWS (and explain how to get the behaviour described above > back). > > Any opinions? If it's really impossible to delete a pair in text-mode, then better to signal an error. From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 22 10:44:40 2020 Received: (at control) by debbugs.gnu.org; 22 Sep 2020 14:44:40 +0000 Received: from localhost ([127.0.0.1]:32822 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kKjX6-0000IH-AX for submit@debbugs.gnu.org; Tue, 22 Sep 2020 10:44:40 -0400 Received: from quimby.gnus.org ([95.216.78.240]:60748) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kKjX5-0000I3-0y for control@debbugs.gnu.org; Tue, 22 Sep 2020 10:44:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=GrU7pKhvYrI8g0mgODbnZl8GTchEf4V17KNnQ88PYm4=; b=tQo8FVnPWWJFcbmiipWgQ9vYoS 4TXmUNFluqVDGWHtbn/NZrlJCmRqYlkJfH2xHFboTdrZph+6xr/mLiqJVy9K4Z9mv3MlB1QyclnW6 HVEgOQYJ/EyL3SOZgq8Jn788go6cNaImt6mo29N0nemLXumSqSaIu4ThtFAW618t+InA=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kKjWw-0003gx-El for control@debbugs.gnu.org; Tue, 22 Sep 2020 16:44:32 +0200 Date: Tue, 22 Sep 2020 16:44:29 +0200 Message-Id: <877dslj2gi.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #4136 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 4136 fixed close 4136 28.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control 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 (-) tags 4136 fixed close 4136 28.1 quit From unknown Sat Jun 14 03:55:06 2025 X-Loop: help-debbugs@gnu.org Subject: bug#4136: 23.1; delete-pair Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 22 Sep 2020 14:46: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 To: Juri Linkov Cc: martin rudalics , Eli Barzilay , 4136@debbugs.gnu.org Received: via spool by 4136-submit@debbugs.gnu.org id=B4136.16007859161256 (code B ref 4136); Tue, 22 Sep 2020 14:46:01 +0000 Received: (at 4136) by debbugs.gnu.org; 22 Sep 2020 14:45:16 +0000 Received: from localhost ([127.0.0.1]:32828 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kKjXf-0000KC-Lt for submit@debbugs.gnu.org; Tue, 22 Sep 2020 10:45:15 -0400 Received: from quimby.gnus.org ([95.216.78.240]:60784) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kKjXe-0000Jx-3i for 4136@debbugs.gnu.org; Tue, 22 Sep 2020 10:45:14 -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:In-Reply-To:Date: References: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=an0xeTZK43NCgTmB/ZO1rE8McAEu+kjfHqbqWVmj7KY=; b=HgdnbJqPk6v/4FGjKenDCqB/4p sNiHh9CXOb2LtEy+utzxRUu8IHz6ZAXkmvTlN2Sw98/BvnhPORNfLpJ90ZAz79bhoSTOsIV0Gmrm3 Jo2/+pxJLRgmeXjXXh/lwd6QaP2Q0fw8auNIcKGYC6eBjwxn7bYwMu8IT1qIOeZxB414=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kKjXV-0003hJ-9W; Tue, 22 Sep 2020 16:45:07 +0200 From: Lars Ingebrigtsen References: <19075.45378.67131.491453@winooski.ccs.neu.edu> <4A8689EE.9020402@gmx.at> <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> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAElBMVEX409L89/fiucr2 z4lVr/H///9iL0ZOAAAAAWJLR0QF+G/pxwAAAAd0SU1FB+QJFg4fHOqm5t0AAAG2SURBVDjLbZKL teMgDEQlpQHEugDQcQHOYxtwDv3XtCOBHZK3+BPgRiNpMFFiItyaSFnfg0oqZmTGgreKsJZYOhAi PAUvJQDCkgbQVNKYFAdYDqlfQP3tCuRyxdclu1QAs+JpLQAFEE7fEVQjgpHkI0cewLv4BOkGEuV6 4RNwDhd49OGZUxWrCf1LISFznMi9Srg47jGYRCt+MirCnDP+STlsNYYxNWstEEZSTCVAGSBV1FCV vHcaB+GCE8BskrAWQYZaa0hFRMEUgNm9N6sZO+4KaoXF5ADXT68JwYKsLLspB9DU/vZ+nXTuLyvj zOnPoR3jhd1atzMZBjt4PDWIw30/NVsMOo4LvPbeATT2CzW6I3awU0PL5BP0Gxg9Ro79lgIQlzra MSNsB7mSEzWAbYL+fxDjAqiqtRV0lSjKVhCpRoSMiDz293BmSHGAYdaI04yvxs+hPQB87+zTSw+o 8MojXGRbQMlG6QJ9wGniBLOsc7ukvoCuQN2r7eq6n29wHG+pFTzb8wa9OpABmoPr0F3usrc11sVF XcBzBXUBkTyvUjIAtLZ+p3HgQQ5agOkLmsE3muwfrVOIdBoFJq8AAAAldEVYdGRhdGU6Y3JlYXRl ADIwMjAtMDktMjJUMTQ6MzE6MjgrMDA6MDDbH4FOAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIwLTA5 LTIyVDE0OjMxOjI4KzAwOjAwqkI58gAAAABJRU5ErkJggg== X-Now-Playing: Hercules & Love Affair's _Hercules & Love Affair_: "Blind" Date: Tue, 22 Sep 2020 16:45:03 +0200 In-Reply-To: <871rivdrqy.fsf@mail.linkov.net> (Juri Linkov's message of "Mon, 21 Sep 2020 22:12:29 +0300") Message-ID: <873639j2fk.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Juri Linkov writes: > 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. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) 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 (-) Juri Linkov writes: > 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. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Sat Jun 14 03:55:06 2025 X-Loop: help-debbugs@gnu.org Subject: bug#4136: 23.1; delete-pair 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 To: Lars Ingebrigtsen Cc: martin rudalics , Eli Barzilay , 4136@debbugs.gnu.org Received: via spool by 4136-submit@debbugs.gnu.org id=B4136.16007987566882 (code B ref 4136); Tue, 22 Sep 2020 18:20:01 +0000 Received: (at 4136) by debbugs.gnu.org; 22 Sep 2020 18:19:16 +0000 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 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 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) From: Juri Linkov Organization: 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> Date: Tue, 22 Sep 2020 21:18:23 +0300 In-Reply-To: <873639j2fk.fsf@gnus.org> (Lars Ingebrigtsen's message of "Tue, 22 Sep 2020 16:45:03 +0200") Message-ID: <873639eq9o.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) 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: -0.7 (/) >> 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)))) From unknown Sat Jun 14 03:55:06 2025 X-Loop: help-debbugs@gnu.org Subject: bug#4136: 23.1; delete-pair Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 23 Sep 2020 13:16: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 To: Juri Linkov Cc: martin rudalics , Eli Barzilay , 4136@debbugs.gnu.org Received: via spool by 4136-submit@debbugs.gnu.org id=B4136.160086694410362 (code B ref 4136); Wed, 23 Sep 2020 13:16:01 +0000 Received: (at 4136) by debbugs.gnu.org; 23 Sep 2020 13:15:44 +0000 Received: from localhost ([127.0.0.1]:34805 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kL4cZ-0002h4-U3 for submit@debbugs.gnu.org; Wed, 23 Sep 2020 09:15:44 -0400 Received: from quimby.gnus.org ([95.216.78.240]:44272) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kL4cX-0002gi-JO for 4136@debbugs.gnu.org; Wed, 23 Sep 2020 09:15:42 -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:In-Reply-To:Date: References: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=Nvvp1QhwTNIAcQjLPLJQRRxWkbQk5mJC5oZkkLTFXR8=; b=JqZdG8JnesFep2GfsXIdYoeCvr qOwH9hqjzWiZcr7S/hqyxgKQVwaZI0QyPLEdBbzTKbyrPhSRHwnHe6IEGVfZqZ5yQuW4oV5OHf0S1 WW2pKEbOM2DE/lY8RmIDJkVMID9KjBo1xeJ2JjQ/vHlaWcXthlRXOFA61cDDqvlGl16A=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kL4cN-0007lo-UF; Wed, 23 Sep 2020 15:15:34 +0200 From: Lars Ingebrigtsen References: <19075.45378.67131.491453@winooski.ccs.neu.edu> <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> <873639eq9o.fsf@mail.linkov.net> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAGFBMVEUpKCYfHRxIRjxR UEhAPjpqaWKEgnn///8ghV9sAAAAAWJLR0QHFmGI6wAAAAd0SU1FB+QJFwwgNtL7tjwAAAGISURB VDjLnZO/csMgDMaFCZlxfN4pNDuHTpm7dM+Z4wl66fs/QiXiJPhPlmoAW79In/hwAJpQvQT0FsDC BthVsgan9wFYxWkFe2Qv3TkAHZdEBsEUe4dfIbYNOgCTUrT8C90WUClXE1JaC9jJewaIa9UhJR8N pQraViYFboXbCgY4GY/oYOmS8azxzcuHvEUI2jbgiBhU1MjgKWNugThFSV5cO0Apctwhir/s/lNG 0VWex+vGvlJTl5dLh/vkNEkryv5h6UN78ucSeV0fkKdNIRf2Ki3yKjDw4YdBWMgr9D5MHQrIrSGQ vKeb0WkD+Dbo93zikpBfNw1wqhU0YGD3WzByRXA4iFRpO41c4RWNxPsCGAGAI66AOnoBWVotwUWA yiOtgSQ+gYZd4MBY2akF5Q4gr0G+gyg7tpbkOpW+duxytM1NVeAAxUzXHlBOLCUgaxu6FD40P3QM VM9/XWUfUphnoDQZIsL5JlWvJ9lZIhByPj4/JEUzmFs1Flc1eBPdO3CAf0bV/gPFW0REvhNm3gAA ACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMC0wOS0yM1QxMjozMjo1NCswMDowMPPAF2wAAAAldEVYdGRh dGU6bW9kaWZ5ADIwMjAtMDktMjNUMTI6MzI6NTQrMDA6MDCCna/QAAAAAElFTkSuQmCC X-Now-Playing: Herbert's _Bodily Functions_: "You Saw It All" Date: Wed, 23 Sep 2020 15:15:29 +0200 In-Reply-To: <873639eq9o.fsf@mail.linkov.net> (Juri Linkov's message of "Tue, 22 Sep 2020 21:18:23 +0300") Message-ID: <87r1qsd47i.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Juri Linkov writes: > 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 [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) 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 (-) Juri Linkov writes: > 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? Makes sense to me, but I'm not a regular user of delete-pair, so I don't know whether that'd be annoying or reassuring... -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 12 15:35:50 2020 Received: (at control) by debbugs.gnu.org; 12 Nov 2020 20:35:50 +0000 Received: from localhost ([127.0.0.1]:45740 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kdJJt-00059M-P7 for submit@debbugs.gnu.org; Thu, 12 Nov 2020 15:35:49 -0500 Received: from relay7-d.mail.gandi.net ([217.70.183.200]:60125) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kdJJs-000596-5g for control@debbugs.gnu.org; Thu, 12 Nov 2020 15:35:48 -0500 X-Originating-IP: 91.129.97.46 Received: from mail.gandi.net (m91-129-97-46.cust.tele2.ee [91.129.97.46]) (Authenticated sender: juri@linkov.net) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id BFC0920008 for ; Thu, 12 Nov 2020 20:35:40 +0000 (UTC) From: Juri Linkov To: control@debbugs.gnu.org Subject: Re: Archived problem report bug#4136 (bug#4136: 23.1; delete-pair) Organization: LINKOV.NET References: <87lff672da.fsf@mail.linkov.net> <19075.45378.67131.491453@winooski.ccs.neu.edu> Date: Thu, 12 Nov 2020 22:35:27 +0200 In-Reply-To: (GNU bug Tracking System's message of "Thu, 12 Nov 2020 20:25:02 +0000") Message-ID: <87eeky71ps.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: control 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: -0.8 (/) unarchive 4136 quit From unknown Sat Jun 14 03:55:06 2025 X-Loop: help-debbugs@gnu.org Subject: bug#4136: 23.1; delete-pair Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 12 Nov 2020 20:40: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 To: Lars Ingebrigtsen Cc: martin rudalics , Eli Barzilay , 4136@debbugs.gnu.org Received: via spool by 4136-submit@debbugs.gnu.org id=B4136.160521359520174 (code B ref 4136); Thu, 12 Nov 2020 20:40:01 +0000 Received: (at 4136) by debbugs.gnu.org; 12 Nov 2020 20:39:55 +0000 Received: from localhost ([127.0.0.1]:45745 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kdJNr-0005FK-8n for submit@debbugs.gnu.org; Thu, 12 Nov 2020 15:39:55 -0500 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:36943) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kdJNp-0005F5-F0 for 4136@debbugs.gnu.org; Thu, 12 Nov 2020 15:39:54 -0500 X-Originating-IP: 91.129.97.46 Received: from mail.gandi.net (m91-129-97-46.cust.tele2.ee [91.129.97.46]) (Authenticated sender: juri@linkov.net) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 9678AE0002 for <4136@debbugs.gnu.org>; Thu, 12 Nov 2020 20:39:46 +0000 (UTC) From: Juri Linkov Organization: LINKOV.NET References: <19075.45378.67131.491453@winooski.ccs.neu.edu> <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> <873639eq9o.fsf@mail.linkov.net> <87r1qsd47i.fsf@gnus.org> Date: Thu, 12 Nov 2020 22:21:21 +0200 In-Reply-To: <87r1qsd47i.fsf@gnus.org> (Lars Ingebrigtsen's message of "Wed, 23 Sep 2020 15:15:29 +0200") Message-ID: <87lff672da.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.3 (/) 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: -0.7 (/) --=-=-= Content-Type: text/plain >> 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? > > Makes sense to me, but I'm not a regular user of delete-pair, so I don't > know whether that'd be annoying or reassuring... After a month of using it the following patch proved to be useful. It adds anew new defcustom delete-pair-blink-delay based on the default value of blink-matching-delay. Exactly the same defcustom is also added copy-region-blink-delay for the feature request in bug#42865 not to blink when copying a region: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=blink-delay.patch diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el index 35590123ee..be2adfa848 100644 --- a/lisp/emacs-lisp/lisp.el +++ b/lisp/emacs-lisp/lisp.el @@ -784,9 +784,17 @@ insert-parentheses (interactive "P") (insert-pair arg ?\( ?\))) +(defcustom delete-pair-blink-delay blink-matching-delay + "Time in seconds to delay after showing a pair character to delete. +No timeout in case of 0." + :type 'number + :group 'lisp + :version "28.1") + (defun delete-pair (&optional arg) "Delete a pair of characters enclosing ARG sexps that follow point. -A negative ARG deletes a pair around the preceding ARG sexps instead." +A negative ARG deletes a pair around the preceding ARG sexps instead. +The option `delete-pair-blink-delay' can disable blinking." (interactive "P") (if arg (setq arg (prefix-numeric-value arg)) @@ -802,6 +810,9 @@ delete-pair (if (= (length p) 3) (cdr p) p)) insert-pair-alist)) (error "Not after matching pair")) + (when (and (natnump delete-pair-blink-delay) + (> delete-pair-blink-delay 0)) + (sit-for delete-pair-blink-delay)) (delete-char 1))) (delete-char -1)) (save-excursion @@ -814,6 +825,9 @@ delete-pair (if (= (length p) 3) (cdr p) p)) insert-pair-alist)) (error "Not before matching pair")) + (when (and (natnump delete-pair-blink-delay) + (> delete-pair-blink-delay 0)) + (sit-for delete-pair-blink-delay)) (delete-char -1))) (delete-char 1)))) diff --git a/lisp/simple.el b/lisp/simple.el index e96c7c9a6e..3d18909f2c 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -5089,9 +5089,9 @@ kill-ring-save (defun indicate-copied-region (&optional message-len) "Indicate that the region text has been copied interactively. -If the mark is visible in the selected window, blink the cursor -between point and mark if there is currently no active region -highlighting. +If the mark is visible in the selected window, blink the cursor between +point and mark if there is currently no active region highlighting. +The option `copy-region-blink-delay' can disable blinking. If the mark lies outside the selected window, display an informative message containing a sample of the copied text. The @@ -5106,11 +5106,13 @@ indicate-copied-region ;; Swap point-and-mark quickly so as to show the region that ;; was selected. Don't do it if the region is highlighted. (unless (and (region-active-p) - (face-background 'region nil t)) + (face-background 'region nil t) + (natnump copy-region-blink-delay) + (> copy-region-blink-delay 0)) ;; Swap point and mark. (set-marker (mark-marker) (point) (current-buffer)) (goto-char mark) - (sit-for blink-matching-delay) + (sit-for copy-region-blink-delay) ;; Swap back. (set-marker (mark-marker) mark (current-buffer)) (goto-char point) @@ -8135,6 +8139,13 @@ blink-paren-post-self-insert-function ;; `sit-for'. That's also the reason it get a `priority' prop ;; of 100. 'append) + +(defcustom copy-region-blink-delay blink-matching-delay + "Time in seconds to delay after showing a pair character to delete. +No timeout in case of 0." + :type 'number + :group 'killing + :version "28.1") ;; This executes C-g typed while Emacs is waiting for a command. ;; Quitting out of a program does not go through here; --=-=-=-- From unknown Sat Jun 14 03:55:06 2025 X-Loop: help-debbugs@gnu.org Subject: bug#4136: 23.1; delete-pair Resent-From: "Basil L. Contovounesios" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 12 Nov 2020 21:17:02 +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 To: Juri Linkov Cc: Lars Ingebrigtsen , 4136@debbugs.gnu.org, Eli Barzilay Received: via spool by 4136-submit@debbugs.gnu.org id=B4136.160521577331637 (code B ref 4136); Thu, 12 Nov 2020 21:17:02 +0000 Received: (at 4136) by debbugs.gnu.org; 12 Nov 2020 21:16:13 +0000 Received: from localhost ([127.0.0.1]:45778 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kdJwy-0008EC-QV for submit@debbugs.gnu.org; Thu, 12 Nov 2020 16:16:13 -0500 Received: from mail-wm1-f50.google.com ([209.85.128.50]:56297) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kdJww-0008Dz-MP for 4136@debbugs.gnu.org; Thu, 12 Nov 2020 16:16:11 -0500 Received: by mail-wm1-f50.google.com with SMTP id c9so6447412wml.5 for <4136@debbugs.gnu.org>; Thu, 12 Nov 2020 13:16:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=olSrtZ+Xlb9RLktxw/X68bqBMqi6q9WwP1M9EtlLGtU=; b=Uel6nOjZN1nOyrFLVPv3dSbWjar3iJ1FU5aQ1gmvWkjkSTmpOz6GQGpwVulJ/+eFGa nqP6VleO5+orSaU+qUnyPDVdL03a+CJr5MCO85dOigi4BuwuJZiRxQtwkbDLekCAjJcv fD2u2qO47tyIUZYCbr1xIEkX5FrO5cGFuM+QJsJusNF9JJL6DtDTnOpowYIsLMh0fo2H F3hePwAKfsMdBAPmnEyt7gb+gn/CVqUT6AMcqaaV783ukyvWDp6H88YHuwfKEVDDmlNc NlQDw+YYDAEZ599UYJkTxjUhmmibfLBu1cmIT1F0UBak8maP4Vs6cBSWmto+EjfgN8pm Qikg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=olSrtZ+Xlb9RLktxw/X68bqBMqi6q9WwP1M9EtlLGtU=; b=PTDwyTogNFpJuiKQTwxOFG8wou/l1Fxi0njZpgbuaay4NPhCvErU5OUc+GdUuvby58 MXe6Tv69AF6yRNFk07LL8Z/qHzsOUQxGiyabKdkl03ZfiekUZKirddJLVou1VU2leXqK uv5da+0533MmXmFC9X1keubV4gCCj4F5ttAqKcskgwFQi54Lbd0+gPAawwPVKx/SvqCd 038tRJBwTLIeuBBc1K7aVE0F82CNKkRwMXwd1nNV1nAbNKugD9CWWkjmY+sYJVwdp8fQ RyBIIKav0r/87feoVQdLkack+94vrkec8xmGvTSdUe2DC01J3GPRfvUOflV+v4Rv3N6j FWsg== X-Gm-Message-State: AOAM531DzaaVwIFUmakAaNanbDLCkINYbMLe0bUqeWbhbEqe8WnTHqEp FKk8bUq1Izl+vUJmIOWsGG5LBjsTZkBS/yWo X-Google-Smtp-Source: ABdhPJzXo8pniRfKbAmcpyuKQTpRFP18WS1aHDDxOJVa2z8WOugU9L/al7XHHQpC8WQL1jVG8rEcKA== X-Received: by 2002:a1c:c203:: with SMTP id s3mr1585097wmf.77.1605215764983; Thu, 12 Nov 2020 13:16:04 -0800 (PST) Received: from localhost ([93.107.212.184]) by smtp.gmail.com with ESMTPSA id 30sm772090wrd.88.2020.11.12.13.16.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Nov 2020 13:16:03 -0800 (PST) From: "Basil L. Contovounesios" References: <19075.45378.67131.491453@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> <873639eq9o.fsf@mail.linkov.net> <87r1qsd47i.fsf@gnus.org> <87lff672da.fsf@mail.linkov.net> Date: Thu, 12 Nov 2020 21:16:02 +0000 In-Reply-To: <87lff672da.fsf@mail.linkov.net> (Juri Linkov's message of "Thu, 12 Nov 2020 22:21:21 +0200") Message-ID: <87o8k2nunh.fsf@tcd.ie> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) 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 (-) Juri Linkov writes: > @@ -802,6 +810,9 @@ delete-pair > (if (= (length p) 3) (cdr p) p)) > insert-pair-alist)) > (error "Not after matching pair")) > + (when (and (natnump delete-pair-blink-delay) > + (> delete-pair-blink-delay 0)) > + (sit-for delete-pair-blink-delay)) Why can't the delay be a float? Thanks, -- Basil From unknown Sat Jun 14 03:55:06 2025 X-Loop: help-debbugs@gnu.org Subject: bug#4136: 23.1; delete-pair Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 13 Nov 2020 08:33:02 +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 To: "Basil L. Contovounesios" Cc: Lars Ingebrigtsen , 4136@debbugs.gnu.org, Eli Barzilay Received: via spool by 4136-submit@debbugs.gnu.org id=B4136.160525633922696 (code B ref 4136); Fri, 13 Nov 2020 08:33:02 +0000 Received: (at 4136) by debbugs.gnu.org; 13 Nov 2020 08:32:19 +0000 Received: from localhost ([127.0.0.1]:46602 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kdUV2-0005tl-En for submit@debbugs.gnu.org; Fri, 13 Nov 2020 03:32:19 -0500 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:32991) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kdUUz-0005t2-VL for 4136@debbugs.gnu.org; Fri, 13 Nov 2020 03:32:02 -0500 X-Originating-IP: 91.129.97.46 Received: from mail.gandi.net (m91-129-97-46.cust.tele2.ee [91.129.97.46]) (Authenticated sender: juri@linkov.net) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id D57E3E0017; Fri, 13 Nov 2020 08:31:53 +0000 (UTC) From: Juri Linkov Organization: LINKOV.NET References: <19075.45378.67131.491453@winooski.ccs.neu.edu> <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> <873639eq9o.fsf@mail.linkov.net> <87r1qsd47i.fsf@gnus.org> <87lff672da.fsf@mail.linkov.net> <87o8k2nunh.fsf@tcd.ie> Date: Fri, 13 Nov 2020 10:29:08 +0200 In-Reply-To: <87o8k2nunh.fsf@tcd.ie> (Basil L. Contovounesios's message of "Thu, 12 Nov 2020 21:16:02 +0000") Message-ID: <87zh3l4q3v.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.3 (/) 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: -0.7 (/) --=-=-= Content-Type: text/plain >> @@ -802,6 +810,9 @@ delete-pair >> (if (= (length p) 3) (cdr p) p)) >> insert-pair-alist)) >> (error "Not after matching pair")) >> + (when (and (natnump delete-pair-blink-delay) >> + (> delete-pair-blink-delay 0)) >> + (sit-for delete-pair-blink-delay)) > > Why can't the delay be a float? My mistake was influenced by the lack of the function that would check for a positive number (e.g. 'positive-number-p'). I tried to find such a function, then noticed that 'natnump' at least checks for a non-negative number, but I forgot that this applies only to integers. So below is a fixed patch: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=blink-delay-2.patch diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el index 35590123ee..dca132cc7f 100644 --- a/lisp/emacs-lisp/lisp.el +++ b/lisp/emacs-lisp/lisp.el @@ -784,9 +784,18 @@ insert-parentheses (interactive "P") (insert-pair arg ?\( ?\))) +(defcustom delete-pair-blink-delay blink-matching-delay + "Time in seconds to delay after showing a pair character to delete. +The value 0 disables blinking." + :type 'number + :set-after '(blink-matching-delay) + :group 'lisp + :version "28.1") + (defun delete-pair (&optional arg) "Delete a pair of characters enclosing ARG sexps that follow point. -A negative ARG deletes a pair around the preceding ARG sexps instead." +A negative ARG deletes a pair around the preceding ARG sexps instead. +The option `delete-pair-blink-delay' can disable blinking." (interactive "P") (if arg (setq arg (prefix-numeric-value arg)) @@ -802,6 +811,9 @@ delete-pair (if (= (length p) 3) (cdr p) p)) insert-pair-alist)) (error "Not after matching pair")) + (when (and (numberp delete-pair-blink-delay) + (> delete-pair-blink-delay 0)) + (sit-for delete-pair-blink-delay)) (delete-char 1))) (delete-char -1)) (save-excursion @@ -814,6 +826,9 @@ delete-pair (if (= (length p) 3) (cdr p) p)) insert-pair-alist)) (error "Not before matching pair")) + (when (and (numberp delete-pair-blink-delay) + (> delete-pair-blink-delay 0)) + (sit-for delete-pair-blink-delay)) (delete-char -1))) (delete-char 1)))) diff --git a/lisp/simple.el b/lisp/simple.el index e96c7c9a6e..d7626e354a 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -5087,11 +5087,19 @@ kill-ring-save (if (called-interactively-p 'interactive) (indicate-copied-region))) +(defcustom copy-region-blink-delay blink-matching-delay + "Time in seconds to delay after showing a pair character to delete. +The value 0 disables blinking." + :type 'number + :set-after '(blink-matching-delay) + :group 'killing + :version "28.1") + (defun indicate-copied-region (&optional message-len) "Indicate that the region text has been copied interactively. -If the mark is visible in the selected window, blink the cursor -between point and mark if there is currently no active region -highlighting. +If the mark is visible in the selected window, blink the cursor between +point and mark if there is currently no active region highlighting. +The option `copy-region-blink-delay' can disable blinking. If the mark lies outside the selected window, display an informative message containing a sample of the copied text. The @@ -5105,12 +5113,14 @@ indicate-copied-region (if (pos-visible-in-window-p mark (selected-window)) ;; Swap point-and-mark quickly so as to show the region that ;; was selected. Don't do it if the region is highlighted. - (unless (and (region-active-p) - (face-background 'region nil t)) + (when (and (numberp copy-region-blink-delay) + (> copy-region-blink-delay 0) + (or (not (region-active-p)) + (not (face-background 'region nil t)))) ;; Swap point and mark. (set-marker (mark-marker) (point) (current-buffer)) (goto-char mark) - (sit-for blink-matching-delay) + (sit-for copy-region-blink-delay) ;; Swap back. (set-marker (mark-marker) mark (current-buffer)) (goto-char point) --=-=-=-- From unknown Sat Jun 14 03:55:06 2025 X-Loop: help-debbugs@gnu.org Subject: bug#4136: 23.1; delete-pair Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 16 Nov 2020 21:01:03 +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 To: "Basil L. Contovounesios" Cc: Lars Ingebrigtsen , 4136@debbugs.gnu.org, Eli Barzilay Received: via spool by 4136-submit@debbugs.gnu.org id=B4136.16055604056108 (code B ref 4136); Mon, 16 Nov 2020 21:01:03 +0000 Received: (at 4136) by debbugs.gnu.org; 16 Nov 2020 21:00:05 +0000 Received: from localhost ([127.0.0.1]:57512 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kelbY-0001Zy-Jx for submit@debbugs.gnu.org; Mon, 16 Nov 2020 16:00:05 -0500 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:37541) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kelbV-0001Xa-6x for 4136@debbugs.gnu.org; Mon, 16 Nov 2020 16:00:03 -0500 X-Originating-IP: 91.129.97.46 Received: from mail.gandi.net (m91-129-97-46.cust.tele2.ee [91.129.97.46]) (Authenticated sender: juri@linkov.net) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 8FC5260007; Mon, 16 Nov 2020 20:59:53 +0000 (UTC) From: Juri Linkov Organization: LINKOV.NET References: <19075.45378.67131.491453@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> <873639eq9o.fsf@mail.linkov.net> <87r1qsd47i.fsf@gnus.org> <87lff672da.fsf@mail.linkov.net> <87o8k2nunh.fsf@tcd.ie> <87zh3l4q3v.fsf@mail.linkov.net> Date: Mon, 16 Nov 2020 22:55:35 +0200 In-Reply-To: <87zh3l4q3v.fsf@mail.linkov.net> (Juri Linkov's message of "Fri, 13 Nov 2020 10:29:08 +0200") Message-ID: <87y2j110oo.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) 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: -0.7 (/) >> Why can't the delay be a float? > > My mistake was influenced by the lack of the function that > would check for a positive number (e.g. 'positive-number-p'). > I tried to find such a function, then noticed that 'natnump' > at least checks for a non-negative number, but I forgot that > this applies only to integers. The closest function that I found is: (cl-plusp NUMBER) Return t if NUMBER is positive. but I'm not sure why it would be better than using just (> number 0). > So below is a fixed patch: Now pushed to master. From unknown Sat Jun 14 03:55:06 2025 X-Loop: help-debbugs@gnu.org Subject: bug#4136: 23.1; delete-pair Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 16 Nov 2020 21:38:02 +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 To: Juri Linkov , "Basil L. Contovounesios" Cc: Lars Ingebrigtsen , 4136@debbugs.gnu.org, Eli Barzilay Received: via spool by 4136-submit@debbugs.gnu.org id=B4136.160556264717803 (code B ref 4136); Mon, 16 Nov 2020 21:38:02 +0000 Received: (at 4136) by debbugs.gnu.org; 16 Nov 2020 21:37:27 +0000 Received: from localhost ([127.0.0.1]:57556 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kemBj-0004d5-0X for submit@debbugs.gnu.org; Mon, 16 Nov 2020 16:37:27 -0500 Received: from aserp2130.oracle.com ([141.146.126.79]:53954) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kemBg-0004cp-Mc for 4136@debbugs.gnu.org; Mon, 16 Nov 2020 16:37:26 -0500 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0AGLOCfF068017; Mon, 16 Nov 2020 21:37:15 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=UFRkBmlUPfrUx5dPMxRcb7gRGEdX0RMH5+iVgXvRlHo=; b=qY5bDBWD2+a2PK68wwY6XQIQ0/ufPBZ8vrn78oicSPjHVrRqOkZe4DUXxRWfUFVVLnUt M1P6RkQzm3DsrGo6bq64tDF3eQJ2gjZJYD6WUZPRbGnsPG6ozg5Of9JaQtDpK6eOl/5F s6JC2aAC7XwfqeLNl1OVRbYrDxY5d0M3CmeXvhWruu1UU68qx7z6G/qymWkke20+1ADU 8vsu9xMboiSGijWxxEAoKZCw2yGpdsDnXNukrgSrI/1sKzTCIymQi0iJdRTGl+sqmbXV mGPE6twYVxFGG5IfztRLI5apesdfEB76mRYG6rx1UEMC9T+/48u4pKpyKEfJcNS+Dq54 cg== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by aserp2130.oracle.com with ESMTP id 34t4raqk84-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 16 Nov 2020 21:37:15 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0AGLQTFl150689; Mon, 16 Nov 2020 21:37:14 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userp3030.oracle.com with ESMTP id 34ts5v7c6n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 16 Nov 2020 21:37:14 +0000 Received: from abhmp0010.oracle.com (abhmp0010.oracle.com [141.146.116.16]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 0AGLbA2m027681; Mon, 16 Nov 2020 21:37:11 GMT MIME-Version: 1.0 Message-ID: <92b5e40b-6d21-48a1-905b-4b89265687d7@default> Date: Mon, 16 Nov 2020 13:37:09 -0800 (PST) From: Drew Adams References: <19075.45378.67131.491453@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> <873639eq9o.fsf@mail.linkov.net> <87r1qsd47i.fsf@gnus.org> <87lff672da.fsf@mail.linkov.net> <87o8k2nunh.fsf@tcd.ie> <87zh3l4q3v.fsf@mail.linkov.net> <87y2j110oo.fsf@mail.linkov.net> In-Reply-To: <87y2j110oo.fsf@mail.linkov.net> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.5071.0 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9807 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 spamscore=0 phishscore=0 suspectscore=0 mlxscore=0 malwarescore=0 bulkscore=0 mlxlogscore=983 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2011160127 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9807 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 clxscore=1011 malwarescore=0 impostorscore=0 lowpriorityscore=0 priorityscore=1501 mlxlogscore=999 adultscore=0 phishscore=0 suspectscore=0 spamscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2011160127 X-Spam-Score: -2.3 (--) 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 (---) > The closest function that I found is: >=20 > (cl-plusp NUMBER) > Return t if NUMBER is positive. >=20 > but I'm not sure why it would be better than using just (> number 0). It's there to emulate a Common Lisp predicate, `plusp'. Why does Common Lisp have `plusp'? Presumably for use with higher-order functions, to not have to use a lambda form etc. (mapcar #'plusp '(4 -3.1 0 42)) (mapcar (lambda (x) (> x 0)) '(4 -3.1 0 42))