[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Wrong type argument: characterp, 134217782 (??)

From: address@hidden
Subject: Re: [O] Wrong type argument: characterp, 134217782 (??)
Date: Mon, 25 Jan 2016 21:41:07 +0100 (CET)

Thank you for addressing my issue with backquote and CDLaTeX.

>From your explanation I gather my problem just split in two.

1. Remap an alternative key to type ` (backquote or back-tick, as you prefer), 
possibly a key that CDLaTeX understands so it allows me to enter the "math 
symbols menu". There's no work-around here, it's only backquote that grants the 
access to said menu.

2. Choose an alternative character that lets me cycle through the 3 levels of 
the math symbols menu. This is done by modifying the "cdlatex-math-symbol-

I've managed to solve problem n.2, i.e. instead of backquote I now have '@' to 
cycle through the menu. I did this with the command "M-x customize-option RET" 
followed by "cdlatex-math-symbol-prefix", changing to '@' and saving everything 
into my .emacs file for future sessions.

Problem n.2 appears a little bit more complicated to me, since the remapping 
that you cite was done for me by other emacs expert users. Nevertheless here's 
my attempt:

    ;;; a key for backquote symbol
    (define-key key-translation-map (kbd "M-6") "")
    (define-key key-translation-map (kbd "M-9") (kbd "`"))
    ;;;this one's only for CDLaTeX math insertion
    (define-key key-translation-map (kbd "C-1") (kbd "`")) 

I press Ctrl and 1 together and that's equivalent to backquote. This solution 
works and solves problem n.1 too allowing me to enter the math symbols menu. 
However I was wondering if there's a way to remap backquote so that the minor 
mode CDLatex doesn't override Org-mode's keymap, specifically its mapping of 
the backquote character. 

I've read the "Mastering Key Bindings in emacs" article on www.masteringemacs.
org (link: https://www.masteringemacs.org/article/mastering-key-bindings-emacs) 
and there seems to be a keymap called "minor-mode-map-alist". Can it be used to 
"talk" to CDLaTeX? Something like "(define-key minor-mode-map-alist (kbd "M-9") 
(kbd "`")) " perhaps? I'm not sure how to write this remapping command and I 
don't want to break emacs' configuration. Can you give me some pointers?

Thank you again for taking the time to get into this hairy business.

>----Messaggio originale----
>Da: Charles C. Berry <address@hidden>
>Data: 25-gen-2016 5.54
>A: "address@hidden"<address@hidden>
>Cc: <address@hidden>
>Ogg: Re: Wrong type argument: characterp, 134217782 (??)
>On Sun, 24 Jan 2016, address@hidden wrote:
>> Ok, so if I want to use this character '•' (a bullet mark) to trigger math
>> expression, what should I write in my .emacs file regarding the `cdlatex-
>> symbol-prefix' variable?
>The bullet is not a *character* per se in emacs.
>So you cannot do that.
>The left quote (back tic) is used to trigger math symbol selection. You 
>cannot easily change that, but you can remap a key as you did for M-9 and 
>that will allow you to enter the selection menus. But you cannot use that 
>character (M-9) to change levels. You can customize 
>`cdlatex-math-symbol-prefix' to set a symbol for that purpose.
>(Please help me out, I know nothing about how to write
>> elisp).
>Elisp is not needed.
>You need to use the customize interface. See
>       (info "(emacs) Customization Groups")
>Briefly, type
>M-x customize RET
>Then type `cdlatex-math' in the search box and click `search'.
>Then click on the mark left of Cdlatex Math Symbol Prefix, delete the '`' 
>and type in the character you want to traverse levels in the math symbo 
>menus. Then change the state. `Save for Future Sessions' will modify your 
>.emacs for you.
>> Since you mention this might be a bug with CDLaTeX, I'd like to add that
>> pressing TAB after '-' (dash) in an itemize environment doesn't put 
'\item'. I
>> believe it's an empty command.
>It works fine for me. Be sure you have org-cdlatex-mode enabled and that 
>you really are in a suitable environment. If you see messages like
>       if: No open environment at point.
>       if: No item defined for abc environment.
>in the *Messages* buffer, you have erred.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]