[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
Fri Sep 23 04:28:32 EDT 2011


On 2011-09-23, at 04:10 , Iliya Lefterov wrote:

> Jack,
> 
> i totally agree with you. i also think the "save in a register" code you brought in is very, very important and  may be the most useful in this series of emails and comments. one great thing about Emacs (and it is my opinion, other people may disagree...) is the possibility to make it working in a way the user likes it. is it easy to get there...? - i don't think so. BTW, i still don't know if Marius is using Aquamacs to edit and compile LaTex files...? :)

yes ! (?)

In order for this thread to become the longest in the history of mailing lists (*lol*), let's continue here... I changed the default to latexmk (for several reasons) on C-c C-c. The only drawback is that on a second (also third, fourth,...) C-c C-c, Aquamacs asks again if it should compile it with latexmk instead of offering to view the document. But I guess it just can't know that latexmk only needs "one run" to finish. If someone knows a solution to that please let me know.

But I would also like to mention something else: The above approach is not the pdc [= pretty damn coolest]. The real pdc approach (I think) is this: go to a shell/terminal, navigate to the document master.tex (your favorite .tex file, being the master if you have a project). Then type in latexmk -pvc -pdf master.tex 
latexmk now "listens". Whenever you save (with CMD + S), the document will be automatically compiled and updated. This has many advantages, for example, you don't have to type in anything except for saving. And: you don't have to use ugly local variables in all of your project files or tricky (see one of my recent posts) master-detection-algorithms... 

Cheers,

Marius

> 
> cheers, and have a nice weekend.
> 
> iliya
> 
> On Thu, Sep 22, 2011 at 9:42 PM, Jack Repenning <jrepenning at collab.net> wrote:
> 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!
> 
> -==-
> 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
> 
> 
> 
> 
> -- 
> 
> Iliya Lefterov, MD, PhD,
> University of Pittsburgh,
> Pittsburgh, PA
> USA
> 
> iliya.lefterov at gmail.com
> iliyal at pitt.edu
> 
> _____________________________________________________________
> 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