From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Robert Weiner Newsgroups: gmane.emacs.devel Subject: Re: Emacs bug #23794; sort-line behavior regressed from prior Emacs versions Date: Sun, 19 Jun 2016 13:03:53 -0400 Message-ID: References: <83shwa9zmr.fsf@gnu.org> <83lh229ywc.fsf@gnu.org> <83inx69xcx.fsf@gnu.org> <0984ce22-cbcf-42a6-906e-a03b65f3c71c@default> <8360t5aolu.fsf@gnu.org> <83vb158awq.fsf@gnu.org> <83oa6x87ky.fsf@gnu.org> <83lh2186fh.fsf@gnu.org> Reply-To: rswgnu@gmail.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a1136e7da50777c0535a494d9 X-Trace: ger.gmane.org 1466355910 26575 80.91.229.3 (19 Jun 2016 17:05:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 19 Jun 2016 17:05:10 +0000 (UTC) Cc: 23794@debbugs.gnu.org, Richard Stallman , Drew Adams , emacs-devel To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jun 19 19:05:05 2016 Return-path: Envelope-to: ged-emacs-devel@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 1bEg9Y-0007Au-Rr for ged-emacs-devel@m.gmane.org; Sun, 19 Jun 2016 19:04:57 +0200 Original-Received: from localhost ([::1]:39455 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bEg9P-0004H6-K1 for ged-emacs-devel@m.gmane.org; Sun, 19 Jun 2016 13:04:47 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58164) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bEg9D-0004H0-3D for emacs-devel@gnu.org; Sun, 19 Jun 2016 13:04:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bEg9B-0000YE-19 for emacs-devel@gnu.org; Sun, 19 Jun 2016 13:04:34 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:55549) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bEg9A-0000Y7-US for emacs-devel@gnu.org; Sun, 19 Jun 2016 13:04:32 -0400 Original-Received: from mail-oi0-f44.google.com ([209.85.218.44]:34793) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bEg92-0002sJ-Fw; Sun, 19 Jun 2016 13:04:24 -0400 Original-Received: by mail-oi0-f44.google.com with SMTP id d132so181013269oig.1; Sun, 19 Jun 2016 10:04:24 -0700 (PDT) X-Gm-Message-State: ALyK8tJHVagmFfAY7fqqlHDgnCBi++Z/J1DotHGqx4cgduoqrp1mlxOMoI55wBTtEZAo+T7QXno5Ec8UasfM3w== X-Received: by 10.157.10.70 with SMTP id 64mr7190958otg.131.1466355862760; Sun, 19 Jun 2016 10:04:22 -0700 (PDT) Original-Received: by 10.202.236.73 with HTTP; Sun, 19 Jun 2016 10:03:53 -0700 (PDT) In-Reply-To: <83lh2186fh.fsf@gnu.org> X-Gmail-Original-Message-ID: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e 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:204533 Archived-At: --001a1136e7da50777c0535a494d9 Content-Type: text/plain; charset=UTF-8 On Sun, Jun 19, 2016 at 12:55 PM, Eli Zaretskii wrote: > > From: Robert Weiner > > > > The problem with that approach is that each mode has to be aware of this > and add a setting, really not much > > different than each mode having its own sort function or way of calling > a sort function. It is much more useful > > to centralize the behavior within the sorting library, even if it adds > some conditional complexity to the code. > > Not necessarily: if you set that up in outline-mode, all of its > descendants will inherit the setting for free. > Ok. > > > Here is the suggested patch to do it this way. -- Bob > One other possibility that is fairly clean is to add sort-visible-* functions to the sort library; then callers would just have to remember to call the visible or the regular version of the function and there would be no need for any new defcustoms. > Thanks, I hope others will comment on this. > Yes. --001a1136e7da50777c0535a494d9 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On S= un, Jun 19, 2016 at 12:55 PM, Eli Zaretskii <eliz@gnu.org> wrot= e:
> From: Robert Weiner <rsw@gnu.org>
>
> The problem with that approach is that each mode has to be aware of th= is and add a setting, really not much
> different than each mode having its own sort function or way of callin= g a sort function. It is much more useful
> to centralize the behavior within the sorting library, even if it adds= some conditional complexity to the code.

Not necessarily: if you set that up in outline-mode, all of its
descendants will inherit the setting for free.

Ok.
=C2=A0

> Here is the suggested patch to do it this way. -- Bob

One other possibility that is fairly clean is to= add sort-visible-* functions to the sort library; then callers would just = have to remember to call the visible or the regular version of the function= and there would be no need for any new defcustoms.
=C2=A0
<= blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px= #ccc solid;padding-left:1ex">Thanks, I hope others will comment on this.

Yes.
=C2=A0

--001a1136e7da50777c0535a494d9--