emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Uwe Brauer <oub@mat.ucm.es>
To: auctex-devel@gnu.org
Cc: emacs-orgmode@gnu.org, ding@gnus.org
Subject: a kludge (was: org-preview-latex-fragment and preview-copy-region-as-mml)
Date: Mon, 30 Jan 2012 19:23:42 +0100	[thread overview]
Message-ID: <87pqe1nj69.fsf_-_@gilgamesch.quim.ucm.es> (raw)
In-Reply-To: <87ipjtv3dy.fsf@gmail.com> (Antoine Levitt's message of "Mon, 30 Jan 2012 12:25:13 +0100")

[-- Attachment #1: Type: text/plain, Size: 990 bytes --]

>> On Mon, 30 Jan 2012 12:25:13 +0100, Antoine Levitt <antoine.levitt@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 #2: my-preview-mml-send-png.el --]
[-- Type: application/emacs-lisp, Size: 3158 bytes --]

[-- Attachment #3: Type: text/plain, Size: 147 bytes --]

_______________________________________________
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel

      reply	other threads:[~2012-01-30 18:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-30 10:49 org-preview-latex-fragment and preview-copy-region-as-mml Uwe Brauer
2012-01-30 11:25 ` Antoine Levitt
2012-01-30 18:23   ` Uwe Brauer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87pqe1nj69.fsf_-_@gilgamesch.quim.ucm.es \
    --to=oub@mat.ucm.es \
    --cc=auctex-devel@gnu.org \
    --cc=ding@gnus.org \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).