From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [RFC] Add commmand for wrapping sexp/region in src-blocks to Org? Date: Sat, 02 Aug 2014 11:25:09 +0200 Message-ID: <87ha1v8cqy.fsf@nicolasgoaziou.fr> References: <87k36wqirh.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46986) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XDVYM-0000wW-QM for emacs-orgmode@gnu.org; Sat, 02 Aug 2014 05:24:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XDVYC-0001Tz-KC for emacs-orgmode@gnu.org; Sat, 02 Aug 2014 05:24:38 -0400 Received: from relay5-d.mail.gandi.net ([2001:4b98:c:538::197]:42884) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XDVYC-0001Tg-Dw for emacs-orgmode@gnu.org; Sat, 02 Aug 2014 05:24:28 -0400 In-Reply-To: <87k36wqirh.fsf@gmail.com> (Thorsten Jolitz's message of "Tue, 29 Jul 2014 17:36:34 +0200") 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: Thorsten Jolitz Cc: emacs-orgmode@gnu.org Hello, Thorsten Jolitz writes: > I often missed the following command for wrapping existing content into > src-blocks in the past, besides knowing about > `org-babel-demarcate-block' and easy template insertion. Would it make > sense to add it to Org-mode? > > I made it cover several use cases: > [...] > - Wrap region between point and +/- N lines forward/backward (very > fast because no point movement is involved). This is not really useful as, with muscle memory, you'll probably mark the appropriate region instead of counting lines. Also it requires the point to be at the center of the area you want to wrap. > - Wrap active region. Why limiting it to source blocks? One may want to wrap region with, e.g., a quote block. Also, with a prefix argument, it would be nice to edit the block containing point (change its type), or remove it completely. Regards, -- Nicolas Goaziou