[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Changing [X] by something else
From: |
François Pinard |
Subject: |
Re: [O] Changing [X] by something else |
Date: |
Sat, 11 Feb 2012 21:44:12 -0500 |
User-agent: |
Gnus/5.130002 (Ma Gnus v0.2) Emacs/23.3 (gnu/linux) |
Jambunathan K <address@hidden> writes:
> address@hidden (François Pinard) writes:
> along the lines of http://www.emacswiki.org/emacs/PrettyLambda
Thanks for this pointer, which I saved for later study.
>> 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
> (font-lock-add-keywords
> 'org-mode `(("\\[X\\]"
> (0 (progn (compose-region (match-beginning 0) (match-end 0)
> "")
> nil)))))
New concepts for me in this `compose-region'! Handa-san strikes again! :-)
I confess I do not understand much of it. Ctrl-S being turned into a
rectangle is mysterious. Is it the standard way for Emacs to tell about
a non-printable character? The documentation of font-lock-add-keywords
does not hint me at what may be those S-exprs which are not faces.
Moreover, the effect is a bit tiny or shy, at least compared to what I
expected. The suggestions of John Miller yield tiny characters as well.
Presumably, I could try to see if I can force higher font sizes, but
that would be diving deeper into trickery, and away from other problems.
Despite the undoubtedly ingenious suggestion, I guess I'll merely stick
with what Org mode already offers, as it's the best I got so far! :-)
In any case, I'm grateful for your interest, and for sharing ideas.
François