GNU bug report logs - #31800
suggestion of improvement for sort-numeric-fields function.

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: wishlist; Reported by: SK Kim <tttuuu888@HIDDEN>; dated Tue, 12 Jun 2018 16:10:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Removed tag(s) patch. Request was from Stefan Kangas <stefan@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 31800 <at> debbugs.gnu.org:


Received: (at 31800) by debbugs.gnu.org; 24 Jan 2020 15:30:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jan 24 10:30:21 2020
Received: from localhost ([127.0.0.1]:54631 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iv0ub-0004Vf-Ay
	for submit <at> debbugs.gnu.org; Fri, 24 Jan 2020 10:30:21 -0500
Received: from quimby.gnus.org ([95.216.78.240]:40146)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1iv0ua-0004Q9-1f
 for 31800 <at> debbugs.gnu.org; Fri, 24 Jan 2020 10:30:20 -0500
Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1iv0uR-0007tf-IS; Fri, 24 Jan 2020 16:30:14 +0100
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Stefan Kangas <stefan@HIDDEN>
Subject: Re: bug#31800: suggestion of improvement for sort-numeric-fields
 function.
References: <CAKYNWwR2vwfZrMo9QfksJZTnrWd8j69W=kfoXgZM1w5_NYJ_xg@HIDDEN>
 <874l3qy517.fsf@HIDDEN>
 <CAKYNWwTQ9JqJb8njyEMTT2_jUTR+bJUjYKwU_3qqqwRpbTRKTg@HIDDEN>
 <87v9p5rjhj.fsf@HIDDEN> <87v9p3vc57.fsf@HIDDEN>
 <87zheefcrf.fsf@HIDDEN>
Date: Fri, 24 Jan 2020 16:30:10 +0100
In-Reply-To: <87zheefcrf.fsf@HIDDEN> (Stefan Kangas's message of "Thu, 23
 Jan 2020 15:50:12 +0100")
Message-ID: <87y2tweut9.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview: Stefan Kangas <stefan@HIDDEN> writes: > Lars Ingebrigtsen
 <larsi@HIDDEN> writes: > >>>> - (sort-skip-fields field) >>>> + (unless
 (string-match-p "^\\s-*$" (thing-at-point 'line)) >>>> + (sort-skip-fields
 field)) >> >> I don't think thi [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 0.0 URIBL_BLOCKED          ADMINISTRATOR NOTICE: The query to URIBL was
 blocked.  See
 http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block
 for more information. [URIs: ingebrigtsen.no]
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 31800
Cc: SK Kim <tttuuu888@HIDDEN>, 31800 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Stefan Kangas <stefan@HIDDEN> writes:

> Lars Ingebrigtsen <larsi@HIDDEN> writes:
>
>>>> -		     (sort-skip-fields field)
>>>> + (unless (string-match-p "^\\s-*$" (thing-at-point 'line))
>>>> +                       (sort-skip-fields field))
>>
>> I don't think this patch makes sense as is -- I think that's a
>> convoluted way of saying `looking-at'?  But it makes conceptual sense, I
>> think.
>
> I'm not sure.  Do you mean to use:
>
>     (looking-at "\\s*$")
>
> Are we sure point is at the beginning of line here though?  The above
> code doesn't require that, but also seems to be wrong if region is in
> the middle of a line.  But I'm not sure how people typically use this
> in that case.

I assumed that

  (thing-at-point 'line)

returns the current line, but I haven't actually looked at the code, but
you're right -- we don't know where point is, so that has to be moved
before checking.  In any case, using thing-at-point is not the right
thing.

> BTW, shouldn't we also fix the same bug in sort-fields while we're at
> it?

Yes.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31800; Package emacs. Full text available.

Message received at 31800 <at> debbugs.gnu.org:


Received: (at 31800) by debbugs.gnu.org; 23 Jan 2020 14:50:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jan 23 09:50:21 2020
Received: from localhost ([127.0.0.1]:52061 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iudoL-0000Am-FJ
	for submit <at> debbugs.gnu.org; Thu, 23 Jan 2020 09:50:21 -0500
Received: from ted.gofardesign.uk ([67.225.143.91]:56350)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stefan@HIDDEN>) id 1iudoK-0000AY-8P
 for 31800 <at> debbugs.gnu.org; Thu, 23 Jan 2020 09:50:20 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=marxist.se; 
 s=default;
 h=Content-Type:MIME-Version:Message-ID:Date:References:
 In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=ul0ExKg+M5YMhb+pFs3E9x1OGWblKSpsuUp4XaQsnPY=; b=UcHayeNXj+dPU3R7YaIxaz6YSM
 YYT6GK9ar/NOQabk8W7Qz3hY1pYIBlRpzFGfFl7Z+7CTq0RWy8MxPMiR9zhpyPSpTmr3EmHdt1rSv
 jQKiz+qJo949T3WcodovOpJyeG0V74fQifLqBd720mdHQBP1BTFNwulhN721cMYE1M13FDwxdyfOH
 VHv2MS4DKpC3Q/4xtqIuyJNVz+sNFwI6U3vgUwxY/F60OAACwOPOiiLOcpdIlTjbWLKolMe31WzKJ
 UYMCdbux8VAKyiaB7pOM8oo2MEv1TXpVISm1XaqyboV8n2tNx4lQhe+yalCW0RVYJPZQis2PVbcnr
 u+mIaS2g==;
Received: from h-70-69.a785.priv.bahnhof.se ([155.4.70.69]:41868
 helo=localhost)
 by ted.gofardesign.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256)
 (Exim 4.92) (envelope-from <stefan@HIDDEN>)
 id 1iudoE-001PTW-65; Thu, 23 Jan 2020 09:50:14 -0500
From: Stefan Kangas <stefan@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
Subject: Re: bug#31800: suggestion of improvement for sort-numeric-fields
 function.
In-Reply-To: <87v9p3vc57.fsf@HIDDEN> (Lars Ingebrigtsen's message of "Wed,
 22 Jan 2020 14:44:36 +0100")
References: <CAKYNWwR2vwfZrMo9QfksJZTnrWd8j69W=kfoXgZM1w5_NYJ_xg@HIDDEN>
 <874l3qy517.fsf@HIDDEN>
 <CAKYNWwTQ9JqJb8njyEMTT2_jUTR+bJUjYKwU_3qqqwRpbTRKTg@HIDDEN>
 <87v9p5rjhj.fsf@HIDDEN> <87v9p3vc57.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
Date: Thu, 23 Jan 2020 15:50:12 +0100
Message-ID: <87zheefcrf.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-AntiAbuse: This header was added to track abuse,
 please include it with any abuse report
X-AntiAbuse: Primary Hostname - ted.gofardesign.uk
X-AntiAbuse: Original Domain - debbugs.gnu.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - marxist.se
X-Get-Message-Sender-Via: ted.gofardesign.uk: authenticated_id:
 stefan@HIDDEN
X-Authenticated-Sender: ted.gofardesign.uk: stefan@HIDDEN
X-Source: 
X-Source-Args: 
X-Source-Dir: 
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 31800
Cc: SK Kim <tttuuu888@HIDDEN>, 31800 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Lars Ingebrigtsen <larsi@HIDDEN> writes:

>>> -		     (sort-skip-fields field)
>>> +                     (unless (string-match-p "^\\s-*$" (thing-at-point 'line))
>>> +                       (sort-skip-fields field))
>
> I don't think this patch makes sense as is -- I think that's a
> convoluted way of saying `looking-at'?  But it makes conceptual sense, I
> think.

I'm not sure.  Do you mean to use:

    (looking-at "\\s*$")

Are we sure point is at the beginning of line here though?  The above
code doesn't require that, but also seems to be wrong if region is in
the middle of a line.  But I'm not sure how people typically use this
in that case.

BTW, shouldn't we also fix the same bug in sort-fields while we're at
it?

Best regards,
Stefan Kangas




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31800; Package emacs. Full text available.

Message received at 31800 <at> debbugs.gnu.org:


Received: (at 31800) by debbugs.gnu.org; 22 Jan 2020 13:44:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 22 08:44:48 2020
Received: from localhost ([127.0.0.1]:49231 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iuGJM-00012M-J3
	for submit <at> debbugs.gnu.org; Wed, 22 Jan 2020 08:44:48 -0500
Received: from quimby.gnus.org ([95.216.78.240]:60342)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1iuGJK-000126-S7
 for 31800 <at> debbugs.gnu.org; Wed, 22 Jan 2020 08:44:47 -0500
Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1iuGJB-0003ig-Nw; Wed, 22 Jan 2020 14:44:40 +0100
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Stefan Kangas <stefan@HIDDEN>
Subject: Re: bug#31800: suggestion of improvement for sort-numeric-fields
 function.
References: <CAKYNWwR2vwfZrMo9QfksJZTnrWd8j69W=kfoXgZM1w5_NYJ_xg@HIDDEN>
 <874l3qy517.fsf@HIDDEN>
 <CAKYNWwTQ9JqJb8njyEMTT2_jUTR+bJUjYKwU_3qqqwRpbTRKTg@HIDDEN>
 <87v9p5rjhj.fsf@HIDDEN>
Date: Wed, 22 Jan 2020 14:44:36 +0100
In-Reply-To: <87v9p5rjhj.fsf@HIDDEN> (Stefan Kangas's message of "Mon, 20
 Jan 2020 20:55:04 +0100")
Message-ID: <87v9p3vc57.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview: Stefan Kangas <stefan@HIDDEN> writes: > The patch below
 looks good to me. Does anyone else have an opinion > here, or should I go
 ahead and commit it to master? [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 0.0 URIBL_BLOCKED          ADMINISTRATOR NOTICE: The query to URIBL was
 blocked.  See
 http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block
 for more information. [URIs: ingebrigtsen.no]
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 31800
Cc: SK Kim <tttuuu888@HIDDEN>, 31800 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Stefan Kangas <stefan@HIDDEN> writes:

> The patch below looks good to me.  Does anyone else have an opinion
> here, or should I go ahead and commit it to master?

[...]

>> -		     (sort-skip-fields field)
>> +                     (unless (string-match-p "^\\s-*$" (thing-at-point 'line))
>> +                       (sort-skip-fields field))

I don't think this patch makes sense as is -- I think that's a
convoluted way of saying `looking-at'?  But it makes conceptual sense, I
think.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31800; Package emacs. Full text available.

Message received at 31800 <at> debbugs.gnu.org:


Received: (at 31800) by debbugs.gnu.org; 20 Jan 2020 19:55:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jan 20 14:55:14 2020
Received: from localhost ([127.0.0.1]:46116 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1itd8k-0001jD-Ne
	for submit <at> debbugs.gnu.org; Mon, 20 Jan 2020 14:55:14 -0500
Received: from ted.gofardesign.uk ([67.225.143.91]:41356)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stefan@HIDDEN>) id 1itd8h-0001ip-PX
 for 31800 <at> debbugs.gnu.org; Mon, 20 Jan 2020 14:55:13 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=marxist.se; 
 s=default;
 h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:
 Date:References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
 List-Post:List-Owner:List-Archive;
 bh=gTKdlg+7b7ETxNW9yFpZVPfLW7ye9p9XiIjy2vHGk+g=; b=fwDRvjgMgwxxDOJ63ch94Nsd07
 NkpXbEi9OXLmMAyEIyqJ1iaZaw4k5vMEqJbdRXO27jbofX+3I3Axjd0OrRbyrCTxyP+fDH98+8ixr
 qnXb5x7OIGpJGKMsljKuNC8FTPigRFJnXonaRzUN3eCLiCAd3KqY51gpVWfKsnnlPi4gEvsNhIICA
 rUA+gYAgvP2Ho65nlHeCckoGJZHG/tS7F3jtbpqSZ/oeBswWdk+jw3OtEP6XUJwZU8DqpFIYRAH9d
 lEIp1zWk6gVaq5Hlrqy1tu1YkEpMrG+usq9h5XuweXvB8azCajsEdpqRp7qDhSfvR72JxYEJeffxx
 mk2kze3A==;
Received: from h-70-69.a785.priv.bahnhof.se ([155.4.70.69]:43124
 helo=localhost)
 by ted.gofardesign.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256)
 (Exim 4.92) (envelope-from <stefan@HIDDEN>)
 id 1itd8b-0006We-Rc; Mon, 20 Jan 2020 14:55:06 -0500
From: Stefan Kangas <stefan@HIDDEN>
To: SK Kim <tttuuu888@HIDDEN>
Subject: Re: bug#31800: suggestion of improvement for sort-numeric-fields
 function.
In-Reply-To: <CAKYNWwTQ9JqJb8njyEMTT2_jUTR+bJUjYKwU_3qqqwRpbTRKTg@HIDDEN>
 (SK Kim's message of "Sat, 13 Jul 2019 17:21:18 +0900")
References: <CAKYNWwR2vwfZrMo9QfksJZTnrWd8j69W=kfoXgZM1w5_NYJ_xg@HIDDEN>
 <874l3qy517.fsf@HIDDEN>
 <CAKYNWwTQ9JqJb8njyEMTT2_jUTR+bJUjYKwU_3qqqwRpbTRKTg@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
Date: Mon, 20 Jan 2020 20:55:04 +0100
Message-ID: <87v9p5rjhj.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-AntiAbuse: This header was added to track abuse,
 please include it with any abuse report
X-AntiAbuse: Primary Hostname - ted.gofardesign.uk
X-AntiAbuse: Original Domain - debbugs.gnu.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - marxist.se
X-Get-Message-Sender-Via: ted.gofardesign.uk: authenticated_id:
 stefan@HIDDEN
X-Authenticated-Sender: ted.gofardesign.uk: stefan@HIDDEN
X-Source: 
X-Source-Args: 
X-Source-Dir: 
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 31800
Cc: Lars Ingebrigtsen <larsi@HIDDEN>, 31800 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

SK Kim <tttuuu888@HIDDEN> writes:

> I made this patch from github emacs-mirror repository.
> I hope this will be of help.
>
> Thanks.
>
> 2019=EB=85=84 7=EC=9B=94 13=EC=9D=BC (=ED=86=A0) =EC=98=A4=ED=9B=84 12:42=
, Lars Ingebrigtsen <larsi@HIDDEN>=EB=8B=98=EC=9D=B4 =EC=9E=91=EC=84=B1:
>
>  SK Kim <tttuuu888@HIDDEN> writes:
>
>  > This is not likely a bug but sort-numeric-fields function does not
>  > allow region with blank lines, while sort-lines does.
>  >
>  > This was because sort-skip-fields occurs error with blank line. And
>  > when I added condition for sort-skip-fields like below,
>  > sort-numeric-fields was working with blank lines too.
>  >
>  >                      (when (not (string-match-p "^\\s-*$" (thing-at-po=
int 'line)))
>  >                        (sort-skip-fields field))
>  >
>  > So, I just hope sort-numeric-fields would work for region with blank
>  > lines too.

The patch below looks good to me.  Does anyone else have an opinion
here, or should I go ahead and commit it to master?

Best regards,
Stefan Kangas

> From d08c5d368337ee49bb72d9915c409edcbc73b4e0 Mon Sep 17 00:00:00 2001
> From: SeungKi Kim <tttuuu888@HIDDEN>
> Date: Sat, 13 Jul 2019 17:12:46 +0900
> Subject: [PATCH] Improve `sort-numeric-fields'
>
> * lisp/sort.el (sort-numeric-fields) : Allow including empty lines.
> ---
>  lisp/sort.el | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/lisp/sort.el b/lisp/sort.el
> index 6ea1c44060..3e9413e4af 100644
> --- a/lisp/sort.el
> +++ b/lisp/sort.el
> @@ -281,7 +281,8 @@ FIELD, BEG and END.  BEG and END specify region to so=
rt."
>        ((inhibit-field-text-motion t))
>      (sort-fields-1 field beg end
>  		   (lambda ()
> -		     (sort-skip-fields field)
> +                     (unless (string-match-p "^\\s-*$" (thing-at-point '=
line))
> +                       (sort-skip-fields field))
>  		     (let* ((case-fold-search t)
>  			    (base
>  			     (if (looking-at "\\(0x\\)[0-9a-f]\\|\\(0\\)[0-7]")




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31800; Package emacs. Full text available.
Added tag(s) patch. Request was from Stefan Kangas <stefan@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 31800 <at> debbugs.gnu.org:


Received: (at 31800) by debbugs.gnu.org; 13 Jul 2019 08:21:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jul 13 04:21:38 2019
Received: from localhost ([127.0.0.1]:41420 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1hmDHl-0005Rr-S0
	for submit <at> debbugs.gnu.org; Sat, 13 Jul 2019 04:21:38 -0400
Received: from mail-oi1-f179.google.com ([209.85.167.179]:34929)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <tttuuu888@HIDDEN>) id 1hmDHj-0005Re-EH
 for 31800 <at> debbugs.gnu.org; Sat, 13 Jul 2019 04:21:36 -0400
Received: by mail-oi1-f179.google.com with SMTP id a127so9081235oii.2
 for <31800 <at> debbugs.gnu.org>; Sat, 13 Jul 2019 01:21:35 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=I7bMtquuTrrU8gTF6+dzmt5j962chEalzUVA0eayEoc=;
 b=V5xM/NFWAnSRyGk+2wrW3zUrQK5fLmt4VoQVo3VQFwY5Rzhbs/Czq08YPlhf4vjSgl
 H0Cude4GHcdSlDZGgUnKW7RXgUBjsv/swIE8pnKfWYiTlcw/y7Cj85GCCSUfVXLNL1NN
 wsTV1e32pEYlAmbs+Ddtovf2c+z3MxbEjz7/8bODk97kVDkG5JjS6TaMXmxHJnb6d5Hm
 PcA0E/IA/5X07Qyr4Tgw4itV7vfsW1xcetMXsXbK27NFZ6edAsILX8HnnmbG/MdK8WZ9
 wpG9ISnYORkXyeqNvZxT/oUsBU7D7q/aAtyE1J6SB46tj7ENlkssFuuNH2w7MCpc9U/D
 sIDQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=I7bMtquuTrrU8gTF6+dzmt5j962chEalzUVA0eayEoc=;
 b=SRg7OlsuZwtUGe2YS4ND5UT69xsHyyCk3lSJPNDbdNNhk+2PLBTxnA1NNt+w2wY4+f
 iDJf6CvcDxRZkyMfN/yV4I3553w39Os8I9fNIJ/jDfrGdk5fE7GMKSzvSn8iie0BDpij
 xHyE0HwaaHuSvJb9lTiSnexpY7NdAD6qfLCjqEdfHVx91x9vkUXGHqzYY4XE6LyZfQbk
 oU0kaTucqIuux9fgUCJXeKQh9N07vRDP9tVYcc2f2P9HIiQb57ydu/LOXxUWWtRYKhHM
 5lXI9z1DgKOUBqzNIxygzsHjcv75JJexhYhp7oBy/d/ZBnTMJk8lnSeUPSmJmlOXifMg
 eakA==
X-Gm-Message-State: APjAAAUC8R3O3hrR3DfL/D7KhrwFskrN5vJ0wYM3+ZZQj0cAirNyo0Eo
 oWuPK6GJdlzCJGEyQIShjA6Zas/UGL/Crsmqys4=
X-Google-Smtp-Source: APXvYqzNqVT0F2tMWCNkJau4ZZOdgfsmxIaCCzLZzQwWgS51qs0CM0+shtfHecTvdMcwkKrgl/9TSasYURJwLSC5PQY=
X-Received: by 2002:aca:be88:: with SMTP id o130mr8026910oif.122.1563006089645; 
 Sat, 13 Jul 2019 01:21:29 -0700 (PDT)
MIME-Version: 1.0
References: <CAKYNWwR2vwfZrMo9QfksJZTnrWd8j69W=kfoXgZM1w5_NYJ_xg@HIDDEN>
 <874l3qy517.fsf@HIDDEN>
In-Reply-To: <874l3qy517.fsf@HIDDEN>
From: SK Kim <tttuuu888@HIDDEN>
Date: Sat, 13 Jul 2019 17:21:18 +0900
Message-ID: <CAKYNWwTQ9JqJb8njyEMTT2_jUTR+bJUjYKwU_3qqqwRpbTRKTg@HIDDEN>
Subject: Re: bug#31800: suggestion of improvement for sort-numeric-fields
 function.
To: Lars Ingebrigtsen <larsi@HIDDEN>
Content-Type: multipart/mixed; boundary="000000000000c17468058d8bb640"
X-Spam-Score: 0.3 (/)
X-Debbugs-Envelope-To: 31800
Cc: 31800 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

--000000000000c17468058d8bb640
Content-Type: multipart/alternative; boundary="000000000000c17462058d8bb63e"

--000000000000c17462058d8bb63e
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

I made this patch from github emacs-mirror repository.
I hope this will be of help.

Thanks.

2019=EB=85=84 7=EC=9B=94 13=EC=9D=BC (=ED=86=A0) =EC=98=A4=ED=9B=84 12:42, =
Lars Ingebrigtsen <larsi@HIDDEN>=EB=8B=98=EC=9D=B4 =EC=9E=91=EC=84=B1:

> SK Kim <tttuuu888@HIDDEN> writes:
>
> > This is not likely a bug but sort-numeric-fields function does not
> > allow region with blank lines, while sort-lines does.
> >
> > This was because sort-skip-fields occurs error with blank line. And
> > when I added condition for sort-skip-fields like below,
> > sort-numeric-fields was working with blank lines too.
> >
> >                      (when (not (string-match-p "^\\s-*$"
> (thing-at-point 'line)))
> >                        (sort-skip-fields field))
> >
> > So, I just hope sort-numeric-fields would work for region with blank
> > lines too.
>
> Can you create a patch for this fix?
>
> --
> (domestic pets only, the antidote for overdose, milk.)
>    bloggy blog: http://lars.ingebrigtsen.no
>

--000000000000c17462058d8bb63e
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_default" style=3D"font-family:monospac=
e,monospace">I made this patch from github emacs-mirror repository.</div><d=
iv class=3D"gmail_default" style=3D"font-family:monospace,monospace">I hope=
 this will be of help.<br></div><div class=3D"gmail_default" style=3D"font-=
family:monospace,monospace"><br></div><div class=3D"gmail_default" style=3D=
"font-family:monospace,monospace">Thanks.</div></div><br><div class=3D"gmai=
l_quote"><div dir=3D"ltr" class=3D"gmail_attr">2019=EB=85=84 7=EC=9B=94 13=
=EC=9D=BC (=ED=86=A0) =EC=98=A4=ED=9B=84 12:42, Lars Ingebrigtsen &lt;<a hr=
ef=3D"mailto:larsi@HIDDEN">larsi@HIDDEN</a>&gt;=EB=8B=98=EC=9D=B4 =EC=
=9E=91=EC=84=B1:<br></div><blockquote class=3D"gmail_quote" style=3D"margin=
:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"=
>SK Kim &lt;<a href=3D"mailto:tttuuu888@HIDDEN" target=3D"_blank">tttuuu=
888@HIDDEN</a>&gt; writes:<br>
<br>
&gt; This is not likely a bug but sort-numeric-fields function does not<br>
&gt; allow region with blank lines, while sort-lines does.<br>
&gt;<br>
&gt; This was because sort-skip-fields occurs error with blank line. And<br=
>
&gt; when I added condition for sort-skip-fields like below,<br>
&gt; sort-numeric-fields was working with blank lines too.<br>
&gt;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 (when (not (string-match-p &quot;^\\s-*$&quot; (thing-at-point &#39;=
line)))<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 (sort-skip-fields field))<br>
&gt;<br>
&gt; So, I just hope sort-numeric-fields would work for region with blank<b=
r>
&gt; lines too.<br>
<br>
Can you create a patch for this fix?<br>
<br>
-- <br>
(domestic pets only, the antidote for overdose, milk.)<br>
=C2=A0 =C2=A0bloggy blog: <a href=3D"http://lars.ingebrigtsen.no" rel=3D"no=
referrer" target=3D"_blank">http://lars.ingebrigtsen.no</a><br>
</blockquote></div>

--000000000000c17462058d8bb63e--

--000000000000c17468058d8bb640
Content-Type: text/x-patch; charset="US-ASCII"; name="0001-Improve-sort-numeric-fields.patch"
Content-Disposition: attachment; 
	filename="0001-Improve-sort-numeric-fields.patch"
Content-Transfer-Encoding: base64
Content-ID: <f_jy198c340>
X-Attachment-Id: f_jy198c340

RnJvbSBkMDhjNWQzNjgzMzdlZTQ5YmI3MmQ5OTE1YzQwOWVkY2JjNzNiNGUwIE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBTZXVuZ0tpIEtpbSA8dHR0dXV1ODg4QGdtYWlsLmNvbT4KRGF0
ZTogU2F0LCAxMyBKdWwgMjAxOSAxNzoxMjo0NiArMDkwMApTdWJqZWN0OiBbUEFUQ0hdIEltcHJv
dmUgYHNvcnQtbnVtZXJpYy1maWVsZHMnCgoqIGxpc3Avc29ydC5lbCAoc29ydC1udW1lcmljLWZp
ZWxkcykgOiBBbGxvdyBpbmNsdWRpbmcgZW1wdHkgbGluZXMuCi0tLQogbGlzcC9zb3J0LmVsIHwg
MyArKy0KIDEgZmlsZSBjaGFuZ2VkLCAyIGluc2VydGlvbnMoKyksIDEgZGVsZXRpb24oLSkKCmRp
ZmYgLS1naXQgYS9saXNwL3NvcnQuZWwgYi9saXNwL3NvcnQuZWwKaW5kZXggNmVhMWM0NDA2MC4u
M2U5NDEzZTRhZiAxMDA2NDQKLS0tIGEvbGlzcC9zb3J0LmVsCisrKyBiL2xpc3Avc29ydC5lbApA
QCAtMjgxLDcgKzI4MSw4IEBAIEZJRUxELCBCRUcgYW5kIEVORC4gIEJFRyBhbmQgRU5EIHNwZWNp
ZnkgcmVnaW9uIHRvIHNvcnQuIgogICAgICAgKChpbmhpYml0LWZpZWxkLXRleHQtbW90aW9uIHQp
KQogICAgIChzb3J0LWZpZWxkcy0xIGZpZWxkIGJlZyBlbmQKIAkJICAgKGxhbWJkYSAoKQotCQkg
ICAgIChzb3J0LXNraXAtZmllbGRzIGZpZWxkKQorICAgICAgICAgICAgICAgICAgICAgKHVubGVz
cyAoc3RyaW5nLW1hdGNoLXAgIl5cXHMtKiQiICh0aGluZy1hdC1wb2ludCAnbGluZSkpCisgICAg
ICAgICAgICAgICAgICAgICAgIChzb3J0LXNraXAtZmllbGRzIGZpZWxkKSkKIAkJICAgICAobGV0
KiAoKGNhc2UtZm9sZC1zZWFyY2ggdCkKIAkJCSAgICAoYmFzZQogCQkJICAgICAoaWYgKGxvb2tp
bmctYXQgIlxcKDB4XFwpWzAtOWEtZl1cXHxcXCgwXFwpWzAtN10iKQotLSAKMi4yMi4wCgo=
--000000000000c17468058d8bb640--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31800; Package emacs. Full text available.

Message received at 31800 <at> debbugs.gnu.org:


Received: (at 31800) by debbugs.gnu.org; 13 Jul 2019 03:42:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jul 12 23:42:01 2019
Received: from localhost ([127.0.0.1]:41258 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1hm8vB-0001Ae-5n
	for submit <at> debbugs.gnu.org; Fri, 12 Jul 2019 23:42:01 -0400
Received: from quimby.gnus.org ([80.91.231.51]:54914)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1hm8v9-0001AW-Vn
 for 31800 <at> debbugs.gnu.org; Fri, 12 Jul 2019 23:42:00 -0400
Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie)
 by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.89) (envelope-from <larsi@HIDDEN>)
 id 1hm8v6-0005AN-Pe; Sat, 13 Jul 2019 05:41:59 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: SK Kim <tttuuu888@HIDDEN>
Subject: Re: bug#31800: suggestion of improvement for sort-numeric-fields
 function.
References: <CAKYNWwR2vwfZrMo9QfksJZTnrWd8j69W=kfoXgZM1w5_NYJ_xg@HIDDEN>
Date: Sat, 13 Jul 2019 05:41:56 +0200
In-Reply-To: <CAKYNWwR2vwfZrMo9QfksJZTnrWd8j69W=kfoXgZM1w5_NYJ_xg@HIDDEN>
 (SK Kim's message of "Wed, 13 Jun 2018 01:09:17 +0900")
Message-ID: <874l3qy517.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview:  SK Kim <tttuuu888@HIDDEN> writes: > This is not likely
 a bug but sort-numeric-fields function does not > allow region with blank
 lines, while sort-lines does. > > This was because sort-skip-fields occurs
 error with blank line. And > w [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 31800
Cc: 31800 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

SK Kim <tttuuu888@HIDDEN> writes:

> This is not likely a bug but sort-numeric-fields function does not
> allow region with blank lines, while sort-lines does.
>
> This was because sort-skip-fields occurs error with blank line. And
> when I added condition for sort-skip-fields like below,
> sort-numeric-fields was working with blank lines too.
>
>                      (when (not (string-match-p "^\\s-*$" (thing-at-point 'line)))
>                        (sort-skip-fields field))
>
> So, I just hope sort-numeric-fields would work for region with blank
> lines too.

Can you create a patch for this fix?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31800; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 12 Jun 2018 16:09:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jun 12 12:09:40 2018
Received: from localhost ([127.0.0.1]:45278 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fSlrY-0004Bb-Kw
	for submit <at> debbugs.gnu.org; Tue, 12 Jun 2018 12:09:40 -0400
Received: from eggs.gnu.org ([208.118.235.92]:60967)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <tttuuu888@HIDDEN>) id 1fSlrW-0004BM-Ce
 for submit <at> debbugs.gnu.org; Tue, 12 Jun 2018 12:09:39 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <tttuuu888@HIDDEN>) id 1fSlrQ-0002QJ-Ag
 for submit <at> debbugs.gnu.org; Tue, 12 Jun 2018 12:09:33 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.3 required=5.0 tests=BAYES_40,
 FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,HTML_MESSAGE,T_DKIM_INVALID
 autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:43435)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <tttuuu888@HIDDEN>) id 1fSlrQ-0002QD-7X
 for submit <at> debbugs.gnu.org; Tue, 12 Jun 2018 12:09:32 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:51923)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <tttuuu888@HIDDEN>) id 1fSlrP-0000Sk-6P
 for bug-gnu-emacs@HIDDEN; Tue, 12 Jun 2018 12:09:32 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <tttuuu888@HIDDEN>) id 1fSlrO-0002PR-Dd
 for bug-gnu-emacs@HIDDEN; Tue, 12 Jun 2018 12:09:31 -0400
Received: from mail-pf0-x22a.google.com ([2607:f8b0:400e:c00::22a]:35609)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <tttuuu888@HIDDEN>) id 1fSlrO-0002PD-09
 for bug-gnu-emacs@HIDDEN; Tue, 12 Jun 2018 12:09:30 -0400
Received: by mail-pf0-x22a.google.com with SMTP id c22-v6so11940032pfi.2
 for <bug-gnu-emacs@HIDDEN>; Tue, 12 Jun 2018 09:09:29 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:from:date:message-id:subject:to;
 bh=/Y2TdDEV5Am4d3lyWqrnk5pPHltbxJwe4ffEUTHeEF4=;
 b=gyPDv+4vQnshOawDePoSd8zn6wNIX+wiMSbEkT2yW4z+EiNqft1jS9la9aEBiy5qyA
 XOie2i/z7XnF7frl2pGaJjivtoQleyf6P6WqXD9PRM+qBNSGOTCozBIyhwFqaBCHqTQ1
 Kcva4ZV2IBwwLjRxPiyKnp5uUZFVyhP1OrlM102/Y/8i85f5du+4MXbWlFjLfEOcur6C
 9nmknE3n/mzrsi1lBP47GkRJKjY2tvgOzNH4FgskKbB3fLb8LBvUJ5PmijX7lJdTx43Q
 qyPTZJzeHRr8w6fEEAAETX7ShRvgotxeOb0J8rClwCWDW8hFhBJudPXyOtcC/i0+c2/v
 wAcQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:from:date:message-id:subject:to;
 bh=/Y2TdDEV5Am4d3lyWqrnk5pPHltbxJwe4ffEUTHeEF4=;
 b=tCbg3zipYSEW+7E0QwpfDebAuEvFSDJcJzqQbbg95+NaNtW3DGiKGNrFSpuJ0Xo0zd
 Dne7TgHM3rMvmEt9xAG71PuTmrfTNUwcl3Iedn0A3Mfe0g3gBjNXUtOk3hXsbdcxZbgh
 VvjeKN+kvj3kJ01id+Ejw8K31e2lbiOlp80bnQulDtsa4uin6+4FtdkMXhINz3IE+5BJ
 FQlfhZsO2g7pEuLNMAs71ZdBpU0CksPyIizdoamIuCloXZYg6iwPU+CzSjTgwdcFKCRv
 E83I1FQJahJQiEuf/7VqqBO5qCq0Khmec1PeKAXrglrhpmo/NzuT9ITZ1asZ1RtiBh2S
 lQgg==
X-Gm-Message-State: APt69E0HiqkAu9Y4bvoG7NMmlnete/2VSJYEmwIp1zVW5xh4T4AmveB5
 YMR/CMEq6/ArTbOuCZjamThJNWIpPQUKIcM3gZh4/oNa
X-Google-Smtp-Source: ADUXVKJQQbcDdr+GlenXuotswcfEda8MIYWSdu9kYxxXrOTHFz2gqZmiDiCBN06uiL/XJAkiyPkWQKFWlC0Y2i0DWeM=
X-Received: by 2002:a62:d9c5:: with SMTP id
 b66-v6mr1035084pfl.41.1528819768520; 
 Tue, 12 Jun 2018 09:09:28 -0700 (PDT)
MIME-Version: 1.0
From: SK Kim <tttuuu888@HIDDEN>
Date: Wed, 13 Jun 2018 01:09:17 +0900
Message-ID: <CAKYNWwR2vwfZrMo9QfksJZTnrWd8j69W=kfoXgZM1w5_NYJ_xg@HIDDEN>
Subject: suggestion of improvement for sort-numeric-fields function.
To: bug-gnu-emacs@HIDDEN
Content-Type: multipart/alternative; boundary="0000000000003a74d5056e7417e9"
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
 recognized.
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -3.8 (---)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.8 (----)

--0000000000003a74d5056e7417e9
Content-Type: text/plain; charset="UTF-8"

This is not likely a bug but sort-numeric-fields function does not allow
region with blank lines, while sort-lines does.

This was because sort-skip-fields occurs error with blank line. And when I
added condition for sort-skip-fields like below, sort-numeric-fields was
working with blank lines too.

                     (when (not (string-match-p "^\\s-*$" (thing-at-point
'line)))
                       (sort-skip-fields field))

So, I just hope sort-numeric-fields would work for region with blank lines
too.

I tested with GNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.18.9) of 2018-05-29


Always appreciate for contribution.
Thanks.

--0000000000003a74d5056e7417e9
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">This is not likely a bug but sort-numeric-fields function =
does not allow region with blank lines, while sort-lines does.<div><div><br=
></div><div>This was because sort-skip-fields occurs error with blank line.=
 And when I added condition for sort-skip-fields like below, sort-numeric-f=
ields was working with blank lines too.<br></div><div><br></div><div><div>=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0(when (not (string-match-p &quot;^\\s-*$&quot; (thing-at-point &#39;line=
)))</div><div>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0(sort-skip-fields field))</div></div><div><br></div=
><div>So, I just hope sort-numeric-fields would work for region with blank =
lines too.</div><div><br></div><div>I tested with GNU Emacs 26.1 (build 1, =
x86_64-pc-linux-gnu, GTK+ Version 3.18.9) of 2018-05-29</div><div><br></div=
><div><br></div><div>Always appreciate for contribution.</div><div>Thanks.<=
/div></div></div>

--0000000000003a74d5056e7417e9--




Acknowledgement sent to SK Kim <tttuuu888@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#31800; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Tue, 4 Aug 2020 16:15:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.