all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Xah <xahlee@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: simple tex shell command
Date: Tue, 10 Jun 2008 17:00:44 -0700 (PDT)	[thread overview]
Message-ID: <3093a6c0-f4f8-464c-b507-b9a0da8d78a3@a32g2000prf.googlegroups.com> (raw)
In-Reply-To: 2a238cd9-e48e-44a5-8237-ff0e3f17138d@p25g2000hsf.googlegroups.com

To run a shell command in elisp, you need, e.g.

(shell-command command &optional output-buffer error-buffer)
or
(setq sh-output
          (shell-command-to-string (concat cmd-name " " img-file-
path)))

for a full code example, see the xGetDimention in

Elisp Lesson: Writing image-linkify Function
http://xahlee.org/emacs/elisp_image_tag.html

  Xah
∑ http://xahlee.org/

☄

On Jun 10, 5:40 am, "benjamin.friedrich"
<benjamin.friedr...@gmail.com> wrote:
> Dear all,
>
> I am a lisp newbie;
> I want to define a short-cut in my .emacs which automatically runs
> latex on my thesis,
> i.e. something like this
>
> (defun tex-thesis () "latex my thesis" "latex \\nonstopmode\input -src
> E:/thesis/thesis.tex")
> (global-set-key [f4] 'tex-thesis)
>
> How should this read as correct lisp code?
>
> Thanks,
> Ben
>
> P.S.
> I tried
> (setq tex-main-file "E:/ben/thesis/thesis.tex")
> but then c-c c-f 'latex-file will always latex the thesis, even if I
> happen
> to work on a tex-file that does not belong to the thesis.



  reply	other threads:[~2008-06-11  0:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-10 12:40 simple tex shell command benjamin.friedrich
2008-06-11  0:00 ` Xah [this message]
2008-06-11  9:02 ` Peter Dyballa
2008-06-11 13:42 ` Joel J. Adamson

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=3093a6c0-f4f8-464c-b507-b9a0da8d78a3@a32g2000prf.googlegroups.com \
    --to=xahlee@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.