unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Eli Zaretskii <eliz@gnu.org>, Drew Adams <drew.adams@oracle.com>
Cc: xfq.free@gmail.com, rgm@gnu.org, stefan@marxist.se,
	monnier@iro.umontreal.ca, 13521@debbugs.gnu.org
Subject: bug#13521: `sort-lines' on the empty region
Date: Sat, 5 Sep 2020 08:46:14 -0700 (PDT)	[thread overview]
Message-ID: <317a21e9-c922-49f4-897f-1a753e06e13b@default> (raw)
In-Reply-To: <<837dt8p74z.fsf@gnu.org>>

> > > > 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	other threads:[~2020-09-05 15:46 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <<<<20130122085354.75ced82538551655e724e0ea@gmail.com>
     [not found] ` <<<<jwvobgh2rkw.fsf-monnier+emacs@gnu.org>
     [not found]   ` <<<<i2ehhdaxnq.fsf@fencepost.gnu.org>
     [not found]     ` <<<<jwv1udd2gab.fsf-monnier+emacs@gnu.org>
     [not found]       ` <<<<CADwFkm=SDc3obOA_KXvtWOBRay+aWtnOtkKX5SGPwXGVB=+hYg@mail.gmail.com>
     [not found]         ` <<<<83mu2objro.fsf@gnu.org>
     [not found]           ` <<<<CADwFkmnf6ch6CBN13opEWDVnZYY-TaT236xg21Qg2KjWuUVz+w@mail.gmail.com>
     [not found]             ` <<<<83imdcbgc5.fsf@gnu.org>
     [not found]               ` <<<<CADwFkm=V7cUz2_5Xr8=k6EZbFK96pJu8wpo6uAA+H7ABDYdH0w@mail.gmail.com>
     [not found]                 ` <<<<83imcspim8.fsf@gnu.org>
     [not found]                   ` <<<3aad96d8-2503-40e8-b684-8ed18a089083@default>
     [not found]                     ` <<<83a6y4p98g.fsf@gnu.org>
     [not found]                       ` <<7cfc062e-05b2-43f1-8714-19ebd955b88c@default>
     [not found]                         ` <<837dt8p74z.fsf@gnu.org>
2020-09-05 15:46                           ` Drew Adams [this message]
     [not found] <<<20130122085354.75ced82538551655e724e0ea@gmail.com>
     [not found] ` <<<jwvobgh2rkw.fsf-monnier+emacs@gnu.org>
     [not found]   ` <<<i2ehhdaxnq.fsf@fencepost.gnu.org>
     [not found]     ` <<<jwv1udd2gab.fsf-monnier+emacs@gnu.org>
     [not found]       ` <<<CADwFkm=SDc3obOA_KXvtWOBRay+aWtnOtkKX5SGPwXGVB=+hYg@mail.gmail.com>
     [not found]         ` <<<83mu2objro.fsf@gnu.org>
     [not found]           ` <<<CADwFkmnf6ch6CBN13opEWDVnZYY-TaT236xg21Qg2KjWuUVz+w@mail.gmail.com>
     [not found]             ` <<<83imdcbgc5.fsf@gnu.org>
     [not found]               ` <<<CADwFkm=V7cUz2_5Xr8=k6EZbFK96pJu8wpo6uAA+H7ABDYdH0w@mail.gmail.com>
     [not found]                 ` <<<83imcspim8.fsf@gnu.org>
     [not found]                   ` <<3aad96d8-2503-40e8-b684-8ed18a089083@default>
     [not found]                     ` <<83a6y4p98g.fsf@gnu.org>
2020-09-05 15:22                       ` bug#13521: `sort-lines' on the empty region Drew Adams
2020-09-05 15:37                         ` Eli Zaretskii
     [not found] <<20130122085354.75ced82538551655e724e0ea@gmail.com>
     [not found] ` <<jwvobgh2rkw.fsf-monnier+emacs@gnu.org>
     [not found]   ` <<i2ehhdaxnq.fsf@fencepost.gnu.org>
     [not found]     ` <<jwv1udd2gab.fsf-monnier+emacs@gnu.org>
     [not found]       ` <<CADwFkm=SDc3obOA_KXvtWOBRay+aWtnOtkKX5SGPwXGVB=+hYg@mail.gmail.com>
     [not found]         ` <<83mu2objro.fsf@gnu.org>
     [not found]           ` <<CADwFkmnf6ch6CBN13opEWDVnZYY-TaT236xg21Qg2KjWuUVz+w@mail.gmail.com>
     [not found]             ` <<83imdcbgc5.fsf@gnu.org>
     [not found]               ` <<CADwFkm=V7cUz2_5Xr8=k6EZbFK96pJu8wpo6uAA+H7ABDYdH0w@mail.gmail.com>
     [not found]                 ` <<83imcspim8.fsf@gnu.org>
2020-09-05 14:36                   ` Drew Adams
2020-09-05 14:51                     ` Eli Zaretskii
2020-09-05 15:34                       ` Stefan Monnier
2013-01-22  0:53 Xue Fuqiao
2013-01-22  3:19 ` Glenn Morris
2013-01-22  3:44   ` Xue Fuqiao
2013-01-22  3:44   ` Xue Fuqiao
2013-01-22 14:59 ` Stefan Monnier
2013-01-22 18:19   ` Glenn Morris
2013-01-22 19:04     ` Stefan Monnier
2020-08-21  1:18       ` Stefan Kangas
2020-08-21  6:22         ` Eli Zaretskii
2020-08-21  7:15           ` Stefan Kangas
2020-08-21  7:36             ` Eli Zaretskii
2020-09-05 11:13               ` Stefan Kangas
2020-09-05 11:29                 ` Eli Zaretskii
2021-05-10 11:25           ` 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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=317a21e9-c922-49f4-897f-1a753e06e13b@default \
    --to=drew.adams@oracle.com \
    --cc=13521@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=rgm@gnu.org \
    --cc=stefan@marxist.se \
    --cc=xfq.free@gmail.com \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).