From mboxrd@z Thu Jan 1 00:00:00 1970 From: Oleh Subject: Re: [PATCH] org-src: allow `org-babel-edit-prep:.*' to mark region Date: Sat, 29 Nov 2014 14:47:01 +0100 Message-ID: References: <8761dynnca.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46859) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XuiMZ-0005Rl-1X for emacs-orgmode@gnu.org; Sat, 29 Nov 2014 08:47:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XuiMY-000414-4K for emacs-orgmode@gnu.org; Sat, 29 Nov 2014 08:47:02 -0500 Received: from mail-wi0-x232.google.com ([2a00:1450:400c:c05::232]:59450) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XuiMX-00040z-TL for emacs-orgmode@gnu.org; Sat, 29 Nov 2014 08:47:02 -0500 Received: by mail-wi0-f178.google.com with SMTP id hi2so13339924wib.17 for ; Sat, 29 Nov 2014 05:47:01 -0800 (PST) In-Reply-To: <8761dynnca.fsf@nicolasgoaziou.fr> 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Oleh , org mode Hi Nicolas, > I don't understand what your use-case is. Note that `org-edit-special' > already preserves region. That's good, but not what I need. I want to go from an unmarked region in an org file with markup to a marked region without markup in the *Org Src* buffer. I've defined a custom `org-babel-edit-prep:elisp' that does this, but it's not allowed to mark region in this function. A patch to `org-edit-src-code' is required for this. Just to sum it up: I want a custom `org-babel-edit-prep:elisp' to be able to mark region, even if it wasn't marked before. regards, Oleh