From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Rafael Newsgroups: gmane.emacs.help Subject: Re: Command to execute in a shell Date: Thu, 30 Jul 2009 23:18:36 -0500 Organization: CNNTP Message-ID: <87d47h5vtv.fsfhello@somewhere.com> References: <87tz0t68ln.fsfhello@somewhere.com> <871vnxefhq.fsf@galatea.local> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1249015249 31334 80.91.229.12 (31 Jul 2009 04:40:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 31 Jul 2009 04:40:49 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jul 31 06:40:35 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MWjv0-0007Dk-E3 for geh-help-gnu-emacs@m.gmane.org; Fri, 31 Jul 2009 06:40:35 +0200 Original-Received: from localhost ([127.0.0.1]:53958 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MWjuz-0005z6-Sz for geh-help-gnu-emacs@m.gmane.org; Fri, 31 Jul 2009 00:40:33 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!goblin1!goblin.stu.neva.ru!newsfeed.datemas.de!feed.cnntp.org!news.cnntp.org!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.94 (gnu/linux) Cancel-Lock: sha1:hrUUdpkS3i9Tc3rGDXcy02R6vFs= Original-Lines: 42 Original-NNTP-Posting-Host: af17076e.read.cnntp.org Original-X-Trace: DXC=MWm_87N`N^>SMUE; :\`=7; \nZ<6LX>0VkRNn=kVK0?o`Q9PFUTLCX0<[ Original-X-Complaints-To: abuse@cnntp.org Original-Xref: news.stanford.edu gnu.emacs.help:171368 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:66553 Archived-At: 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.