From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: can I disable LaTeX fragment previews individually? Date: Wed, 07 May 2014 19:41:39 -0400 Message-ID: <87siol5f7w.fsf@alphaville.bos.redhat.com> References: <877g5xcirp.fsf@mezarim.home> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47912) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WiBTT-0004vG-44 for emacs-orgmode@gnu.org; Wed, 07 May 2014 19:42:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WiBTJ-0007lg-FB for emacs-orgmode@gnu.org; Wed, 07 May 2014 19:42:07 -0400 Received: from plane.gmane.org ([80.91.229.3]:48415) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WiBTJ-0007ke-1n for emacs-orgmode@gnu.org; Wed, 07 May 2014 19:41:57 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WiBTI-0002RA-4k for emacs-orgmode@gnu.org; Thu, 08 May 2014 01:41:56 +0200 Received: from nat-pool-bos-t.redhat.com ([66.187.233.206]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 08 May 2014 01:41:56 +0200 Received: from ndokos by nat-pool-bos-t.redhat.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 08 May 2014 01:41:56 +0200 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 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