From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#31800: suggestion of improvement for sort-numeric-fields function. Date: Thu, 23 Jan 2020 15:50:12 +0100 Message-ID: <87zheefcrf.fsf@marxist.se> References: <874l3qy517.fsf@mouse.gnus.org> <87v9p5rjhj.fsf@marxist.se> <87v9p3vc57.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="54981"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: SK Kim , 31800@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jan 23 19:03:02 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iugoo-000EG1-Lq for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 23 Jan 2020 19:03:02 +0100 Original-Received: from localhost ([::1]:34216 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iugom-00043Z-VY for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 23 Jan 2020 13:03:01 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38413) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iudp3-0002SA-4R for bug-gnu-emacs@gnu.org; Thu, 23 Jan 2020 09:51:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iudp2-0000yv-2V for bug-gnu-emacs@gnu.org; Thu, 23 Jan 2020 09:51:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46088) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iudp1-0000yi-Vg for bug-gnu-emacs@gnu.org; Thu, 23 Jan 2020 09:51:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iudoz-0000Bs-V9 for bug-gnu-emacs@gnu.org; Thu, 23 Jan 2020 09:51:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 23 Jan 2020 14:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 31800 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 31800-submit@debbugs.gnu.org id=B31800.1579791021672 (code B ref 31800); Thu, 23 Jan 2020 14:51:01 +0000 Original-Received: (at 31800) by debbugs.gnu.org; 23 Jan 2020 14:50:21 +0000 Original-Received: from localhost ([127.0.0.1]:52061 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iudoL-0000Am-FJ for submit@debbugs.gnu.org; Thu, 23 Jan 2020 09:50:21 -0500 Original-Received: from ted.gofardesign.uk ([67.225.143.91]:56350) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iudoK-0000AY-8P for 31800@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==; Original-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 ) id 1iudoE-001PTW-65; Thu, 23 Jan 2020 09:50:14 -0500 In-Reply-To: <87v9p3vc57.fsf@gnus.org> (Lars Ingebrigtsen's message of "Wed, 22 Jan 2020 14:44:36 +0100") 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@marxist.se X-Authenticated-Sender: ted.gofardesign.uk: stefan@marxist.se 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: 209.51.188.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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:175173 Archived-At: Lars Ingebrigtsen 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