unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Joost Kremers <joostkremers@yahoo.com>
To: help-gnu-emacs@gnu.org
Subject: Re: binding a command and a parameter
Date: 14 Oct 2007 19:54:55 GMT	[thread overview]
Message-ID: <slrnfh4sve.4pv.joostkremers@j.kremers4.news.arnhem.chello.nl> (raw)
In-Reply-To: fetq2l$fqi$1@ss408.t-com.hr

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)

  reply	other threads:[~2007-10-14 19:54 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-13 19:09 binding a command and a parameter Nikola Skoric
2007-10-13 22:41 ` Peter Dyballa
     [not found] ` <mailman.2032.1192315305.18990.help-gnu-emacs@gnu.org>
2007-10-14  9:21   ` Nikola Skoric
2007-10-14 16:57     ` Maarten Bergvelt
2007-10-14 17:26       ` Nikola Skoric
2007-10-14 17:40         ` Nikola Skoric
2007-10-14 17:57           ` Joost Kremers
2007-10-14 19:18             ` Nikola Skoric
2007-10-14 19:54               ` Joost Kremers [this message]
2007-10-14 20:46                 ` Nikola Skoric
2007-10-14 21:11                   ` Nikola Skoric
2007-10-14 22:17                     ` Joost Kremers
2007-10-14 22:25                       ` David Kastrup
2007-10-15 18:37                         ` Joost Kremers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=slrnfh4sve.4pv.joostkremers@j.kremers4.news.arnhem.chello.nl \
    --to=joostkremers@yahoo.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).