From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anders Johansson Subject: Re: Bug: Problems with sub/super-script when using: org-cdlatex + org-pretty-entities + org-catch-invisible-edits Date: Sun, 23 Feb 2014 16:20:04 +0100 Message-ID: <530A11A4.1070608@gmail.com> References: <5309DA59.3070905@gmail.com> <5309E086.8030505@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35081) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WHaqo-0003cp-Bx for emacs-orgmode@gnu.org; Sun, 23 Feb 2014 10:20:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WHaqf-0006QD-P0 for emacs-orgmode@gnu.org; Sun, 23 Feb 2014 10:20:18 -0500 Received: from mail-la0-x22d.google.com ([2a00:1450:4010:c03::22d]:39000) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WHaqf-0006Pn-GO for emacs-orgmode@gnu.org; Sun, 23 Feb 2014 10:20:09 -0500 Received: by mail-la0-f45.google.com with SMTP id b8so4430984lan.32 for ; Sun, 23 Feb 2014 07:20:08 -0800 (PST) Received: from [130.238.77.138] (pc138.kvk.uu.se. [130.238.77.138]) by mx.google.com with ESMTPSA id pz10sm15215993lbb.10.2014.02.23.07.20.06 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 23 Feb 2014 07:20:07 -0800 (PST) In-Reply-To: <5309E086.8030505@gmail.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: emacs-orgmode@gnu.org >> Hi, >> I used the configuration: >> >> org-catch-invisible-edits 'show >> org-pretty-entities t >> >> together with org-cdlatex. This breaks the insertion of subscripts >> and superscripts through org-cdlatex because _{} is fontified and the >> {} are hidden so typing for example: "a _ bc" results in "a_{b}c" (or >> sometimes "a_bc", but should be "a_{bc}") and gives the message >> "Unfolding invisible region around point before editing". >> >> Setting org-catch-invisible-edits to nil let's cdlatex do it's work >> so I guess an easy solution would be to "let" that in >> org-cdlatex-underscore-caret. >> > Hi, > I realized that my solution won't work since > "org-check-before-invisible-edit" does it's work after > "org-cdlatex-underscore-caret" has called "cdlatex-sub-superscript" > and inserted "_{}". > > Maybe then org-catch-invisible-edits should be nil all the time in > org-cdlatex-mode? But this would be unexpected. Maybe this can be > treated as a special case in "org-check-before-invisible-edit" in some > way? > Digging into it some more it's actually the "pretty entities" folding which is the problem, regardless of org-check-before-invisible-edit. The cursor jumps out of the {}-brackets after the first character, when the hiding/folding is done. I have no idea what should be done about this. Cheers, Anders Johansson