From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Barzilay Newsgroups: gmane.emacs.bugs Subject: bug#4136: 23.1; delete-pair Date: Fri, 14 Aug 2009 21:46:29 -0400 Message-ID: <19078.4981.525959.210519@winooski.ccs.neu.edu> 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> Reply-To: Eli Barzilay , 4136@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1250302031 28390 80.91.229.12 (15 Aug 2009 02:07:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 15 Aug 2009 02:07:11 +0000 (UTC) Cc: 4136@emacsbugs.donarmstrong.com To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Aug 15 04:07:04 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Mc8fe-0004mA-D1 for geb-bug-gnu-emacs@m.gmane.org; Sat, 15 Aug 2009 04:07:02 +0200 Original-Received: from localhost ([127.0.0.1]:57000 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mc8fd-00023Y-GR for geb-bug-gnu-emacs@m.gmane.org; Fri, 14 Aug 2009 22:07:01 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mc8fZ-00021W-He for bug-gnu-emacs@gnu.org; Fri, 14 Aug 2009 22:06:57 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mc8fV-0001zY-1a for bug-gnu-emacs@gnu.org; Fri, 14 Aug 2009 22:06:57 -0400 Original-Received: from [199.232.76.173] (port=40451 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mc8fU-0001zV-Qx for bug-gnu-emacs@gnu.org; Fri, 14 Aug 2009 22:06:52 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:33113) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Mc8fU-0002U9-7y for bug-gnu-emacs@gnu.org; Fri, 14 Aug 2009 22:06:52 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7F26noe010079; Fri, 14 Aug 2009 19:06:50 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n7F1t5pt007462; Fri, 14 Aug 2009 18:55:05 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Eli Barzilay Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sat, 15 Aug 2009 01:55:05 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 4136 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 4136-submit@emacsbugs.donarmstrong.com id=B4136.12503007936157 (code B ref 4136); Sat, 15 Aug 2009 01:55:05 +0000 Original-Received: (at 4136) by emacsbugs.donarmstrong.com; 15 Aug 2009 01:46:33 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-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 Original-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 In-Reply-To: <87pray9ezq.fsf@mail.jurta.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, 2) Resent-Date: Fri, 14 Aug 2009 22:06:57 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:30184 Archived-At: 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!