From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Abrahamsen Subject: Re: function for inserting a block Date: Thu, 09 Nov 2017 08:50:31 -0800 Message-ID: <87bmkbflbc.fsf@ericabrahamsen.net> References: <877exghblx.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> <87376btslq.fsf@nicolasgoaziou.fr> <87vaj7oyxb.fsf@ericabrahamsen.net> <871sl9ow44.fsf@gnu.org> <87fu9pgfkj.fsf@nicolasgoaziou.fr> <87375ouanr.fsf@gmx.us> <871sl8e76c.fsf@nicolasgoaziou.fr> <87y3nfse6m.fsf@gmx.us> <87tvy3sa7m.fsf@gmx.us> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37925) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eCq48-0001Ct-FQ for emacs-orgmode@gnu.org; Thu, 09 Nov 2017 11:52:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eCq44-0004Vd-Is for emacs-orgmode@gnu.org; Thu, 09 Nov 2017 11:52:32 -0500 Received: from [195.159.176.226] (port=36324 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eCq44-0004UX-As for emacs-orgmode@gnu.org; Thu, 09 Nov 2017 11:52:28 -0500 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1eCq3r-0004JM-3e for emacs-orgmode@gnu.org; Thu, 09 Nov 2017 17:52:15 +0100 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 Rasmus writes: > Rasmus writes: > >> Nicolas Goaziou writes: >> >>> Takaaki Ishikawa writes: >>> >>>> I also support the idea of keeping ">>> Please give importance to the backward compatibility in this case. >>> >>> I explained why I thought it could be removed. I also suggested >>> solutions to get an equivalent feature without implementing it in Org. >> >> Which sounds fair. >> >>> What is wrong with Abbrev mode, skeletons, tempo.el, expand.el, all >>> bundled with Emacs, or YASnippet, in the Emacs ecosystem? It sounds like >>> NIH. Or, to put it differently: why in the world would Org implement its >>> own template system? >> >> tempo.el, which I was unaware of, will be able to do this. Thanks for the >> pointer. >> >> I have started to write a replacement. It seems to work fairly OK so far. >> Not all keywords have been added, and no mechanism for adding additional >> keywords is there yet. >> >> Nicolas, what would be the best way to hook ‘tempo-complete-tag’ into >> "space"? Should I add support directly in org-self-insert-command or add >> it to post-command-hook? > > Actually, it should just hook into TAB (doh). > > The attached version seems to replicate the old behavior more or less. I > had to add a new custom variable to store keywords. > > Also, Eric, it seems that org-structure-template-alist only supports a > single letter for short-hands (the car of an entry in > org-structure-template-alist is a char). I used to have blocks like " expanding to an "abstract" special-block, which I guess isn’t possible > anymore? I hadn't thought of that. Really, all I ever wanted was to wrap things in blocks... I don't see any reason why org-structure-template-alist couldn't go back to using string keys. Then we could use read-string, and wouldn't have to have special behavior -- a string that didn't exist in the alist could just be used literally to make a block. Eric