From: Artur Malabarba <bruce.connor.am@gmail.com>
To: 21785@debbugs.gnu.org
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 [thread overview]
Message-ID: <CAAdUY-KyehRf1V2GQsHKXvBR0N32HFqcCPu5Bvgq3a8jpQQoLg@mail.gmail.com> (raw)
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.
next reply other threads:[~2015-10-29 12:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-29 12:38 Artur Malabarba [this message]
2019-08-01 18:38 ` bug#21785: 25.0.50; sort-fields fails if region ends in a newline and sort-paragraph fails if it doesn't Lars Ingebrigtsen
2019-08-23 1:44 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAAdUY-KyehRf1V2GQsHKXvBR0N32HFqcCPu5Bvgq3a8jpQQoLg@mail.gmail.com \
--to=bruce.connor.am@gmail.com \
--cc=21785@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.