emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Restore old easy template feature (Re: function for inserting a


From: Kaushal Modi
Subject: Re: [O] Restore old easy template feature (Re: function for inserting a block)
Date: Wed, 08 Nov 2017 12:43:41 +0000

On Wed, Nov 8, 2017, 7:27 AM Kaushal Modi <address@hidden> wrote:
On Wed, Nov 8, 2017, 7:16 AM Bastien <address@hidden> wrote:

is there a simple mechanism in Emacs core to restore the same
functionnality?

+1 

To clarify, I am not suggesting to blindly restore the old easy template system, and then have 2 sets of code doing similar things. 

I am suggesting to have a minor mode that simply binds "<" to do the template insertion (only when that is typed at BOL with optional leading whitespace, or if a region is selected). If they want to literally type "<" in those cases, they can either type "<<" or the old "C-q <". 

That minor mode will reuse the code that Eric added, so that typing "<s" will insert the BEGIN_SRC block, etc. 

I can work on getting a patch ready if people are fine with this idea (I effectively do the same in my config, but with the old template system. So while the heuristics work great, I'll need to adjust that code to fit the easy template replacement.)
--

Kaushal Modi


reply via email to

[Prev in Thread] Current Thread [Next in Thread]