From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.devel Subject: Re: emacs-25 f708cb2: Clarify doc string of 'transpose-sexps' Date: Fri, 04 Nov 2016 16:47:06 +0100 Message-ID: <87y40zckn9.fsf@gmx.net> 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 X-Trace: blaine.gmane.org 1478274477 937 195.159.176.226 (4 Nov 2016 15:47:57 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 4 Nov 2016 15:47:57 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: Eli Zaretskii , emacs-devel@gnu.org To: Drew Adams Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 04 16:47:53 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 1c2giG-0005Kb-PV for ged-emacs-devel@m.gmane.org; Fri, 04 Nov 2016 16:47:28 +0100 Original-Received: from localhost ([::1]:39462 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c2giJ-0005X6-Jo for ged-emacs-devel@m.gmane.org; Fri, 04 Nov 2016 11:47:31 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48745) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c2gi6-0005Uf-6F for emacs-devel@gnu.org; Fri, 04 Nov 2016 11:47:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c2gi1-0002pr-9w for emacs-devel@gnu.org; Fri, 04 Nov 2016 11:47:18 -0400 Original-Received: from mout.gmx.net ([212.227.17.20]:58385) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c2gi1-0002nm-19; Fri, 04 Nov 2016 11:47:13 -0400 Original-Received: from rosalinde ([89.245.89.33]) by mail.gmx.com (mrgmx101) with ESMTPSA (Nemesis) id 0M0tr1-1cqvg53iPf-00v5Ub; Fri, 04 Nov 2016 16:47:07 +0100 In-Reply-To: (Drew Adams's message of "Fri, 4 Nov 2016 07:31:41 -0700 (PDT)") X-Provags-ID: V03:K0:eim80Nl1sEOJlGDt3Hm4Gs7GxFe+JXedg5w+DJp12pmsXBy+SiV lipANh4ngrhZXysW+/v98IxJSoSryFfIT8r/vnPhzz3jnwoS9p24ApRjoPZBQI63kmO2qkA zw2BQqc7t7bkOOdir9EU3xiWBN68XxLmKfhjkHqCw+Fkz07/R7m95qgsacdnMyy35Wt81JD 8aIp9xWl5nBzJYskwEkwg== X-UI-Out-Filterresults: notjunk:1;V01:K0:k5TYr3TsMc0=:v0FdrE14rLpwVzbjNmgf+d THVCcF18uIdFQxmj0ZaVpuc6NhJlg5ivZyvEFNlJ2drFiIeWityQLr0Edskfx7zVCbuL9PdcD IFO3QyYkk0mWPPCi8wCKRWiwAp6rGZ6t2LD/vnTsWQlSsLEqs7QPqX3BheF3iBjUka6VVI+rT 3zu81euwju0Ad4865kqEE2wSLeJnffojDDm12aYJVXDU2QEZ0wE5/gk35sVMs/jln/a6HEhv0 BMKABqhkTbhvpva2plcPBnnklKeSE/YgKfcOQJtzbsPUGaxcqeJUeT5JJM7HSQDskYbUtyyrl rk1Dk/lkz0RvCLmRy/71paCaR97AiTCUXX6WKUQJWncc7fwWk3E4ZwCneNqr3ydoVr6ETURz3 60indOngvFdGHe2Z0HZguv6Wcevjk2om42d20LU18vo6w0iIIqJ1PLirnWU4UGACYr3PHfpVQ v7wWudkLpF+HPeeKoxy5Cvum8e9gltwMwP8elgptlU7gjgWqTD3pTK7YC4q/jJyGVvWbZEmSq oklh1lFb05S7pZluA+ZwMfcLhFdIO6EDdSQIQJxll9LtXhYqCPaq7mggzwpT9Lgt/as+DnpTk n9yUxlWWuGsMAzoVJkMMj4Jxydv+DjnEzN7XR38Jo4IyfEQK1Mb8w4x2DfqNSsK6jyctSk3rU JQeXDvhhJVBVQLX88zMwhLb3sr8yQ13yWx/cONcimlmpA/6x33QIrQFRcdWNAM8hrM37DngtD QpyPyCO5toyX4hJ4t3B3w3K6vEJ7u00TkrhL+EgDvmYymun/KabJkb6XilcVodYmLQ8PN1Gs X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.17.20 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:209153 Archived-At: On Fri, 4 Nov 2016 07:31:41 -0700 (PDT) Drew Adams wrote: >> > +Unlike `transpose-words', point must be between the two sexps and not >> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >> > +in the middle of a sexp to be transposed. >> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >> >> 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=24860). > > That bug points out that the doc statement is incorrect/incomplete. > But your statement is also incorrect/incomplete, IMO. Perhaps it's incomplete in not explicitly stating that transposing succeeds when point is in the middle of a symbol or number, but how is it incorrect? > 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. I think a reasonable interpretation of "in the middle of a sexp" is that the relevant sexp is the one whose start and end are closer to point (counting leftwards and rightwards from point, respectively) than those of any other sexp. Is there an Emacs function that doesn't respect this interpretation? Steve Berman