From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Artur Malabarba Newsgroups: gmane.emacs.bugs Subject: bug#21785: 25.0.50; sort-fields fails if region ends in a newline and sort-paragraph fails if it doesn't Date: Thu, 29 Oct 2015 12:38:26 +0000 Message-ID: Reply-To: bruce.connor.am@gmail.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1446122358 4889 80.91.229.3 (29 Oct 2015 12:39:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 29 Oct 2015 12:39:18 +0000 (UTC) To: 21785@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Oct 29 13:39:09 2015 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 1ZrmTz-0001wK-7F for geb-bug-gnu-emacs@m.gmane.org; Thu, 29 Oct 2015 13:39:07 +0100 Original-Received: from localhost ([::1]:43825 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZrmTy-0003L2-LP for geb-bug-gnu-emacs@m.gmane.org; Thu, 29 Oct 2015 08:39:06 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55906) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZrmTv-0003Kt-6h for bug-gnu-emacs@gnu.org; Thu, 29 Oct 2015 08:39:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZrmTu-0004ct-Gm for bug-gnu-emacs@gnu.org; Thu, 29 Oct 2015 08:39:03 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:52683) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZrmTu-0004cd-B5 for bug-gnu-emacs@gnu.org; Thu, 29 Oct 2015 08:39:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZrmTu-00064v-0s for bug-gnu-emacs@gnu.org; Thu, 29 Oct 2015 08:39:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Artur Malabarba Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 29 Oct 2015 12:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 21785 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.144612231323329 (code B ref -1); Thu, 29 Oct 2015 12:39:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 29 Oct 2015 12:38:33 +0000 Original-Received: from localhost ([127.0.0.1]:43391 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZrmTQ-00064C-V4 for submit@debbugs.gnu.org; Thu, 29 Oct 2015 08:38:33 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:45531) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZrmTO-000644-JZ for submit@debbugs.gnu.org; Thu, 29 Oct 2015 08:38:31 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZrmTN-0004KI-4M for submit@debbugs.gnu.org; Thu, 29 Oct 2015 08:38:30 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:55986) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZrmTN-0004KD-1A for submit@debbugs.gnu.org; Thu, 29 Oct 2015 08:38:29 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55523) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZrmTM-0002sf-5B for bug-gnu-emacs@gnu.org; Thu, 29 Oct 2015 08:38:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZrmTL-0004Jh-CD for bug-gnu-emacs@gnu.org; Thu, 29 Oct 2015 08:38:28 -0400 Original-Received: from mail-lf0-x231.google.com ([2a00:1450:4010:c07::231]:35489) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZrmTL-0004JW-54 for bug-gnu-emacs@gnu.org; Thu, 29 Oct 2015 08:38:27 -0400 Original-Received: by lfbn126 with SMTP id n126so17839194lfb.2 for ; Thu, 29 Oct 2015 05:38:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:date:message-id:subject:from:to :content-type; bh=/CQzVL2QX6rLwGcZWbKbuoFprbxe+BCsfkeSqoYgIBE=; b=wnusk+lblW+XJ+mj+ZAC0N6fCK56//Pc4Z1IXWrsInNvRarnNB/HLHOgdYLp2Kyvs/ S1LiBevY2cvy244bIFVn9KvmcZZhQOE2keKnRL2jsQ0mOyqUAZC5iL4xX8ssVu1ryKEw jNdBvCNOKvhb94BY7ncOoVZI2Z/4vQMces2yoMp790PsPNSL+RENS2EKWL+TNX0wkQsZ vnUpV/9f9lv4FMOguhkCD1BQELDgUfW3N4TsA4AzyKZzVBVtkSAYB4lFYfFBLEyByVbx A3mOY7kYsV9jBNA9c6X0uUTCb6U/R5aXqEVIx/17QSE9vs/NqXOWu5GM5EzTf5/yt2Cg O9Mw== X-Received: by 10.25.85.193 with SMTP id j184mr552881lfb.2.1446122306317; Thu, 29 Oct 2015 05:38:26 -0700 (PDT) Original-Received: by 10.112.91.106 with HTTP; Thu, 29 Oct 2015 05:38:26 -0700 (PDT) X-Google-Sender-Auth: Chjy_yEPSzVjoXX3FAHLwkiWIUU X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x 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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:108143 Archived-At: I noticed this while writing tests for sort.el With the following buffer contents (the text between the dashes, including a final newline), issue `C-x h M-x sort-numeric-fields'. You'll get the error that the last line doesn't have enough fields. I think that error should not be thrown because of a final newline. --------------------- 1 hi 2 bye ---------------------- Meanwhile take the following buffer contents, -------------------- paragraph 2 paragraph 1 -------------------- If you issue `sort-paragraphs' on the whole buffer, you'll get this: -------------------- paragraph 1 paragraph 2 ------------------- In my opinion both behavior are bugs. But surely one of them is, as the functions should be somewhat consistent on demanding final newlines.