emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Maik Beckmann <beckmann.maik@googlemail.com>
To: emacs-orgmode@gnu.org
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	[thread overview]
Message-ID: <CAL7baBwyQKOGzu70VYoAYySdwK=AjbDw+B0BtOVfuC3h_BWikg@mail.gmail.com> (raw)

* 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)

             reply	other threads:[~2011-11-10 10:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-10 10:36 Maik Beckmann [this message]
2011-11-10 11:09 ` 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-12 14:08   ` Nicolas Goaziou
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

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAL7baBwyQKOGzu70VYoAYySdwK=AjbDw+B0BtOVfuC3h_BWikg@mail.gmail.com' \
    --to=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 public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).