From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Short Subject: Re: Re: [BABEL] [PROPOSAL] Seemless editing of Babel Blocks Date: Fri, 3 Sep 2010 15:08:46 -0400 Message-ID: References: <4C459236.3@gmail.com> <87k4opu5fk.fsf@gmail.com> <81hbivx88y.fsf@gmail.com> <8139ueykvc.fsf_-_@gmail.com> <878w3j1zos.fsf@stats.ox.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: Received: from [140.186.70.92] (port=58106 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Orbd5-0004yM-DS for emacs-orgmode@gnu.org; Fri, 03 Sep 2010 15:08:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Orbd3-0000Wa-IK for emacs-orgmode@gnu.org; Fri, 03 Sep 2010 15:08:50 -0400 Received: from mail-wy0-f169.google.com ([74.125.82.169]:51535) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Orbd3-0000WQ-BE for emacs-orgmode@gnu.org; Fri, 03 Sep 2010 15:08:49 -0400 Received: by wyb36 with SMTP id 36so2382004wyb.0 for ; Fri, 03 Sep 2010 12:08:48 -0700 (PDT) In-Reply-To: <878w3j1zos.fsf@stats.ox.ac.uk> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Dan Davison Cc: emacs-orgmode@gnu.org On Thu, Sep 2, 2010 at 7:41 PM, Dan Davison wrote: > There have been some recent changes with the aim of making code blocks > more pleasant to use in Org, such as fontification and making TAB and > other major-mode commands available in the Org buffer (with a current > master branch, see the variable `org-src-tab-acts-natively' and > `org-babel-do-key-sequence-in-edit-buffer' which is bound to key > bindings C-c C-v x and C-c C-v C-x) I really like the fontification and the tab-acts-natively. Would it be hard to extend that to a few more keys? Here's a first try for a nice key to have in R source blocks ("_"): (add-hook 'org-mode-hook (lambda () (define-key org-mode-map "_" '(lambda () (interactive) (org-babel-do-key-sequence-in-edit-buffer (kbd "_"))))) That works in R (and other) blocks, but doesn't work outside that. Any hints to get me a little further? - Tom