From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Charles C. Berry" Subject: Re: Wrong type argument: characterp, 134217782 (??) Date: Sat, 23 Jan 2016 20:57:20 -0800 Message-ID: References: <1668140346.3197331453556191611.JavaMail.httpd@webmail-19.iol.local> <87twm4owmx.fsf@ucl.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56800) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aNCjv-0000oJ-5H for emacs-orgmode@gnu.org; Sat, 23 Jan 2016 23:57:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aNCjr-0002g5-VZ for emacs-orgmode@gnu.org; Sat, 23 Jan 2016 23:57:27 -0500 Received: from iport-acv5-out.ucsd.edu ([132.239.0.10]:59086) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aNCjr-0002g1-Kq for emacs-orgmode@gnu.org; Sat, 23 Jan 2016 23:57:23 -0500 In-Reply-To: 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: Eric S Fraga Cc: emacs-orgmode@gnu.org On Sat, 23 Jan 2016, Charles C. Berry wrote: > On Sat, 23 Jan 2016, Eric S Fraga wrote: > >> On Saturday, 23 Jan 2016 at 14:36, vendo.libri@libero.it wrote: >> >> [...] >> >>> Then I discovered that the backquote symbol was not >>> recognized. Everytime I press it, I get the 'Wrong type argument: >>> characterp, 134217782' message in the mini-buffer. >> >> Maybe try >> >> M-x toggle-debug-on-error >> >> and see where that error is arising to see if that gives us a hint as to >> what may be wrong. I am not sure if the cdlatex code you downloaded has >> been updated for later versions of emacs... > > > Funny, I get `apply: Wrong type argument: characterp, 134217785' > > (not `134217782'), which is what M-9 is recognized as: > > #+BEGIN_SRC emacs-lisp > (read-char) ; type C-c C-c y M-9 *here* > #+END_SRC > > #+RESULTS: > : 134217785 > > on my MacBook and that makes some sense as cdlatex.el uses `(read-char)' once > it is triggered by a back tic. And I guess that `read-char' is immune to > keymapping for good reason. > > For the record, this happens with > > #+BEGIN_SRC elisp > (define-key key-translation-map (kbd "M-9") (kbd "`")) > #+END_SRC > > > set in org-cdlatex-mode when the first back tic (or M-9) is followed by a M-9 > and it also happens for other key events that do not map to characters like > `C-S-s' after the back tic. > > So the easiest fix is *don't do that*. > > I suppose this counts as a bug in cdlatex, but it seems easy enough to work > around. Just to be clear on what such a workaround would amount to: With M-9 defined as above, customize `cdlatex-math-symbol-prefix' to any of the unused symbols. Suppose it is ':'. Then in a buffer in which org-cdlatex-mode is operative, M-9 : : : : ... cycles thru the different levels until the user selects another letter/symbol in the menu. HTH, Chuck