all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* using DDE from gnu-emacs
@ 2002-12-07 22:19 Ehud Reshef
  2002-12-07 23:04 ` Jesper Harder
  0 siblings, 1 reply; 7+ messages in thread
From: Ehud Reshef @ 2002-12-07 22:19 UTC (permalink / raw)


Although this looks like a FAQ to me, I could not find it...

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
(not Xemacs).

Did I miss something, or is it supported only from Xemacs ?

TIA
Ehud

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: using DDE from gnu-emacs
  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-10 22:00   ` Ehud Reshef
  0 siblings, 2 replies; 7+ messages in thread
From: Jesper Harder @ 2002-12-07 23:04 UTC (permalink / raw)


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:

<http://groups.google.com/groups?threadm=wkd778pgoh.fsf%40try.harder.Invalid&rnum=3>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: using DDE from gnu-emacs
  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
  1 sibling, 1 reply; 7+ messages in thread
From: Ehud Reshef @ 2002-12-08 11:47 UTC (permalink / raw)


Jesper Harder wrote:
> 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:
> 
> <http://groups.google.com/groups?threadm=wkd778pgoh.fsf%40try.harder.Invalid&rnum=3>

Thanks
I'll try to modify that to as per TeXnicCenter (unless there is 
something proven...)
Ehud

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: using DDE from gnu-emacs
  2002-12-08 11:47   ` Ehud Reshef
@ 2002-12-08 12:18     ` Hans Fr. Nordhaug
  0 siblings, 0 replies; 7+ messages in thread
From: Hans Fr. Nordhaug @ 2002-12-08 12:18 UTC (permalink / raw)


Ehud Reshef <ehud.reshef@comsysmobile.com> writes:

> Jesper Harder wrote:
> > 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:
> > <http://groups.google.com/groups?threadm=wkd778pgoh.fsf%40try.harder.Invalid&rnum=3>
> 
> Thanks
> I'll try to modify that to as per TeXnicCenter (unless there is
> something proven...)

No, no. TeXnicCenter already *does* use DDE - at least in the current
version (and it works like a charm). Read the FAQ (and help pages
pointed to):

 http://www.toolscenter.org/products/texniccenter/faq.htm#cat5_0

Hans

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: using DDE from gnu-emacs
  2002-12-07 23:04 ` Jesper Harder
  2002-12-08 11:47   ` Ehud Reshef
@ 2002-12-10 22:00   ` Ehud Reshef
  2002-12-11 10:17     ` Kai Großjohann
       [not found]     ` <m31y4po5yw.fsf@defun.localdomain>
  1 sibling, 2 replies; 7+ messages in thread
From: Ehud Reshef @ 2002-12-10 22:00 UTC (permalink / raw)


Jesper Harder <harder@myrealbox.com> wrote in message news:<m33cp977n2.fsf@defun.localdomain>...
> 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:
> 
> <http://groups.google.com/groups?threadm=wkd778pgoh.fsf%40try.harder.Invalid&rnum=3>

Thanks
I Tried to follow the lead from there, and create the following (vey
similar) lisp code:

(defun acrobat-close-doc (file)
  "Close <file> 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: using DDE from gnu-emacs
  2002-12-10 22:00   ` Ehud Reshef
@ 2002-12-11 10:17     ` Kai Großjohann
       [not found]     ` <m31y4po5yw.fsf@defun.localdomain>
  1 sibling, 0 replies; 7+ messages in thread
From: Kai Großjohann @ 2002-12-11 10:17 UTC (permalink / raw)


ehudre@post.tau.ac.il (Ehud Reshef) writes:

>   (acrobat-close-doc(file))

(acrobat-close-doc file)

-- 
~/.signature is: umop ap!sdn    (Frank Nobis)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: using DDE from gnu-emacs
       [not found]     ` <m31y4po5yw.fsf@defun.localdomain>
@ 2002-12-12 22:00       ` Ehud Reshef
  0 siblings, 0 replies; 7+ messages in thread
From: Ehud Reshef @ 2002-12-12 22:00 UTC (permalink / raw)


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 ...

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2002-12-12 22:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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

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.