From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Bug: Write file while editing babel code block doesn't work as expected [8.3.4 (release_8.3.4-778-g8127b3 @ /usr/local/share/emacs/site-lisp/org/)] Date: Mon, 16 May 2016 11:29:51 +0200 Message-ID: <8760ueuz8w.fsf@saiph.selenimh> References: <87vb2ki8vl.fsf@saiph.selenimh> <87eg969697.fsf@gmail.com> <87d1oq9mxn.fsf@saiph.selenimh> <20160515041152.GA1188@smoon.vl-lomov.ru> <87h9dzwyzw.fsf@saiph.selenimh> <20160515110016.GB1188@smoon.vl-lomov.ru> <87twhzuubm.fsf@saiph.selenimh> <20160516024803.GC1188@smoon.vl-lomov.ru> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42033) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2F0W-0001KG-7g for emacs-orgmode@gnu.org; Mon, 16 May 2016 05:40:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b2F0V-0000to-B7 for emacs-orgmode@gnu.org; Mon, 16 May 2016 05:40:12 -0400 Received: from relay4-d.mail.gandi.net ([2001:4b98:c:538::196]:59428) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2F0V-0000tC-5T for emacs-orgmode@gnu.org; Mon, 16 May 2016 05:40:11 -0400 In-Reply-To: <20160516024803.GC1188@smoon.vl-lomov.ru> (Vladimir Lomov's message of "Mon, 16 May 2016 10:48:03 +0800") 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: Vladimir Lomov Cc: emacs-orgmode@gnu.org Hello, Vladimir Lomov writes: > This works fine, though at first I thought it would be enough to add > only following code > #+BEGIN_SRC emacs-lisp > (define-key org-src-mode-map [f2] 'org-edit-src-save) > #+END_SRC > into emacs init file. Of course, this don't work and emacs complains about > ~org-src-mode-map~. Only one thing bother me: is it normal to add such > hook into ~org-src-mode-hook~ ? I think so. I also add keybindings through mode hooks. Another way to achieve this it to use `with-eval-after-load'. Regards, -- Nicolas Goaziou