emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] New command to invert lines in region


From: Kalle Olavi Niemitalo
Subject: Re: [PATCH] New command to invert lines in region
Date: Sun, 16 Oct 2016 21:25:46 +0300
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.51 (gnu/linux)

Mathias Dahl <address@hidden> writes:

> I wrote my own naïve version that I think is much simpler to
> understand and which seems to be as quick as the current version (I tested
> on a buffer with 100 000 lines.)

If I use point-to-register to set a marker at the beginning of
the region and another at the end of the region, then the
original version of reverse-region keeps the markers where they
are, but your version moves both markers to the beginning of the
region, because it deletes all the original lines before it
inserts anything.

It might be nice if reverse-region and sort-columns moved any
markers along with the lines.  I don't know how much that would
slow them down or whether there would be any practical use for
such a feature.



reply via email to

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