From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen J. Barr Subject: Re: can I disable LaTeX fragment previews individually? Date: Wed, 07 May 2014 19:02:04 -0700 Message-ID: <8738glc9k3.fsf@mezarim.home> References: <877g5xcirp.fsf@mezarim.home> <87siol5f7w.fsf@alphaville.bos.redhat.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55895) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WiDf3-0005qS-5U for emacs-orgmode@gnu.org; Wed, 07 May 2014 22:02:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WiDex-0008KU-M7 for emacs-orgmode@gnu.org; Wed, 07 May 2014 22:02:13 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:44695) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WiDex-0008Jt-Eu for emacs-orgmode@gnu.org; Wed, 07 May 2014 22:02:07 -0400 In-reply-to: <87siol5f7w.fsf@alphaville.bos.redhat.com> 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: Nick Dokos Cc: emacs-orgmode@gnu.org Thank you for letting me know. This may be a fun project! Nick Dokos writes: > Stephen J. Barr writes: > >> Hello, >> >> I often use org-preview-latex-fragment and sometimes I would like to >> turn the previews on and off on a case-by-case basis. Then I do C-c C-c, >> it turns off all the previews. Is there a way to toggle the preview just >> for the fragment at the point? >> >> > > No built-in way afaict: C-c C-c calls the following function > > ,---- > | (defun org-remove-latex-fragment-image-overlays () > | "Remove all overlays with LaTeX fragment images in current buffer." > | (mapc 'delete-overlay org-latex-fragment-image-overlays) > | (setq org-latex-fragment-image-overlays nil)) > `---- > > which maps delete-overlay over *all* the elements of the > org-latex-fragment-image-overlays list. > > Figuring our which overlay in that list is the one you want to delete > may or may not be easy, but if you knew then you can call > delete-overlay on it. But you'll have to write some lisp. > > Nick -- Sent with my mu4e