From: Bastien <bzg@gnu.org>
To: Rafael <rvf0068@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Change key binding in math mode only
Date: Thu, 13 Mar 2014 16:11:54 +0100 [thread overview]
Message-ID: <87k3byrv45.fsf@bzg.ath.cx> (raw)
In-Reply-To: <86eh2hpniq.fsf@gmail.com> (Rafael's message of "Tue, 04 Mar 2014 17:11:41 -0600")
Hi Rafael,
Rafael <rvf0068@gmail.com> writes:
> I remembered that Org knows already if point is inside a math
> expression, so by looking at the source I came up with the following,
> that seems to work. Sorry for the noise.
That's not noise...
> #+BEGIN_SRC emacs-lisp
> (defun org-cdlatex-real-numbers ()
> (interactive)
> (if (org-inside-LaTeX-fragment-p)
> (insert "\\mathbb{R}")
> (insert "R")
> ))
>
> (add-hook 'org-mode-hook
> (lambda ()
> (local-set-key (kbd "R")
> 'org-cdlatex-real-numbers
> )))
> #+END_SRC
... that's a contribution -- thanks for it!
--
Bastien
prev parent reply other threads:[~2014-03-13 15:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-04 20:42 Change key binding in math mode only Rafael
2014-03-04 23:11 ` Rafael
2014-03-13 15:11 ` Bastien [this message]
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=87k3byrv45.fsf@bzg.ath.cx \
--to=bzg@gnu.org \
--cc=emacs-orgmode@gnu.org \
--cc=rvf0068@gmail.com \
/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).