help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help: execute scripts form emacs


From: Raymond Wiker
Subject: Re: Help: execute scripts form emacs
Date: Wed, 14 Oct 2009 18:01:57 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (darwin)

wdysun <grammophonia@gmail.com> writes:

> Hello dears,
>
> suppose I have a script in /bin, let us assume it is called mytex. Suppose I
> am editing  a  file called  filename.tex. 
>
> If I run the following command from the console: 
>
> $ mytex  filename
>
> this will do several things (tex the filename with several options, then
> convert the dvi to pdf and it deletes all aux files I don't need).
>
> There is a way to launch the script from emacs or even to build a function
> so that I can run the command just with M  - something?

        Looks like M-x compile will do what you want... at the prompt,
type the command (mytex), space, and the filename. As a bonus, you will
get filename completion for both the command and the filename(s).

        Even better, the next time you want to do this, the previous
command will come up as default.

        Even even better: if error messages from the command fit a
certain pattern, you should be able to use M-x next-error to locate the
offending line(s) in your input file.

        Note: tex-mode (or whatever it is called) will probably have
some predefined support for doing this even more easily.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]