From: Nicolas Goaziou <n.goaziou@gmail.com>
To: Maik Beckmann <beckmann.maik@googlemail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Bug: cdlatex-tab in math-env isn't considered when inside of a list item. [7.7 (release_7.7.513.g2a5877)]
Date: Sat, 12 Nov 2011 15:08:04 +0100 [thread overview]
Message-ID: <87fwhtv3gb.fsf@gmail.com> (raw)
In-Reply-To: <CAL7baBxvABPDFvKLcfATFBhq0EK4MwxpZFUDJ7JsZn4FWyW_5Q@mail.gmail.com> (Maik Beckmann's message of "Thu, 10 Nov 2011 12:09:23 +0100")
[-- Attachment #1: Type: text/plain, Size: 358 bytes --]
Hello,
Maik Beckmann <beckmann.maik@googlemail.com> writes:
> The attached patch what works for me.
Your patch prevents cdlatex expansion for LaTeX environments, since
point must be in a LaTeX fragment to trigger `cdlatex-tab'.
I've slightly modified your patch to repair that. Could you test it and
report back the result?
Thanks,
--
Nicolas Goaziou
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: patch for cdlatex expansion at an item --]
[-- Type: text/x-patch, Size: 1649 bytes --]
From fed598af22ac0ecb29285c02d0a10a5af7d91fef Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou <n.goaziou@gmail.com>
Date: Sat, 12 Nov 2011 15:04:19 +0100
Subject: [PATCH] Allow cdlatex expansions at a list item
* lisp/org.el (org-try-cdlatex-tab): Don't try to expand a LaTeX
environment when at an item.
(org-cycle): Try to call `cdlatex-tab' before cycling item's
visibility, in order to catch LaTeX fragments at an item.
This patch is a slightly modified version of Maik Beckmann's work.
---
lisp/org.el | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/lisp/org.el b/lisp/org.el
index 9f5754d..0eb458f 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -6144,6 +6144,8 @@ in special contexts.
(or (bolp) (not (eq org-cycle-emulate-tab 'exc-hl-bol))))
(org-inlinetask-toggle-visibility))
+ ((org-try-cdlatex-tab))
+
;; At an item/headline: delegate to `org-cycle-internal-local'.
((and (or (and org-cycle-include-plain-lists (org-at-item-p))
(save-excursion (beginning-of-line 1)
@@ -6159,8 +6161,6 @@ in special contexts.
((org-try-structure-completion))
- ((org-try-cdlatex-tab))
-
((run-hook-with-args-until-success
'org-tab-before-tab-emulation-hook))
@@ -16566,7 +16566,8 @@ It makes sense to do so if `org-cdlatex-mode' is active and if the cursor is
((save-excursion
(skip-chars-backward "a-zA-Z0-9*")
(skip-chars-backward " \t")
- (bolp))
+ ;; An environment cannot be started at an item bullet.
+ (and (bolp) (not (org-at-item-p))))
(cdlatex-tab) t)
((org-inside-LaTeX-fragment-p)
(cdlatex-tab) t)
--
1.7.7.3
next prev parent reply other threads:[~2011-11-12 14:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-10 10:36 Bug: cdlatex-tab in math-env isn't considered when inside of a list item. [7.7 (release_7.7.513.g2a5877)] Maik Beckmann
2011-11-10 11:09 ` Maik Beckmann
2011-11-12 14:08 ` Nicolas Goaziou [this message]
2011-11-13 7:20 ` Maik Beckmann
2011-11-13 9:40 ` Nicolas Goaziou
2011-11-13 10:45 ` Maik Beckmann
2011-11-13 11:34 ` Maik Beckmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87fwhtv3gb.fsf@gmail.com \
--to=n.goaziou@gmail.com \
--cc=beckmann.maik@googlemail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.