bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#13521: `sort-lines' on the empty region


From: Drew Adams
Subject: bug#13521: `sort-lines' on the empty region
Date: Sat, 5 Sep 2020 08:46:14 -0700 (PDT)

> > > > 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.
> > >
> > > Please don't doubt, and please don't impose unnecessary commands on
> > > users who have transient-mark-mode off.
> >
> > Please don't claim that I imposed any commands on anyone.
> 
> You expected them to narrow the buffer.  That takes additional
> commands.

I do expect that, for `flush-lines', which is what I
was thinking of.  You correctly pointed out that
`sort-lines' is different.

> > The region is nearly always present and usually nonempty.
> > A user with `transient-mark-mode' off would typically
> > (IMHO) be bothered if `flush-lines' started always acting
> > on the region (it would be almost always: whenever there's
> > a mark in the buffer and the region is nonempty).
> 
> So maybe flush-lines needs a separate solution, or none at all.  This
> bug is about sort-lines, so flush-lines is a tangent.

I didn't introduce `flush-lines' into the thread.
But yes, the subject line says `sort-lines', and
`flush-lines' is a very different case.

> > And I think "the important point here" is that a command
> > that behaves differently when the region is active should
> > NOT act on the region when `transient-mark-mode' is off.
> 
> That's not really relevant here.  We are talking about commands which
> by virtue of their 'interactive' spec work on the region.  Such
> commands shouldn't depend on the region being active.

Yes, if this is only about commands like `sort-lines'.
Introducing `flush-lines' here was apparently a mistake,
which muddied the waters.

> > This was not the case for `sort-lines', as you point out.
> > It did NOT, and does not, behave differently when the
> > region is active from when it is inactive.
> 
> The proposed change would have made it behave differently, which is
> why I've pointed that out.

Good.  Agreed.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]