[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] 8.3 git head new math $ behavior
From: |
Eric S Fraga |
Subject: |
Re: [O] 8.3 git head new math $ behavior |
Date: |
Wed, 25 Feb 2015 07:09:28 +0000 |
User-agent: |
Gnus/5.130012 (Ma Gnus v0.12) Emacs/24.4 (gnu/linux) |
On Tuesday, 24 Feb 2015 at 18:53, Rasmus wrote:
> \(ยท\) Should work unambiguously.
And, for the OP, if you are like me and have $...$ burned into your
autonomic system, the following snippet of code is quite useful:
#+begin_src emacs-lisp :tangle "esf-org.el"
;; from Nicolas Richard <address@hidden>
;; Date: Fri, 8 Mar 2013 16:23:02 +0100
;; Message-ID: <address@hidden>
(defun yf/org-electric-dollar nil
"When called once, insert \\(\\) and leave point in between.
When called twice, replace the previously inserted \\(\\) by one $."
(interactive)
(if (and (looking-at "\\\\)") (looking-back "\\\\("))
(progn (delete-char 2)
(delete-char -2)
(insert "$"))
(insert "\\(\\)")
(backward-char 2)))
(define-key org-mode-map (kbd "$") 'yf/org-electric-dollar)
#+end_src
--
: Eric S Fraga (0xFFFCF67D), Emacs 24.4.1, Org release_8.3beta-820-gd92ef9