[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Changing [X] by something else
From: |
Jon Miller |
Subject: |
Re: [O] Changing [X] by something else |
Date: |
Sat, 11 Feb 2012 14:18:22 -0500 |
I like the idea... Here is another alternative:
(font-lock-add-keywords
'org-mode `(("\\[X\\]"
(0 (progn (compose-region (match-beginning 0) (match-end 0)
"☑")
nil)))
("\\[ \\]"
(0 (progn (compose-region (match-beginning 0) (match-end 0)
"☐")
nil)))))
-- Jon Miller
2012/2/11 Jambunathan K <address@hidden>:
> Jambunathan K <address@hidden> writes:
>
>> address@hidden (François Pinard) writes:
>>
>>> I notice in org.el that [X] is hard-wired, while I would have liked the
>>> possibility of changing it by [✓] in my things, which I find both softer
>>> and cleaner.
>>
>> How about a variation of this
>>
>> #+begin_src emacs-lisp
>> (font-lock-add-keywords
>> 'org-mode `(("\\[X\\]"
>> (0 (progn (compose-region (match-beginning 0) (match-end 0)
>> "")
>> nil)))))
>> #+end_src
>>
>> along the lines of http://www.emacswiki.org/emacs/PrettyLambda
>
> Btw, C-h f org-toggle-pretty-entities does composition and decomposition.
> --
>