From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maik Beckmann Subject: Bug: cdlatex-tab in math-env isn't considered when inside of a list item. [7.7 (release_7.7.513.g2a5877)] Date: Thu, 10 Nov 2011 11:36:14 +0100 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([140.186.70.92]:58714) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RORzZ-0001cK-4G for emacs-orgmode@gnu.org; Thu, 10 Nov 2011 05:36:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RORzU-0008VJ-SI for emacs-orgmode@gnu.org; Thu, 10 Nov 2011 05:36:21 -0500 Received: from mail-qy0-f169.google.com ([209.85.216.169]:56016) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RORzU-0008V5-PA for emacs-orgmode@gnu.org; Thu, 10 Nov 2011 05:36:16 -0500 Received: by qyk31 with SMTP id 31so6653636qyk.0 for ; Thu, 10 Nov 2011 02:36:15 -0800 (PST) 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 * The observed behavior Inside a list item cdlatex-tab isn't considered. An example: To circumvent emacs' fill-paragrah issue with \[ \] I prefer using a inline math environment in a single item list. Unfortunately cdlatex isn't considered when hitting TAB then - $y = a_0 + a_{1[TAB]}$ . Emacs echos "EMPTY ENTRY" instead. The same line without the leading list item qualifier works fine. This line $y = a_0 + a_{1[TAB]}$ results in $y = a_0 + a_1$ . * The reason In org.el in org-cycle a `cond' statement dispatches is done when TAB is pressed. The call to `org-try-cdlatex-tab' is part of this dispatch. Before `cond' reaches this entry it reaches the one which determines whether or not the current context is a list item. Since this is true here, `cond' is satified and never considers `org-try-cdlatex-tab'. The entry calls `org-cycle-internal-local' which then emits the "EMPTY ENTRY" message. * What I expected Lets considering the case that there is a sub-item. - $y = a_0 + a_{1}$ + foo I expect cdlatex-tab to be tried first. If it's nothing cdlatex can reason about, expand/collapse the list. For - $y = a_0 + a_{1[TAB]}$ + foo turns into - $y = a_0 + a_1$ + foo Another TAB - $y = a_0 + a_1[TAB]$ + foo turns it into - $y = a_0 + a_1$... * Org mode version info Emacs : GNU Emacs 24.0.91.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.7) of 2011-11-04 on myhost Package: Org-mode version 7.7 (release_7.7.513.g2a5877)