From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Stuart D. Herring" Newsgroups: gmane.emacs.devel Subject: Re: transpose-sexps Date: Thu, 4 Jan 2007 14:49:14 -0800 (PST) Message-ID: <36997.128.165.123.18.1167950954.squirrel@webmail.lanl.gov> References: <200701042334.59847.pogonyshev@gmx.net> <36890.128.165.123.18.1167947308.squirrel@webmail.lanl.gov> <200701050002.14238.pogonyshev@gmx.net> Reply-To: herring@lanl.gov NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1167950994 12485 80.91.229.12 (4 Jan 2007 22:49:54 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 4 Jan 2007 22:49:54 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jan 04 23:49:52 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1H2bP4-0004b4-NF for ged-emacs-devel@m.gmane.org; Thu, 04 Jan 2007 23:49:43 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H2bP4-0002mx-6W for ged-emacs-devel@m.gmane.org; Thu, 04 Jan 2007 17:49:42 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H2bOk-0002jJ-T2 for emacs-devel@gnu.org; Thu, 04 Jan 2007 17:49:23 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H2bOi-0002gW-6q for emacs-devel@gnu.org; Thu, 04 Jan 2007 17:49:20 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H2bOh-0002gL-RM for emacs-devel@gnu.org; Thu, 04 Jan 2007 17:49:20 -0500 Original-Received: from [192.65.95.54] (helo=mailwasher-b.lanl.gov) by monty-python.gnu.org with esmtp (Exim 4.52) id 1H2bOf-0002vL-QU for emacs-devel@gnu.org; Thu, 04 Jan 2007 17:49:18 -0500 Original-Received: from mailrelay3.lanl.gov (mailrelay3.lanl.gov [128.165.4.104]) by mailwasher-b.lanl.gov (8.13.8/8.13.8/(ccn-5)) with ESMTP id l04MnFPl018608 for ; Thu, 4 Jan 2007 15:49:15 -0700 Original-Received: from webmail1.lanl.gov (webmail1.lanl.gov [128.165.4.106]) by mailrelay3.lanl.gov (8.13.8/8.13.8/(ccn-5)) with ESMTP id l04MnEat016191; Thu, 4 Jan 2007 15:49:14 -0700 Original-Received: from webmail1.lanl.gov (localhost.localdomain [127.0.0.1]) by webmail1.lanl.gov (8.12.11.20060308/8.12.11) with ESMTP id l04MnE2h026267; Thu, 4 Jan 2007 15:49:14 -0700 Original-Received: (from apache@localhost) by webmail1.lanl.gov (8.12.11.20060308/8.12.11/Submit) id l04MnEGJ026264; Thu, 4 Jan 2007 14:49:14 -0800 X-Authentication-Warning: webmail1.lanl.gov: apache set sender to herring@lanl.gov using -f Original-Received: from 128.165.123.18 (SquirrelMail authenticated user 196434) by webmail.lanl.gov with HTTP; Thu, 4 Jan 2007 14:49:14 -0800 (PST) In-Reply-To: <200701050002.14238.pogonyshev@gmx.net> Original-To: "Paul Pogonyshev" User-Agent: SquirrelMail/1.4.8-2.el3.7lanl X-Priority: 3 (Normal) Importance: Normal X-PMX-Version: 4.7.1.128075 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:64787 Archived-At: > It's not just confusing, it's a bug. If it doesn't work and this is not > (easily) fixable, make it do nothing or report an error. Producing > confusing > results is worse than doing nothing. > > Paul In the list case, it's not a bug, because it's impossible to guess the user's intentions. In (-!-foo bar) (baz spam) with point as always at -!-, is the "current sexp" (to be transposed with the following one) the symbol foo, or the list (foo bar)? For the string case, it would be possible to "fix" this, but to do nothing or report an error requires detecting the case just as much as doing the right thing. It is the detection which is hard -- just ask the CC mode people trying to sort out defun detection. Even in Lisp it's equivalent to asking how many unescaped " characters precede point, not counting those in comments (whose identification itself requires counting " in the same manner). Perhaps some clever caching or hints from the user could make that reasonable to implement, but there is no useful change at all that is easily made. Davis -- This product is sold by volume, not by mass. If it appears too dense or too sparse, it is because mass-energy conversion has occurred during shipping.