[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Command to execute in a shell
From: |
Rafael |
Subject: |
Re: Command to execute in a shell |
Date: |
Thu, 30 Jul 2009 23:18:36 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.94 (gnu/linux) |
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.