[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Help: execute scripts form emacs
From: |
Olivier Sirven |
Subject: |
Re: Help: execute scripts form emacs |
Date: |
Mon, 12 Oct 2009 16:10:37 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) |
wdysun <grammophonia@gmail.com> writes:
> 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?
Hello,
You might want have a look at shell-command lisp function (C-h f) for this
purpose.
All you'd have to do is to write a small lisp function retreiving the
current file name and path and running your command against it.
Then a simple define-key or global-set-key would do the trick for your
shortcut.
Olivier