From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sebastian Hofer Subject: Re: preview latex fragment from source code buffer Date: Mon, 04 Mar 2013 20:40:24 +0100 Message-ID: <87ip57rm1j.wl%sebastian.hofer@univie.ac.at> References: <87k3pnrrc3.wl%sebastian.hofer@univie.ac.at> <87boazc7rt.fsf@bzg.ath.cx> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Return-path: Received: from eggs.gnu.org ([208.118.235.92]:54012) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UCbFP-0000Cb-3L for emacs-orgmode@gnu.org; Mon, 04 Mar 2013 14:40:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UCbFL-0008Kk-7e for emacs-orgmode@gnu.org; Mon, 04 Mar 2013 14:40:31 -0500 Received: from mail-bk0-f49.google.com ([209.85.214.49]:43737) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UCbFL-0008KT-1Y for emacs-orgmode@gnu.org; Mon, 04 Mar 2013 14:40:27 -0500 Received: by mail-bk0-f49.google.com with SMTP id w11so2593578bku.8 for ; Mon, 04 Mar 2013 11:40:26 -0800 (PST) In-Reply-To: <87boazc7rt.fsf@bzg.ath.cx> 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: Bastien Cc: Sebastian Hofer , emacs-orgmode@gnu.org At Mon, 04 Mar 2013 19:57:42 +0100, Bastien wrote: > > Hi Sebastian, > > Sebastian Hofer writes: > > > I missed the functionality to preview a latex fragment directly from > > the latex source buffer. Fortunately this functionality is trivial to > > add. I've been using it for a while now and find it very convenient, > > so I suggest adding it to org. > > > > #+BEGIN_SRC > > (define-key org-src-mode-map "\C-c\C-x\C-l" 'org-edit-preview-latex-fragment) > > > > (defun org-edit-preview-latex-fragment () > > "Write latex fragment from source to parent buffer and preview it." > > (interactive) > > (org-src-in-org-buffer (org-preview-latex-fragment))) > > #+END_SRC > > I added an entry in Org hacks: > http://orgmode.org/worg/org-hacks.html#sec-1-11-1 > > I don't think it should be in core, as it is a small conveniency > that can be surprising -- the user could expect the preview to > happen in the src buffer, while it happens in the Org buffer... > also, adding more keybinding like this may raise the issue of > conflicting keybinding with the current src buffer mode. > > Thanks for sharing this! Okay, thanks for adding it to worg! Sebastian