From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.devel Subject: RE: emacs-25 f708cb2: Clarify doc string of 'transpose-sexps' Date: Fri, 4 Nov 2016 07:31:41 -0700 (PDT) Message-ID: References: <20161104095223.23249.72530@vcs.savannah.gnu.org> <20161104095223.631AB22012D@vcs.savannah.gnu.org> <8737j7e3r5.fsf@gmx.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1478269943 28309 195.159.176.226 (4 Nov 2016 14:32:23 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 4 Nov 2016 14:32:23 +0000 (UTC) Cc: Eli Zaretskii To: Stephen Berman , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 04 15:32:19 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c2fXI-0005RT-FL for ged-emacs-devel@m.gmane.org; Fri, 04 Nov 2016 15:32:04 +0100 Original-Received: from localhost ([::1]:39184 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c2fXL-0007op-A3 for ged-emacs-devel@m.gmane.org; Fri, 04 Nov 2016 10:32:07 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57294) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c2fXE-0007nT-ER for emacs-devel@gnu.org; Fri, 04 Nov 2016 10:32:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c2fXD-0002Wr-I4 for emacs-devel@gnu.org; Fri, 04 Nov 2016 10:32:00 -0400 Original-Received: from userp1040.oracle.com ([156.151.31.81]:51222) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c2fX7-0002PQ-A7; Fri, 04 Nov 2016 10:31:53 -0400 Original-Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id uA4EVlAT027870 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 4 Nov 2016 14:31:48 GMT Original-Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0021.oracle.com (8.13.8/8.13.8) with ESMTP id uA4EVlCA020487 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 4 Nov 2016 14:31:47 GMT Original-Received: from abhmp0019.oracle.com (abhmp0019.oracle.com [141.146.116.25]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id uA4EVhmX000756; Fri, 4 Nov 2016 14:31:45 GMT In-Reply-To: <8737j7e3r5.fsf@gmx.net> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 12.0.6753.5000 (x86)] X-Source-IP: aserv0021.oracle.com [141.146.126.233] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 156.151.31.81 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:209151 Archived-At: > > +Unlike `transpose-words', point must be between the two sexps and not= =20 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > +in the middle of a sexp to be transposed. > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >=20 > The underlined sentence is not accurate, since transpose-sexps does > work like transpose-words if point is in the middle of a symbol or > number. Here's a more accurate statement: "If point is in the middle > of a list or string, you cannot transpose that sexp with another sexp." See bug #24860 (https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D24860). That bug points out that the doc statement is incorrect/incomplete. But your statement is also incorrect/incomplete, IMO. The problem is that "in the middle of a sexp" can mean different things. Which sexp? In (foo "ab|c" 42), with point at |, is point in the middle of a string sexp? Yes. Is it in the middle of a list sexp? Yes. Is it between sexps `foo' and `42'? Yes. What does it mean to be in the middle of a list, for example? A case mentioned in the bug report is this: >> When point is in the middle of a list it can also be between two >> sexps, which themselves could be lists: ((foo)|(bar)), with point at |. Point here is in the middle of the outer list, but it is between the two inner lists. Any text description needs to be more careful and explicit, if it really wants to make the point clear. Bug #24860 mentions a few different problems with the doc string. Some of them were addressed; others apparently not.