GNU bug report logs -
#13521
`sort-lines' on the empty region
Previous Next
Reported by: Xue Fuqiao <xfq.free <at> gmail.com>
Date: Tue, 22 Jan 2013 00:56:01 UTC
Severity: wishlist
Tags: patch, wontfix
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #46 received at 13521 <at> debbugs.gnu.org (full text, mbox):
> > > So if the user has transient-mark-mode disabled (which is what I do),
> > > the command will always sort the entire buffer? Or did I
> > > misunderstand something?
> >
> > I didn't consider that case, but you are correct. The behavior would be
> > like that documented in `flush-lines':
> >
> > Interactively, in Transient Mark mode when the mark is active, operate
> > on the contents of the region. Otherwise, operate from point to the
> > end of (the accessible portion of) the buffer.
> >
> > I'm not sure the `flush-lines' behavior makes sense, though. It looks
> > like you can't run it on a region without transient-mark-mode. So maybe
> > we should fix that as well.
>
> I think we should indeed fix flush-lines as well, yes.
>
> > (Note that `flush-lines' operates from point to point-max, but
> > `sort-lines' is proposed here to operate on the entire buffer instead as
> > per previous discussion in this bug.)
>
> I guess due to historical reasons?
Apologies for not following this thread and perhaps
misunderstanding at this point.
If `transient-mark-mode' is off then there is no notion
of an "active region". There is just the region.
I doubt that someone who has `transient-mark-mode' off
would ever want commands such as `flush-lines' and
`sort-lines' to act on the region. And if they did, I
expect they'd just narrow to it.
Anything that works on "the active region" is something
that makes sense only when `transient-mark-mode' is on
(IMHO).
This bug report was last modified 4 years and 9 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.