Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
    
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
show 2 more comments

1 Answer

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.