From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Joost Kremers Newsgroups: gmane.emacs.help Subject: Re: binding a command and a parameter Date: 14 Oct 2007 19:54:55 GMT Message-ID: References: NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1192394510 22458 80.91.229.12 (14 Oct 2007 20:41:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 14 Oct 2007 20:41:50 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Oct 14 22:41:41 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IhAH2-0007CQ-4n for geh-help-gnu-emacs@m.gmane.org; Sun, 14 Oct 2007 22:41:20 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IhAGv-0002or-Gb for geh-help-gnu-emacs@m.gmane.org; Sun, 14 Oct 2007 16:41:13 -0400 Original-Path: shelby.stanford.edu!headwall.stanford.edu!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 55 Original-X-Trace: individual.net yjRMQ9lx/2U4KRgRVIjcEwmu8tkDMTnMMupolPIulaR7kmspdI Cancel-Lock: sha1:FTHNtAg5s2HKv1sWtkBSC2cgtLU= Mail-Copies-To: nobody X-Editor: Emacs of course! User-Agent: slrn/0.9.8.1 (Linux) Original-Xref: shelby.stanford.edu gnu.emacs.help:152912 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:48416 Archived-At: Nikola Skoric wrote: > Of course dvi file is up-to-date since I'm editing .tex file which is then > \included to .tex file I'm compiling (main fail doesn't change). So, my default > option is always view :-) then there is something not entirely right about your setup. my first guess would be that you don't have a TeX-master set in your included files. if you do, AUCTeX will know that the file you're editing is not the master file, and will do the right thing if you compile your document. (what i mean is, you can then type C-c C-c in your included file, the one you're editing, and AUCTeX will know that it should actually compile the master file; it will also know that even though the master file hasn't changed, it must still run LaTeX on in, instead of xdvi.) the way to do this is to include a block of Local Variables in all of your latex files, right at the end: %%% Local Variables: %%% mode: latex %%% TeX-master: "thesis" %%% End: the important part is the TeX-master variable. this tells AUCTeX that the master file is thesis.tex, not chapter1.tex (or whatever file you're editing). in the master file itself, TeX-master should just be t: %%% Local Variables: %%% mode: latex %%% TeX-master: t %%% End: if you start a new .tex file, AUCTeX normally asks you want the master file is. if you use multi-file documents, it's a very good idea to set this up properly. >> however, the prompt sports TAB-completion, so all you really need to type >> to get latex is just `l', then hit RETURN. > > Arrow up works fine to, but I'd really like to learn how to bind this kind of > commands. :-D well, i guess binding a command plus interactive input to a key isn't the most common thing to do. personally, i'd delve into the AUCTeX source a bit and find out what lisp invocation actually runs the requisite latex command on the file i'm editing, wrap it in a lambda form and bind that to a key. but that requires some knowledge of lisp, of course. a quicker method may be to use a keyboard macro: (info "(emacs)Keyboard Macros"). -- Joost Kremers joostkremers@yahoo.com Selbst in die Unterwelt dringt durch Spalten Licht EN:SiS(9)