From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: ehudre@post.tau.ac.il (Ehud Reshef) Newsgroups: gmane.emacs.help Subject: Re: using DDE from gnu-emacs Date: 10 Dec 2002 14:00:41 -0800 Organization: http://groups.google.com/ Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <55087e56.0212101400.726d428@posting.google.com> References: <55087e56.0212071419.6ff3e90b@posting.google.com> NNTP-Posting-Host: main.gmane.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1039558426 6708 80.91.224.249 (10 Dec 2002 22:13:46 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 10 Dec 2002 22:13:46 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18LsdM-0001ju-00 for ; Tue, 10 Dec 2002 23:13:44 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18LsVq-00058P-04 for gnu-help-gnu-emacs@m.gmane.org; Tue, 10 Dec 2002 17:05:58 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews1.google.com!not-for-mail Original-Newsgroups: gnu.emacs.help,comp.emacs,comp.text.tex Original-Lines: 50 Original-NNTP-Posting-Host: 212.150.122.157 Original-X-Trace: posting.google.com 1039557641 30934 127.0.0.1 (10 Dec 2002 22:00:41 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: 10 Dec 2002 22:00:41 GMT Original-Xref: shelby.stanford.edu gnu.emacs.help:107974 comp.emacs:76364 comp.text.tex:237815 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:4510 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:4510 Jesper Harder wrote in message news:... > ehudre@post.tau.ac.il (Ehud Reshef) writes: > > > I Would like to modify AuCTeX's latex-pdf feature, as to first close > > any possibly open instances of the destination PDF file. > > I have seen that TeXnicCenter does that using Acrobat Reader's DDE. > > > > I am looking for a way to send to Acrobat, a DDE command from > > gnu-Emacs > > See: > > Thanks I Tried to follow the lead from there, and create the following (vey similar) lisp code: (defun acrobat-close-doc (file) "Close in Acrobat, using DDE." (save-excursion (set-buffer (get-buffer-create " *ddeclient*")) (erase-buffer) (insert (concat "[DocClose( " concat(file ".pdf )]" ))) (call-process-region (point-min) (point-max) "ddeclient" t t nil "acroview" "control") (if (= 0 (string-to-int (buffer-string))) t nil))) (defun TeX-run-pdfLaTeX (name command file) "Create a process for NAME using COMMAND to format FILE with pdfLaTeX." ; (acrobat-close-all-docs) (acrobat-close-doc(file)) (TeX-run-LaTeX name command file) ) (add-to-list 'TeX-command-list (list "PDFLaTeX" "pdflatex\ \\nonstopmode\input %s" 'TeX-run-pdfLaTeX nil t)) The problem is that when I run the pdflatex command from auctex, I get: acrobat-close-doc: Symbol's function definition is void: file I'm not very proficient with lisp... Suggestions? TIA Ehud