all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: ehudre@post.tau.ac.il (Ehud Reshef)
Subject: Re: using DDE from gnu-emacs
Date: 12 Dec 2002 14:00:22 -0800	[thread overview]
Message-ID: <55087e56.0212121400.3e1eca96@posting.google.com> (raw)
In-Reply-To: m31y4po5yw.fsf@defun.localdomain

Jesper Harder <harder@myrealbox.com> wrote in message news:<m31y4po5yw.fsf@defun.localdomain>...
> ehudre@post.tau.ac.il (Ehud Reshef) writes:
> 
> > Jesper Harder <harder@myrealbox.com> 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:
> >> 
> >> <http://groups.google.com/groups?threadm=wkd778pgoh.fsf%40try.harder.Invalid&rnum=3>
> >
> > 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 <file> 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 ...

      parent reply	other threads:[~2002-12-12 22:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-07 22:19 using DDE from gnu-emacs Ehud Reshef
2002-12-07 23:04 ` Jesper Harder
2002-12-08 11:47   ` Ehud Reshef
2002-12-08 12:18     ` Hans Fr. Nordhaug
2002-12-10 22:00   ` Ehud Reshef
2002-12-11 10:17     ` Kai Großjohann
     [not found]     ` <m31y4po5yw.fsf@defun.localdomain>
2002-12-12 22:00       ` Ehud Reshef [this message]

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=55087e56.0212121400.3e1eca96@posting.google.com \
    --to=ehudre@post.tau.ac.il \
    /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.