[OS X Emacs] Select all: how to *not* jump to the beginning of the file + how to not change the selection?
jrepenning at collab.net
Thu Sep 22 21:42:04 EDT 2011
On Sep 22, 2011, at 5:37 PM, Iliya Lefterov wrote:
> so what about if at the end of your point 4) you delete the paragraph? are you still interested in going in the meddle of that one as you state in point 1)?
Amusingly enough, that actually is a well-formed question in Emacs. If a region is deleted, and either point or mark were inside it, then they're moved to the spot where the deleted region formerly lived. So it's still meaningful to say "the same spot" even though the whole neighborhood around that spot is gone. This same logic applies to the save/restore window configuration code I posted, and I believe it also applies to the "save in a register" code: they're all cases of Emacs' general notion of "markers," and all markers behave this way.
It's also true that deleting a region leaves point at the point of deletion -- i.e., the same spot as the old point and mark are mapped to. So you don't need to want to go there, because you're already be there!
CollabNet Cloud Services
8000 Marina Boulevard, Suite 600
Brisbane, California 94005
office: +1 650.228.2562
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the MacOSX-Emacs