[OS X Emacs] 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
Thu Sep 22 13:53:28 EDT 2011
On 2011-09-22, at 19:28 , Jack Repenning wrote:
> On Sep 21, 2011, at 10:46 PM, Hofert Jan Marius wrote:
>
>> No, I don't use another binding.
>
> I was actually asking that question of Piet van Oostrum. Who, actually, had already provided the answer, "C-u before C-space."
>
>> Our original question was how to select all (to apply some function to the selection).
>
> Ah.
>
> I thought the original question was more like
>
> 1. have point somewhere or other in the middle of a paragraph (or file)
> 2. use a command that marks the whole paragraph (or file), like mark-paragraph (or mark-whole-buffer)
> 3. use a command that operates on the region, like indent-region
> 4. now, get point back to where it was at #1
>
> C-u C-space about twice does the job. I was confused by the original reference to "C-space" (i.e., Piet originally left out the all-important C-u).
for selecting and apply a function, then going back, yes. I like Elliott's suggestion with "remember":
C-x r <SPC> 1 # mark/remember point in register 1
C-x r j 1 # will get the cursor back
It has the advantage of not selecting/highlighting anything. This is nice (non-distracting) for example for editing .tex files.
>
> -==-
> Jack Repenning
> Technologist
> CollabNet Cloud Services
> CollabNet, Inc.
> 8000 Marina Boulevard, Suite 600
> Brisbane, California 94005
> office: +1 650.228.2562
> twitter: http://twitter.com/jrep
>
>
>
>
>
>
>
>
>
>
> _____________________________________________________________
> 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
ETH Zurich
Dr. Marius Hofert
RiskLab, Department of Mathematics
HG E 65.2
Rämistrasse 101
8092 Zurich
Switzerland
Phone +41 44 632 2423
marius.hofert at math.ethz.ch
http://www.math.ethz.ch/~hofertj
More information about the MacOSX-Emacs
mailing list