From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#23794: Emacs 25.0.94: Patch to make sort-lines respect visible lines (fairly urgent) Date: Sat, 18 Jun 2016 20:26:13 +0300 Message-ID: <83twgq9znu.fsf@gnu.org> References: Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1466270788 22372 80.91.229.3 (18 Jun 2016 17:26:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 18 Jun 2016 17:26:28 +0000 (UTC) Cc: 23794@debbugs.gnu.org To: rswgnu@gmail.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jun 18 19:26:16 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bEK0e-0007q6-43 for geb-bug-gnu-emacs@m.gmane.org; Sat, 18 Jun 2016 19:26:16 +0200 Original-Received: from localhost ([::1]:35772 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bEK0d-0001Ia-8G for geb-bug-gnu-emacs@m.gmane.org; Sat, 18 Jun 2016 13:26:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45839) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bEK0V-0001Gu-NA for bug-gnu-emacs@gnu.org; Sat, 18 Jun 2016 13:26:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bEK0Q-0004kj-8k for bug-gnu-emacs@gnu.org; Sat, 18 Jun 2016 13:26:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:33013) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bEK0Q-0004ke-4s for bug-gnu-emacs@gnu.org; Sat, 18 Jun 2016 13:26:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bEK0Q-0001SI-1W for bug-gnu-emacs@gnu.org; Sat, 18 Jun 2016 13:26:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 18 Jun 2016 17:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23794 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 23794-submit@debbugs.gnu.org id=B23794.14662707215540 (code B ref 23794); Sat, 18 Jun 2016 17:26:01 +0000 Original-Received: (at 23794) by debbugs.gnu.org; 18 Jun 2016 17:25:21 +0000 Original-Received: from localhost ([127.0.0.1]:45350 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bEJzl-0001RI-5M for submit@debbugs.gnu.org; Sat, 18 Jun 2016 13:25:21 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:54378) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bEJzj-0001R5-Jn for 23794@debbugs.gnu.org; Sat, 18 Jun 2016 13:25:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bEJza-0004W1-JT for 23794@debbugs.gnu.org; Sat, 18 Jun 2016 13:25:14 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:34570) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bEJza-0004VQ-Gy; Sat, 18 Jun 2016 13:25:10 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1885 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bEJzY-0000Oz-Is; Sat, 18 Jun 2016 13:25:09 -0400 In-reply-to: (message from Robert Weiner on Sat, 18 Jun 2016 11:47:08 -0400) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:119741 Archived-At: > From: Robert Weiner > Date: Sat, 18 Jun 2016 11:47:08 -0400 > > sort-lines calls forward-line rather than forward-visible line, so if > you have emacs outline entries that are collapsed/hidden to single lines > each and you try to sort them, their bodies and subtrees are sorted > separately because forward-visible-line is not used. > > This patch fixes this problem and also unifies the calling convention of > forward-visible-line with that of forward-line (allowing it to take an > optional argument) leading to a cleaner calling convention. > > Please apply it as soon as you can as Hyperbole uses sort-lines to sort > its contact manager records and right now this doesn't work. Although, > sort-subr could be called directly for this application, sort-lines > should work properly with both visible and invisible text and the patch > is quite simple. I don't think we can make such a backward-incompatible change without (a) an entry in NEWS, (b) suitable changes in the manual(s), and (c) some way of getting back the old behavior (which could be by way of having this new behavior as an optional one). Thanks.