all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* `sort-lines' on the empty region
@ 2013-01-21 13:51 Simen Heggestøyl
  2013-01-21 16:53 ` Christopher Schmidt
  0 siblings, 1 reply; 2+ messages in thread
From: Simen Heggestøyl @ 2013-01-21 13:51 UTC (permalink / raw)
  To: emacs-devel

The current behavior of `sort-lines' on the empty region is to do
nothing. I often find that I want to sort whole buffers at the time,
and I expect `sort-lines' to do just that, before remembering I have
to mark the whole buffer first.

Wouldn't it be convenient to change the behavior of `sort-lines' so
that it sorts the whole buffer if no region is marked? Or is this
inconsistent with how other region-operating functions works?



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: `sort-lines' on the empty region
  2013-01-21 13:51 `sort-lines' on the empty region Simen Heggestøyl
@ 2013-01-21 16:53 ` Christopher Schmidt
  0 siblings, 0 replies; 2+ messages in thread
From: Christopher Schmidt @ 2013-01-21 16:53 UTC (permalink / raw)
  To: emacs-devel

simenheg@ifi.uio.no (Simen Heggestøyl) writes:
> Wouldn't it be convenient to change the behavior of `sort-lines' so
> that it sorts the whole buffer if no region is marked? Or is this
> inconsistent with how other region-operating functions works?

Yes, this is inconsistent.  I would not like that behaviour, especially
in non-interactive use.

You can easily achieve what you want by defining a new command or
advicing sort-lines.

        Christopher



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-01-21 16:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-21 13:51 `sort-lines' on the empty region Simen Heggestøyl
2013-01-21 16:53 ` Christopher Schmidt

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.