From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: [Accepted] org-preview-latex-fragment in indirect buffers Date: Fri, 13 May 2011 14:45:08 +0200 (CEST) Message-ID: <20110513124508.2BB8344BC9D@u016822.science.uva.nl> References: <4dc9abe5.61adec0a.2a56.0767@mx.google.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([140.186.70.92]:48704) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QKrjy-00085W-BB for emacs-orgmode@gnu.org; Fri, 13 May 2011 08:45:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QKrjw-0005C0-TC for emacs-orgmode@gnu.org; Fri, 13 May 2011 08:45:10 -0400 Received: from u016822.science.uva.nl ([146.50.39.34]:50396) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QKrjw-0005Bg-Kr for emacs-orgmode@gnu.org; Fri, 13 May 2011 08:45:08 -0400 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Patch 800 (http://patchwork.newartisans.com/patch/800/) is now "Accepted". Maintainer comment: none This relates to the following submission: http://mid.gmane.org/%3C4dc9abe5.61adec0a.2a56.0767%40mx.google.com%3E Here is the original message containing the patch: > Content-Type: text/plain; charset="utf-8" > MIME-Version: 1.0 > Content-Transfer-Encoding: 7bit > Subject: [O] org-preview-latex-fragment in indirect buffers > Date: Wed, 11 May 2011 02:19:29 -0000 > From: Darlan Cavalcante Moreira > X-Patchwork-Id: 800 > Message-Id: <4dc9abe5.61adec0a.2a56.0767@mx.google.com> > To: Orgmode Mailing List , darcamo@gmail.com > > This is a rather small change in org.el. Since I didn't get a response > (even rejected) I suspect this is because I didn't attached a proper patch > so that the patchwork server can get it. > > The patch is attached now. > > --- > Darlan > > diff --git a/lisp/org.el b/lisp/org.el > index acbb261..eb95efa 100644 > --- a/lisp/org.el > +++ b/lisp/org.el > @@ -16151,6 +16151,11 @@ Revert to the normal definition outside of these fragments." > (mapc 'delete-overlay org-latex-fragment-image-overlays) > (setq org-latex-fragment-image-overlays nil)) > > +(defun org-buffer-file-name () > + "Similar to buffer-file-name, but also works on indirect buffers." > + (buffer-file-name (buffer-base-buffer)) > + ) > + > (defun org-preview-latex-fragment (&optional subtree) > "Preview the LaTeX fragment at point, or all locally or globally. > If the cursor is in a LaTeX fragment, create the image and overlay > @@ -16189,7 +16194,7 @@ The images can be removed again with \\[org-ctrl-c-ctrl-c]." > (org-format-latex > (concat "ltxpng/" (file-name-sans-extension > (file-name-nondirectory > - buffer-file-name))) > + (org-buffer-file-name)))) > default-directory 'overlays msg at 'forbuffer 'dvipng) > (message msg "done. Use `C-c C-c' to remove images."))))) > >