From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Custom keymaps on org blocks Date: Sat, 10 Jun 2017 11:03:25 +0200 Message-ID: <87efusz02q.fsf@nicolasgoaziou.fr> References: <878tl5ugl9.fsf@nicolasgoaziou.fr> <87o9u0ylu6.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37530) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dJcIr-0004hs-L7 for emacs-orgmode@gnu.org; Sat, 10 Jun 2017 05:03:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dJcIq-0008MC-KX for emacs-orgmode@gnu.org; Sat, 10 Jun 2017 05:03:29 -0400 Received: from relay3-d.mail.gandi.net ([2001:4b98:c:538::195]:44442) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dJcIq-0008Ki-FF for emacs-orgmode@gnu.org; Sat, 10 Jun 2017 05:03:28 -0400 In-Reply-To: (John Kitchin's message of "Wed, 7 Jun 2017 07:50:02 -0600") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: John Kitchin Cc: "emacs-orgmode@gnu.org" Hello, John Kitchin 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