emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [BUG] turn-on-org-cdlatex
@ 2012-08-02 23:38 Rasmus
  2012-08-03  7:41 ` Bastien
  0 siblings, 1 reply; 3+ messages in thread
From: Rasmus @ 2012-08-02 23:38 UTC (permalink / raw)
  To: emacs-orgmode


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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [BUG] turn-on-org-cdlatex
  2012-08-02 23:38 [BUG] turn-on-org-cdlatex Rasmus
@ 2012-08-03  7:41 ` Bastien
  2012-08-20 11:51   ` Dominik, Carsten
  0 siblings, 1 reply; 3+ messages in thread
From: Bastien @ 2012-08-03  7:41 UTC (permalink / raw)
  To: Rasmus; +Cc: emacs-orgmode, Carsten Dominik

Hi Rasmus,

Rasmus <rasmus@gmx.us> writes:

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

This is a problem in cdlatex.el.

You need to replace `last-command-char' by `last-command-event'.

I'm copying Carsten so that he can take the fix upstream.

HTH,

-- 
 Bastien

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [BUG] turn-on-org-cdlatex
  2012-08-03  7:41 ` Bastien
@ 2012-08-20 11:51   ` Dominik, Carsten
  0 siblings, 0 replies; 3+ messages in thread
From: Dominik, Carsten @ 2012-08-20 11:51 UTC (permalink / raw)
  To: Bastien; +Cc: <emacs-orgmode@gnu.org>, Dominik, Carsten, Rasmus

Updated, thanks.

- Carsten

On 3.8.2012, at 09:41, Bastien wrote:

> Hi Rasmus,
> 
> Rasmus <rasmus@gmx.us> writes:
> 
>> It would seem there is a bug in turn-on-org-cdlatex whenever _ or ^ is
>> called.  And perhaps others. 
> 
> This is a problem in cdlatex.el.
> 
> You need to replace `last-command-char' by `last-command-event'.
> 
> I'm copying Carsten so that he can take the fix upstream.
> 
> HTH,
> 
> -- 
> Bastien

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-08-20 12:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-02 23:38 [BUG] turn-on-org-cdlatex Rasmus
2012-08-03  7:41 ` Bastien
2012-08-20 11:51   ` Dominik, Carsten

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