From mboxrd@z Thu Jan 1 00:00:00 1970 From: Xebar Saram Subject: Re: function for inserting a block Date: Sat, 21 Oct 2017 14:30:31 +0300 Message-ID: References: <877exghblx.fsf@ericabrahamsen.net> <87ziabepxt.fsf@ericabrahamsen.net> <87bmml2fb0.fsf@ericabrahamsen.net> <87fubuzpsa.fsf@nicolasgoaziou.fr> <874lsabdop.fsf@ericabrahamsen.net> <87vak1l11m.fsf@nicolasgoaziou.fr> <87r2uoc4q7.fsf@ericabrahamsen.net> <87bmllk5xy.fsf@nicolasgoaziou.fr> <878tgmwwsa.fsf@ericabrahamsen.net> <87po9q2e8k.fsf@nicolasgoaziou.fr> <87tvyyvpst.fsf@ericabrahamsen.net> <87fuaiz069.fsf@nicolasgoaziou.fr> <87lgk9eo4d.fsf@ericabrahamsen.net> <87fuahxxvs.fsf@nicolasgoaziou.fr> <87r2u1cuwj.fsf@ericabrahamsen.net> <87infdctzq.fsf@ericabrahamsen.net> <87k1zsbizs.fsf@ericabrahamsen.net> <87k1zp4rxj.fsf@ericabrahamsen.net> <871slx4j6p.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="001a114695fcd33967055c0ceaee" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44413) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e5rzA-0004aG-EQ for emacs-orgmode@gnu.org; Sat, 21 Oct 2017 07:30:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e5rz9-0003C0-6U for emacs-orgmode@gnu.org; Sat, 21 Oct 2017 07:30:36 -0400 Received: from mail-wm0-x22e.google.com ([2a00:1450:400c:c09::22e]:47948) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e5rz8-0003Ad-SM for emacs-orgmode@gnu.org; Sat, 21 Oct 2017 07:30:35 -0400 Received: by mail-wm0-x22e.google.com with SMTP id t69so1954685wmt.2 for ; Sat, 21 Oct 2017 04:30:33 -0700 (PDT) In-Reply-To: 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: Kaushal Modi Cc: Eric Abrahamsen , org mode --001a114695fcd33967055c0ceaee Content-Type: text/plain; charset="UTF-8" Hi all this looks really cool and would love to try. as a non technical user, how does one use the patch to get the functionality? is there a way to create a clean function only version from the patch i can try? thx! Z On Sat, Oct 21, 2017 at 12:43 AM, Kaushal Modi wrote: > On Fri, Oct 20, 2017 at 5:15 PM Eric Abrahamsen > wrote: > >> The template really only inserts the block type, not anything specific >> like the source language or export backend. > > > Right, but based on the code you have, you can easily add "SRC org", "SRC > emacs-lisp" to the default value of that list. Looking at that, users can > also get an idea that they can add their favorite languages to that list > too. > > >> I think prompting for >> "second-level" information like that might be a little overkill. >> > > I second that. The first-level prompt also feels a bit slow, honestly, > compared to using easy templates like " (just an example) to insert the, well, EXAMPLE block as usual. But *if > region is selected*, it does the wrapping as in your code. > > This is what I mean (GIF animation): > > https://i.imgur.com/201TISW.gifv > > I use hydra to provide those awesome hints.. but the same can be done > without hydras too. > > As for what should be escaped and what shouldn't, I defer to Nicolas, >> let's see what he says. >> > -- > > Kaushal Modi > --001a114695fcd33967055c0ceaee Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi all

this looks really cool and would= love to try. as a non technical user, how does one use the patch to get th= e functionality? is there a way to create a clean function only version fro= m the patch i can try?

thx!

Z

O= n Sat, Oct 21, 2017 at 12:43 AM, Kaushal Modi <kaushal.modi@gmail.com= > wrote:
<= div class=3D"gmail_quote">
On Fri, Oct 20,= 2017 at 5:15 PM Eric Abrahamsen <eric@ericabrahamsen.net> wrote:
The template really only inserts the block type,= not anything specific
like the source language or export backend.

Right, but based on the code you have, you can easily add "SRC= org", "SRC emacs-lisp" to the default value of that list. L= ooking at that, users can also get an idea that they can add their favorite= languages to that list too.
=C2=A0
I think prompting for
"second-level" information like that might be a little overkill.<= br>

I second that. The first-level p= rompt also feels a bit slow, honestly, compared to using easy templates lik= e "<e". So in my config, I make "<e" (just an exa= mple) to insert the, well, EXAMPLE block as usual. But *if region is select= ed*, it does the wrapping as in your code.

This is= what I mean (GIF animation):


I use hydra to provide those awesome= hints.. but the same can be done without hydras too.=C2=A0

As for what should be = escaped and what shouldn't, I defer to Nicolas,
let's see what he says.
--

Kaushal Modi


--001a114695fcd33967055c0ceaee--