>> On Mon, 30 Jan 2012 12:25:13 +0100, Antoine Levitt 
>> <antoine.lev...@gmail.com> wrote:

   >> 
   >> Uwe Brauer 

   > (ccing gnus mailing list, in case someone is interested)

   > I ran into that the other day.

   > I think it would be very useful to have preview-buffer work
   > on non-latex buffers.

Concerning org-preview-latex-fragment: I have some code
which indeed attaches the png generated by this
function. However it is very primitive. 

org-preview-latex-fragment generates pngs in a subdirectory
called ltxpng. These pngs are then inserted  in
the buffer where org-preview-latex-fragment was executed. Since
one cannot be sure that the ltxpng  directory is non-empty, IMHO it
should be deleted before generating the png.

This is done by function 
my-delete-ltxpngdir, which needs the trashcan pkg.

Then a very simple modification of an already existing
function does the rest:
message-attach-all-png-from-ltxpngfolder.

I attach it if you want to test it.

Uwe Brauer 

Attachment: my-preview-mml-send-png.el
Description: application/emacs-lisp

Reply via email to