From mboxrd@z Thu Jan 1 00:00:00 1970 From: "vendo.libri@libero.it" Subject: Re: Wrong type argument: characterp, 134217782 (??) Date: Mon, 25 Jan 2016 21:41:07 +0100 (CET) Message-ID: <633456309.3740561453754467589.JavaMail.httpd@webmail-19.iol.local> Reply-To: "vendo.libri@libero.it" Mime-Version: 1.0 Content-Type: text/plain;charset="UTF-8" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40408) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aNnwm-000874-OM for emacs-orgmode@gnu.org; Mon, 25 Jan 2016 15:41:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aNnwj-0005A8-GC for emacs-orgmode@gnu.org; Mon, 25 Jan 2016 15:41:12 -0500 Received: from smtp-35.italiaonline.it ([212.48.25.163]:50238 helo=libero.it) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aNnwj-00059V-5Y for emacs-orgmode@gnu.org; Mon, 25 Jan 2016 15:41:09 -0500 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: emacs-orgmode@gnu.org Chuck,=20 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 prefe= r),=20 possibly a key that CDLaTeX understands so it allows me to enter the "math= =20 symbols menu". There's no work-around here, it's only backquote that grants= the=20 access to said menu. 2. Choose an alternative character that lets me cycle through the 3 levels = of=20 the math symbols menu. This is done by modifying the "cdlatex-math-symbol- prefix". I've managed to solve problem n.2, i.e. instead of backquote I now have '@'= to=20 cycle through the menu. I did this with the command "M-x customize-option R= ET"=20 followed by "cdlatex-math-symbol-prefix", changing to '@' and saving everyt= hing=20 into my .emacs file for future sessions. Problem n.2 appears a little bit more complicated to me, since the remappin= g=20 that you cite was done for me by other emacs expert users. Nevertheless her= e's=20 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 "`"))=20 I press Ctrl and 1 together and that's equivalent to backquote. This soluti= on=20 works and solves problem n.1 too allowing me to enter the math symbols menu= .=20 However I was wondering if there's a way to remap backquote so that the min= or=20 mode CDLatex doesn't override Org-mode's keymap, specifically its mapping o= f=20 the backquote character.=20 I've read the "Mastering Key Bindings in emacs" article on www.masteringema= cs. org (link: https://www.masteringemacs.org/article/mastering-key-bindings-em= acs)=20 and there seems to be a keymap called "minor-mode-map-alist". Can it be use= d to=20 "talk" to CDLaTeX? Something like "(define-key minor-mode-map-alist (kbd "M= -9")=20 (kbd "`")) " perhaps? I'm not sure how to write this remapping command and = I=20 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 >Data: 25-gen-2016 5.54 >A: "vendo.libri@libero.it" >Cc: >Ogg: Re: Wrong type argument: characterp, 134217782 (??) > >On Sun, 24 Jan 2016, vendo.libri@libero.it wrote: > >> Ok, so if I want to use this character '=E2=80=A2' (a bullet mark) to tr= igger math >> expression, what should I write in my .emacs file regarding the `cdlatex= - math- >> 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=20 >cannot easily change that, but you can remap a key as you did for M-9 and= =20 >that will allow you to enter the selection menus. But you cannot use that= =20 >character (M-9) to change levels. You can customize=20 >`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 > > =09(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 '`'= =20 >and type in the character you want to traverse levels in the math symbo=20 >menus. Then change the state. `Save for Future Sessions' will modify your= =20 >.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=20 '\item'. I >> believe it's an empty command. >> > >It works fine for me. Be sure you have org-cdlatex-mode enabled and that= =20 >you really are in a suitable environment. If you see messages like > > =09if: No open environment at point. >or > =09if: No item defined for abc environment. > >in the *Messages* buffer, you have erred. > >HTH, > >Chuck >