From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#25777: 25.1; [PATCH] `rectangle--pos-cols' should not move point Date: Mon, 27 Feb 2017 09:51:30 -0800 (PST) Message-ID: References: <1efbacdb-7d86-454d-b0e0-7a783c47b804@default> <87poi4e7mv.fsf@users.sourceforge.net> <877f4beok7.fsf@users.sourceforge.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 1488217938 25234 195.159.176.226 (27 Feb 2017 17:52:18 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 27 Feb 2017 17:52:18 +0000 (UTC) Cc: 25777@debbugs.gnu.org To: npostavs@users.sourceforge.net Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Feb 27 18:52:12 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1ciPT0-0005Rj-RI for geb-bug-gnu-emacs@m.gmane.org; Mon, 27 Feb 2017 18:52:10 +0100 Original-Received: from localhost ([::1]:55413 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ciPT1-0002PB-GH for geb-bug-gnu-emacs@m.gmane.org; Mon, 27 Feb 2017 12:52:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47490) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ciPSv-0002Ou-N6 for bug-gnu-emacs@gnu.org; Mon, 27 Feb 2017 12:52:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ciPSs-0006PL-Kh for bug-gnu-emacs@gnu.org; Mon, 27 Feb 2017 12:52:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:60430) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ciPSs-0006PH-Gd for bug-gnu-emacs@gnu.org; Mon, 27 Feb 2017 12:52:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ciPSs-00047F-4h for bug-gnu-emacs@gnu.org; Mon, 27 Feb 2017 12:52:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 27 Feb 2017 17:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25777 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 25777-submit@debbugs.gnu.org id=B25777.148821790415796 (code B ref 25777); Mon, 27 Feb 2017 17:52:02 +0000 Original-Received: (at 25777) by debbugs.gnu.org; 27 Feb 2017 17:51:44 +0000 Original-Received: from localhost ([127.0.0.1]:58629 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ciPSZ-00046i-Od for submit@debbugs.gnu.org; Mon, 27 Feb 2017 12:51:43 -0500 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:27407) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ciPSW-00046U-D3 for 25777@debbugs.gnu.org; Mon, 27 Feb 2017 12:51:40 -0500 Original-Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v1RHpXhY025749 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 27 Feb 2017 17:51:33 GMT Original-Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0021.oracle.com (8.13.8/8.14.4) with ESMTP id v1RHpWu8027977 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 27 Feb 2017 17:51:33 GMT Original-Received: from abhmp0015.oracle.com (abhmp0015.oracle.com [141.146.116.21]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id v1RHpVJY023869; Mon, 27 Feb 2017 17:51:32 GMT In-Reply-To: <877f4beok7.fsf@users.sourceforge.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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:129890 Archived-At: > > I checked the code of `rectangle--pos-cols' and saw that > > it now does `goto-char' (and it did not do so before > > Emacs 25.1). >=20 > I'm confused as to what you mean by this, since `rectangle--pos-cols' > did not exist before 25.1. Sorry, my bad about that expression. I meant to say that _there is no such problem in Emacs 24.5_. In Emacs 24.5, following the recipe DTRT: the C-p moves point up one line. Emacs 24.5, like 25.1, has rectangle support. Nothing changes in that regard for my code: I take advantage of exactly the same functionality offered by rect.el as before. What has changed is how rect.el obtains and returns the columns delimiting the current region rectangle. I changed my code accordingly. Perhaps I'm not being sufficiently clear about this regression. I think it's great that a function such as `rectangle--pos-cols' was added. (But it has no business being considered "internal".) Just as, for Emacs 24.5, I reused some code from rect.el to do what I need to get the rectangle columns, so I reused the corresponding code from Emacs 25. Look at function `apply-on-rectangle'. In Emacs 25 it calls `rectangle--pos-cols' to get the rectangle columns - and so do I. In Emacs 24.5 it also does just what I do (I stole the code) to obtain those columns. Do you really think that a function whose only purpose is to let you know what the rectangle columns are should move point and leave it in a position that is not one of the rectangle corners? If so, then you will say that all callers of this function should wrap with `save-excursion' if they don't want point moved. I think that's the job of a function whose only purpose is to return those columns.