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

Hofert Jan Marius marius.hofert at math.ethz.ch
Wed Sep 21 03:58:43 EDT 2011


Dear Piet,

I tried that:
(1) C-<SPC> to set the mark
(2) then I moved the cursor [this of course does *not* select *all*, just a region...]
(3) typing C-<SPC> again [that just cleared the marking]...
(4) hitting C-<SPC> once more [this just set a new mark]

I can't be that hard. In textmate it is just Command + A to select all without moving and in many modern editors it is not much more complicated either. As a newbie to emacs, I get quite confused by all these many keys to hit and although being easier in the long run, having to type that much seems complicated. Hmm...

Cheers,

Marius 



On 2011-09-21, at 09:26 , Piet van Oostrum wrote:

> 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]
> 
> _____________________________________________________________
> MacOSX-Emacs mailing list
> MacOSX-Emacs at email.esm.psu.edu
> http://email.esm.psu.edu/mailman/listinfo/macosx-emacs
> List Archives: http://dir.gmane.org/gmane.emacs.macintosh.osx





More information about the MacOSX-Emacs mailing list