4

I already asked this question on the AUCTeX mailing list via Gmane but can't find the question in the mailing list's archive. Therefore I ask here, too.

Since I'm writing a document with many weird named figures I searched for "auctex drag and drop" and found Michal Sojka's posting: <878vzs8ppj.fsf@steelpick.2x.cz>. Dieter Jurzitza created a patch to tex.el that "will not work 'out of the box'". I tried to apply the patch to tex.el. But it failed. I copied Michal's code to both tex.el and later ~/.emacs and added (add-hook 'LaTeX-mode-hook 'auctex-dnd-mode) to ~/.emacs; didn't work.

Output of Messages buffer:


Source file `/usr/local/share/emacs/site-lisp/auctex/tex.el' newer than byte-compiled file

Automatic display of crossref information was turned on Applying style hooks... 

Loading /home/[...] 

Unable to load color "(:line-width 1 :style release-button)" [2 times] 

Loading /home/[...] Loading /usr/local/share/emacs/site-lisp/auctex/style/graphicx.elc...done 

[...] 

Applying style hooks... done Type C-c C-c to view the image as text.

What do I need to do to get Michal's code to work? I have no programming skills ...

I use Emacs 23.3.1 on Ubuntu 11.10 with the latest AUCTeX version (11.86).

[Update:] With the help of Dieter I solved the problem. He sent me a tex.el with Michal's code that I had to byte-compile in Emacs.

typokurz
  • 1,047
  • Welcome to TeX.sx! Could you please describe in more detail how you used the code and how it failed. – N.N. Feb 10 '12 at 18:20
  • I added the code to tex.el, added (add-hook 'LaTeX-mode-hook 'auctex-dnd-mode) to ~/.emacs, restartet Emacs and dragged and dropped a JPEG file to a TeX buffer—then the JPEG file was shown in a new buffer, but the .tex-file was not changed. – typokurz Feb 10 '12 at 20:03
  • Any messages in *Messages* when you did that? – N.N. Feb 10 '12 at 20:07
  • Source file `/usr/local/share/emacs/site-lisp/auctex/tex.el' newer than byte-compiled file

    Automatic display of crossref information was turned on Applying style hooks...

    Loading /home/[...]

    Unable to load color "(:line-width 1 :style release-button)" [2 times]

    Loading /home/[...]

    Loading /usr/local/share/emacs/site-lisp/auctex/style/graphicx.elc...done

    [...]

    Applying style hooks... done

    Type C-c C-c to view the image as text.

    – typokurz Feb 11 '12 at 10:35
  • Please edit your question to include new information rather than posting it as comments. – N.N. Feb 11 '12 at 10:39
  • @typokurz: Welcome from me as well! Glad to see you here, I'm a big fan of typokurz. – doncherry Feb 11 '12 at 12:19
  • We'd like to keep answers separate from questions, so you should write a separate answer instead of editing your answer into the question. (BTW, typokurz is very nice!) – lockstep Feb 12 '12 at 18:16

1 Answers1

2

It is working on my Emacs! Try enabling the minor mode manually: M-x auctex-dnd-mode

diabonas
  • 25,784
thisirs
  • 21