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: <[email protected]>. 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.

7
  • Welcome to TeX.sx! Could you please describe in more detail how you used the code and how it failed.
    – N.N.
    Commented Feb 10, 2012 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
    Commented Feb 10, 2012 at 20:03
  • Any messages in *Messages* when you did that?
    – N.N.
    Commented Feb 10, 2012 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
    Commented Feb 11, 2012 at 10:35
  • Please edit your question to include new information rather than posting it as comments.
    – N.N.
    Commented Feb 11, 2012 at 10:39

1 Answer 1

2

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .