all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: jadamson@partners.org (Joel J. Adamson)
To: help-gnu-emacs@gnu.org
Subject: Re: Run shell command from latex?
Date: Thu, 10 Apr 2008 09:53:50 -0400	[thread overview]
Message-ID: <873aptq0i9.fsf@W0053328.mgh.harvard.edu> (raw)
In-Reply-To: <87ve2q2ok4.fsf@localhorst.mine.nu> (David Hansen's message of "Thu, 10 Apr 2008 08:48:11 +0200")

David Hansen <david.hansen@gmx.net> writes:

> On Wed, 09 Apr 2008 22:39:03 +0200 saneman wrote:
>
>> I know but I don't want to type 'make' each time. Instead I would like
>> to define a short key in my .emacs file that executes the script.
>>
>> Something like:
>>
>> (global-set-key "\C-r" 'myscript)
>
> (defun do-myscript ()
>   (interactive)
>   (shell-command "myscript"))
>
> (global-set-key (kbd "C-r") #'do-myscript)
>
> Anyway, compile mode is far more convenient if it understands your error
> messages.  You could e.g. (global-set-key (kbd "C-c c") #'compile) if
> you don't like to type M-x compile every time.
>
> But in case of latex files it's probably a better idea to look how to
> manipulate the external programs used by auctex (don't know if
> compile-mode understands latexs error messages).

Yes, AUCTeX will take you straight to the first error in your text.  You
use "C-cC-c" to compile LaTeX.

As for not wanting to type "make" every time, (1) you don't: the default
compile-command comes up in the minibuffer and you hit RET; and (2) get
real: yes you can skip that extra keystroke but do you want to deal with
the crap you're going to get from skipping it?  What happens if you
change your mind about which command to run?  The designers of AUCTeX
have already done the hard work for you.

I suggest that you reorganize your project (using LaTeX commands, or
appropriate Makefile structure) and learn to use AUCTeX and "M-x
compile."

Joel

-- 
Joel J. Adamson
Biostatistician
Pediatric Psychopharmacology Research Unit
Massachusetts General Hospital
Boston, MA  02114
(617) 643-1432
(303) 880-3109
Public key: http://pgp.mit.edu

The information transmitted in this electronic communication is intended only
for the person or entity to whom it is addressed and may contain confidential
and/or privileged material. Any review, retransmission, dissemination or other
use of or taking of any action in reliance upon this information by persons or
entities other than the intended recipient is prohibited. If you received this
information in error, please contact the Compliance HelpLine at 800-856-1983 and
properly dispose of this information.







  parent reply	other threads:[~2008-04-10 13:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-09 19:11 Run shell command from latex? saneman
2008-04-09 20:09 ` David Hansen
     [not found] ` <mailman.10212.1207772610.18990.help-gnu-emacs@gnu.org>
2008-04-09 20:39   ` saneman
2008-04-10  6:48     ` David Hansen
2008-04-10  8:04       ` David Hansen
2008-04-10 13:53       ` Joel J. Adamson [this message]
2008-04-11 13:00         ` Nikolaj Schumacher
2008-04-11 14:41           ` Joel J. Adamson
2008-04-09 21:50 ` Peter Dyballa

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=873aptq0i9.fsf@W0053328.mgh.harvard.edu \
    --to=jadamson@partners.org \
    --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.