[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: using DDE from gnu-emacs
Re: using DDE from gnu-emacs
Tue, 10 Dec 2002 23:37:59 +0100
Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.3.50 (i686-pc-linux-gnu)
address@hidden (Ehud Reshef) writes:
> Jesper Harder <address@hidden> wrote:
>> address@hidden (Ehud Reshef) writes:
>> > I am looking for a way to send to Acrobat, a DDE command from
>> > gnu-Emacs
> 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."
(set-buffer (get-buffer-create " *ddeclient*"))
(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
(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:
So instead of
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
>From address@hidden Tue Dec 10 18:10:18 2002
From: Bjoern <address@hidden>
Date: Wed, 11 Dec 2002 00:13:48 +0100
Content-Type: text/plain; charset=us-ascii; format=flowed
X-Trace: fu-berlin.de 1039561786 33991919 220.127.116.11 (16 )
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US;
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu gnu.emacs.help:107977
Subject: Re: xml indenting, possibly with psgml?
List-Id: Users list for the GNU Emacs text editor <help-gnu-emacs.gnu.org>
X-List-Received-Date: Tue, 10 Dec 2002 23:10:18 -0000
Jim Crossley wrote:
> Bjoern <address@hidden> writes:
>>I can't figure out how to make psgml indent my xml-files. It just
>>doesn't do anything when I press 'tab' or do 'indent-region'.
> M-x customize-variable RET sgml-indent-data
Hm, my emacs doesn't seem to know that variable :-(
>>I also get an error message because it doesn't find the dtd, can't I
>>get rid of that. I guess I really only need indenting and possibly
> You'll only get that error once (the first time it attempts to
> parse). You can live with it (and still derive benefit from
> indentation, etc) or you can create a local CATALOG file that contains
> the DTD references you commonly use. I highly recommend this article:
The problem is that there isn't really a DTD for ant build.xml files.
ALthough I think there now is a target to create one from a build file,
but I am not sure if it's practical if it's constantly changing.