From: Olivier Sirven <the.slaa@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Help: execute scripts form emacs
Date: Mon, 12 Oct 2009 16:10:37 +0200 [thread overview]
Message-ID: <87bpkcpusi.fsf@corwin.home.thebuble.org> (raw)
In-Reply-To: mailman.8598.1255354671.2239.help-gnu-emacs@gnu.org
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
next parent reply other threads:[~2009-10-12 14:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.8598.1255354671.2239.help-gnu-emacs@gnu.org>
2009-10-12 14:10 ` Olivier Sirven [this message]
2009-10-12 17:30 ` Help: execute scripts form emacs Pascal J. Bourguignon
2009-10-14 9:37 ` Xah Lee
2009-10-14 16:01 ` Raymond Wiker
2009-10-12 10:39 wdysun
2009-10-12 18:37 ` wdysun
2009-10-13 20:49 ` Maurizio Vitale
2009-10-13 23:10 ` Andreas Politz
2009-10-14 8:24 ` wdysun
[not found] ` <mailman.8700.1255466814.2239.help-gnu-emacs@gnu.org>
2009-10-13 22:49 ` Jon Solberg
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87bpkcpusi.fsf@corwin.home.thebuble.org \
--to=the.slaa@gmail.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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.