[OS X Emacs] Re: Select all: how to *not* jump to the beginning of the file + how to not change the selection?

Piet van Oostrum piet at vanoostrum.org
Wed Sep 21 03:26:04 EDT 2011


Jack Repenning <jrepenning at collab.net> writes:

> On Sep 20, 2011, at 2:30 AM, Hofert Jan Marius wrote:
>
>> If I either hit Command-A or C-x h to select all text in a buffer, the cursor jumps to the beginning of a file. This is quite annoying when you want to, e.g., indent the whole file (or apply some other function) and then want to continue to work on where you were before. How can I select the whole buffer content without jumping the the first line of the buffer?
>
> You can't do that: Emacs' idea of "the selection" is "the stuff between the cursor (called point) and another magic location (called mark)." So by (Emacs') definition, the cursor is *always* at one end or the other of any selection.
>
> What you might be able to do is return to where you came from. 

You can do that with C-space twice. If you have moved in between you may
have to repeat the C-space a couple times more.
-- 
Piet van Oostrum <piet at vanoostrum.org>
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]




More information about the MacOSX-Emacs mailing list