emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "vendo.libri@libero.it" <vendo.libri@libero.it>
To: emacs-orgmode@gnu.org
Subject: Re: Wrong type argument: characterp, 134217782 (??)
Date: Mon, 25 Jan 2016 21:41:07 +0100 (CET)	[thread overview]
Message-ID: <633456309.3740561453754467589.JavaMail.httpd@webmail-19.iol.local> (raw)

Chuck, 
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-
prefix".

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 <ccberry@ucsd.edu>
>Data: 25-gen-2016 5.54
>A: "vendo.libri@libero.it"<vendo.libri@libero.it>
>Cc: <emacs-orgmode@gnu.org>
>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 '•' (a bullet mark) to trigger 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 
>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.
>or
> 	if: No item defined for abc environment.
>
>in the *Messages* buffer, you have erred.
>
>HTH,
>
>Chuck
>

             reply	other threads:[~2016-01-25 20:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-25 20:41 vendo.libri [this message]
2016-01-26  0:03 ` Wrong type argument: characterp, 134217782 (??) Charles C. Berry
  -- strict thread matches above, loose matches on Subject: below --
2016-01-24 22:14 vendo.libri
2016-01-25  4:54 ` Charles C. Berry
2016-01-23 13:36 vendo.libri
2016-01-23 20:42 ` Eric S Fraga
2016-01-24  1:11   ` Charles C. Berry
2016-01-24  4:57     ` Charles C. Berry

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=633456309.3740561453754467589.JavaMail.httpd@webmail-19.iol.local \
    --to=vendo.libri@libero.it \
    --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).