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: 12 Dec 2002 14:00:22 -0800 Organization: http://groups.google.com/ Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <55087e56.0212121400.3e1eca96@posting.google.com> References: <55087e56.0212071419.6ff3e90b@posting.google.com> <55087e56.0212101400.726d428@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 1039731745 19545 80.91.224.249 (12 Dec 2002 22:22:25 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 12 Dec 2002 22:22:25 +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 18MbiI-000527-00 for ; Thu, 12 Dec 2002 23:21:50 +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 18MbSb-0007hC-02 for gnu-help-gnu-emacs@m.gmane.org; Thu, 12 Dec 2002 17:05:37 -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: 61 Original-NNTP-Posting-Host: 212.150.101.210 Original-X-Trace: posting.google.com 1039730422 32520 127.0.0.1 (12 Dec 2002 22:00:22 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: 12 Dec 2002 22:00:22 GMT Original-Xref: shelby.stanford.edu gnu.emacs.help:108062 comp.emacs:76401 comp.text.tex:238030 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:4595 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:4595 Jesper Harder wrote in message news:... > ehudre@post.tau.ac.il (Ehud Reshef) writes: > > > Jesper Harder wrote: > >> ehudre@post.tau.ac.il (Ehud Reshef) writes: > >> > >> > I am looking for a way to send to Acrobat, a DDE command from > >> > gnu-Emacs > >> > >> See: > >> > >> > > > > I Tried to follow the lead from there, and create the following (vey > > similar) lisp code: > > You probably want something like this: > > (defun acrobat-close-doc (file) > "Close in Acrobat, using DDE." > (save-excursion > (set-buffer (get-buffer-create " *ddeclient*")) > (erase-buffer) > (insert (concat "[DocClose( " 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)) > > > I'm not very proficient with lisp... > > The problem with you Lisp code is the way you are calling functions. In > Lisp you call the function 'foo' with an argument arg1 like this: > > (foo arg1) > > So instead of > > (acrobat-close-doc(file)) > > you should say: (acrobat-close-doc file) > > [Contrary to popular belief, there are no redundant parens i Lisp :-)] > > *But* I still don't think your version will work. It's been a while > since I used it, but I think the Acrobat DDE interface will only > let you close a *specific* file if you *opened* it through DDE. > > AUC TeX doesn't open files with DDE, so you can't close them that way. > The only easy work-around I could think of at the time was to close all > files in Acrobat, which *is* possible even though they weren't opened > through DDE. You where of course right Now I will try to change View PDF accordingly ...