From: Raymond Wiker <raw@RAWMBP-2.local>
To: help-gnu-emacs@gnu.org
Subject: Re: Help: execute scripts form emacs
Date: Wed, 14 Oct 2009 18:01:57 +0200 [thread overview]
Message-ID: <m2ocoaotfu.fsf@RAWMBP-2.local.i-did-not-set--mail-host-address--so-tickle-me> (raw)
In-Reply-To: mailman.8598.1255354671.2239.help-gnu-emacs@gnu.org
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.
next prev parent reply other threads:[~2009-10-14 16:01 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 ` Help: execute scripts form emacs Olivier Sirven
2009-10-12 17:30 ` Pascal J. Bourguignon
2009-10-14 9:37 ` Xah Lee
2009-10-14 16:01 ` Raymond Wiker [this message]
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
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=m2ocoaotfu.fsf@RAWMBP-2.local.i-did-not-set--mail-host-address--so-tickle-me \
--to=raw@rawmbp-2.local \
--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).