[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Make ,* show up as * in babel blocks
From: |
Bastien |
Subject: |
Re: [O] Make ,* show up as * in babel blocks |
Date: |
Fri, 03 Jan 2014 16:52:39 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
Hi Oleh,
Oleh <address@hidden> writes:
> When a line of babel source code starts with leading star
> (also some other characters, see `org-unescape-code-in-string')
> org-mode auto-escapes it with a comma.
> I assume that there's no easy way not to add the comma.
> But I think it should be possible to fontify it as if it's not there.
>
> This comma is auto-removed for purposes of evaluation
> or when switching to native mode to edit a source block.
>
> The issue is that it's not removed when viewing the org-file.
>
> Small example to illustrate: J souce "*/ 2 2" displays as
>
> #+begin_src J
> ,*/ 2 2
> #+end_src
>
> I've found a work around:
>
> (defvar keyword-comma-star
> '(("^\\(,\\*\\)" (1 (prog1 ()
> (compose-region (match-beginning 1)
> (match-end 1)
> ?*))))))
> (font-lock-add-keywords 'org-mode keyword-comma-star)
I think it's a good candidate for
http://orgmode.org/worg/org-hacks.html
but the default should be to display the comma so that users
know it's here.
2 cents,
--
Bastien
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [O] Make ,* show up as * in babel blocks,
Bastien <=