emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Custom keymaps on org blocks


From: Nicolas Goaziou
Subject: Re: [O] Custom keymaps on org blocks
Date: Sat, 10 Jun 2017 11:03:25 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)

Hello,

John Kitchin <address@hidden> writes:

> On the other hand, there are times when I am working on a document that has
> a lot of short code blocks, e.g. for lecture notes or blog posts, where it
> is sufficiently tedious to me to switch in and out of the special edit mode
> that I wanted to try this solution out, and it became clear you can't
> really try it out without modifying the core org code that does the
> font-locking on a block.

Are you sure about it? There are two hooks related to fontification:
`org-font-lock-set-keywords-hook' and `org-font-lock-hook'. I'm
surprised none can help you in this case.

> I don't think we have to go so far as to say we make multiple major mode
> keybindings available, so much as context specific keybindings available
> where there is value in it. We already have this in org-speed keys for
> example, and even these can be context specific to do different things on
> headings (even different things on headings with specific properties) and
> blocks (
> http://kitchingroup.cheme.cmu.edu/blog/2016/12/22/Context-specific-org-mode-speed-keys/
> ).

Neat hack.

> If there was a change to org to enable this, I wouldn't expect the core to
> change behavior for anyone, it would just make it possible for users to
> change this if they wanted to. The same way they can customize the face of
> a code block for different languages.

Fair enough. Would you want to provide a proper patch?

Thank you.


Regards,

-- 
Nicolas Goaziou



reply via email to

[Prev in Thread] Current Thread [Next in Thread]