emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Rasmus <rasmus@gmx.us>
To: emacs-orgmode@gnu.org
Subject: [BUG] turn-on-org-cdlatex
Date: Fri, 03 Aug 2012 00:38:16 +0100	[thread overview]
Message-ID: <87zk6c6f13.fsf@pank.lan> (raw)


Hi,

It would seem there is a bug in turn-on-org-cdlatex whenever _ or ^ is
called.  And perhaps others. 

To reproduce:

bash> emacs -q 

In *scratch*

#+begin_src emacs-lisp
;; adjust the two following lines to your system
(load-file "/usr/share/emacs/site-lisp/auctex/texmathp.el")
(load-file "~/.emacs.d/elpa/cdlatex-4.0/cdlatex.el")
(require 'cdlatex)
(add-hook 'org-mode-hook 'turn-on-org-cdlatex)
(switch-to-buffer "test.org")
#+end_src
Then
  
  M-x org-mode

#+begin_src org
* test
  insert `$' then `x' then `_' then `1', i.e. $x_1$
#+end_src

I get the following backtrace

Debugger entered--Lisp error: (void-variable last-command-char)
  (char-to-string last-command-char)
  (concat (char-to-string last-command-char) "{")
  (string= (buffer-substring (max (point-min) (- (point) 2)) (point)) (concat (char-to-string last-command-char) "{"))
  (if (string= (buffer-substring (max (point-min) (- (point) 2)) (point)) (concat (char-to-string last-command-char) "{")) (progn (backward-char 1) (insert last-command-char) (forward-char 1)) (insert last-command-char) (insert "{}") (forward-char -1))
  (if (cdlatex-number-of-backslashes-is-odd) (insert last-command-char) (if (not (texmathp)) (cdlatex-dollar)) (if (string= (buffer-substring (max (point-min) (- (point) 2)) (point)) (concat (char-to-string last-command-char) "{")) (progn (backward-char 1) (insert last-command-char) (forward-char 1)) (insert last-command-char) (insert "{}") (forward-char -1)))
  cdlatex-sub-superscript()
  call-interactively(cdlatex-sub-superscript)
  org-cdlatex-underscore-caret(nil)
  call-interactively(org-cdlatex-underscore-caret nil nil)

System: 
GNU Emacs 24.1.50.2 (x86_64-unknown-linux-gnu, GTK+ Version 3.4.4)
 of 2012-08-02 on rasmus

Org-mode version 7.8.11 (release_7.8.11-338-gecba55 @ /usr/share/emacs/site-lisp/org/)

-- 
In theory, practice and theory are the same. In practice they are not

             reply	other threads:[~2012-08-02 23:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-02 23:38 Rasmus [this message]
2012-08-03  7:41 ` [BUG] turn-on-org-cdlatex Bastien
2012-08-20 11:51   ` Dominik, Carsten

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=87zk6c6f13.fsf@pank.lan \
    --to=rasmus@gmx.us \
    --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).