From: Rafael <rvf0068@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Command to execute in a shell
Date: Thu, 30 Jul 2009 23:18:36 -0500 [thread overview]
Message-ID: <87d47h5vtv.fsfhello@somewhere.com> (raw)
In-Reply-To: 871vnxefhq.fsf@galatea.local
pjb@informatimago.com (Pascal J. Bourguignon) writes:
> If you really want shell, then you will have to send the command to
> the shell process:
>
> ;; instead of (shell):
> (let ((file-path (buffer-file-name)))
> (when file-path
> (shell)
> (comint-send-string (get-buffer-process (current-buffer))
> (format "tikz2pdf -v %S \n" file-path))))
Thank you very much, this is exactly what I wanted at this point.
Since the picture files are usually small, most of the time I just want
to know if the compilation was successful. The result of this can be
seen at
http://farm4.static.flickr.com/3424/3774270402_81b58c6909_o.png
and the function I have so far is:
(defun split-for-tikz2pdf ()
(interactive)
(TeX-run-style-hooks "tikz")
(split-window-horizontally 60)
(other-window 1)
(split-window-vertically 15)
(find-file "tikz2pdf_temp.pdf")
(doc-view-mode)
(auto-revert-mode 1)
(other-window 1)
(let ((file-path (buffer-file-name)))
(when file-path
(shell)
(comint-send-string (get-buffer-process (current-buffer))
(format "tikz2pdf -v %S \n" file-path))))
)
and the only wish I have now is to have doc-view-mode actually chosen
for the buffer of the .pdf file, (which is a new file at the moment).
As it is, it is in text mode (the default-major-mode). I would
appreciate any comments.
next prev parent reply other threads:[~2009-07-31 4:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-30 23:42 Command to execute in a shell Rafael
2009-07-31 2:46 ` Pascal J. Bourguignon
2009-07-31 4:18 ` Rafael [this message]
2009-08-01 23:57 ` Xah Lee
2010-02-19 5:41 ` Rafael
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=87d47h5vtv.fsfhello@somewhere.com \
--to=rvf0068@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.