From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Abrahamsen Subject: Re: function for inserting a block Date: Sat, 02 Sep 2017 20:34:34 -0700 Message-ID: <87h8wkfoad.fsf@ericabrahamsen.net> References: <877exghblx.fsf@ericabrahamsen.net> <87h8wked4b.fsf@alphapapa.net> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54366) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1doLgt-0006QN-2F for emacs-orgmode@gnu.org; Sat, 02 Sep 2017 23:35:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1doLgo-0001Ie-IX for emacs-orgmode@gnu.org; Sat, 02 Sep 2017 23:35:19 -0400 Received: from [195.159.176.226] (port=37819 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1doLgo-0001HO-BM for emacs-orgmode@gnu.org; Sat, 02 Sep 2017 23:35:14 -0400 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1doLgR-0001M1-VD for emacs-orgmode@gnu.org; Sun, 03 Sep 2017 05:34:51 +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" To: emacs-orgmode@gnu.org Kaushal Modi writes: > On Sat, Sep 2, 2017, 10:23 PM Adam Porter wrote: > > Hi Eric, > > Thanks for doing this. I've had some similar code in my config for a > while. I'll share some of it here in case you find it useful in doing > this. You especially might find the org-read-structure-template > function useful. > > And here's my version, which also uses hydra. But the function modi/org-template-expand to insert the BEGIN_../END_.. blocks can be reused. > > This at least tells that there's a good need to have the easy template do the right thing when it is called with a region selected. That's the vast majority of what I wanted. So long as we've got that, and it doesn't depend on random other packages, I'm happy.