From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Kitchin Subject: proposal to make C-c C-c not remove latex overlays Date: Mon, 14 Jul 2014 18:22:34 -0400 Message-ID: <87wqbf37it.fsf@andrew.cmu.edu> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36226) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X6ohZ-0006mT-3L for emacs-orgmode@gnu.org; Mon, 14 Jul 2014 18:26:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X6ohR-0004MC-K0 for emacs-orgmode@gnu.org; Mon, 14 Jul 2014 18:26:29 -0400 Received: from plane.gmane.org ([80.91.229.3]:52826) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X6ohR-0004Ll-Ck for emacs-orgmode@gnu.org; Mon, 14 Jul 2014 18:26:21 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1X6ohO-0002cu-W8 for emacs-orgmode@gnu.org; Tue, 15 Jul 2014 00:26:19 +0200 Received: from c-24-3-17-30.hsd1.pa.comcast.net ([24.3.17.30]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 15 Jul 2014 00:26:18 +0200 Received: from jkitchin by c-24-3-17-30.hsd1.pa.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 15 Jul 2014 00:26:18 +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 I am using org-mode files with equations and code blocks in lectures, and it is problematic that C-c C-c removes the equation overlays when running a code block. First, you have to press C-c C-c twice to run the block, since the first one gets rid of the equations, but then you have run C-c C-x C-l to get the equations back! and the cycle repeats throughout a lecture. I would prefer that the equations stay untouched, and that the code blocks run without modifying them. I think the best behavior would be for C-c C-x C-l to toggle the equations, and to remove the C-c C-c behavior for latex overlays completely. But it would be ok if this was done by a C-c C-c hook function, so that a user could remove the latex overlay without touching the org-code. Maybe a new function like this: #+BEGIN_SRC emacs-lisp (defun org-toggle-latex-overlays (arg) "Toggle LaTeX fragments." (interactive "P") (if org-latex-fragment-image-overlays (org-remove-latex-fragment-image-overlays) (org-preview-latex-fragment arg))) #+END_SRC could be added. Any thoughts? -- ----------------------------------- John Kitchin Professor