From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Abrahamsen Subject: Re: Poll: new keybinding for org-insert-structure-template? Date: Wed, 20 Dec 2017 08:48:04 -0800 Message-ID: <87k1xh4a7v.fsf@ericabrahamsen.net> References: <87r2s3ctxh.fsf@ericabrahamsen.net> <87d13m3jt2.fsf@gmx.us> <87efo2wf0s.fsf@ericabrahamsen.net> <87y3m8s7ym.fsf@gmx.us> <87fu8gwfbr.fsf@nicolasgoaziou.fr> <87k1xs2h0h.fsf@gmx.us> <87h8svpt1r.fsf@ericabrahamsen.net> <87o9n11xxi.fsf@gmx.us> <87vah9ovmi.fsf@ericabrahamsen.net> <87po7gxmka.fsf@gmx.us> <87k1xoxhbl.fsf@gmx.us> <877etnq48m.fsf@ericabrahamsen.net> <877etjlwsw.fsf@ericabrahamsen.net> <87mv2ft081.fsf@gmx.us> <87wp1h4ars.fsf@ericabrahamsen.net> 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]:33720) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eRhZS-0001b5-HG for emacs-orgmode@gnu.org; Wed, 20 Dec 2017 11:50:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eRhZP-0005GE-Kd for emacs-orgmode@gnu.org; Wed, 20 Dec 2017 11:50:18 -0500 Received: from [195.159.176.226] (port=60421 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eRhZP-0005EY-C8 for emacs-orgmode@gnu.org; Wed, 20 Dec 2017 11:50:15 -0500 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1eRhXJ-0002j4-6V for emacs-orgmode@gnu.org; Wed, 20 Dec 2017 17:48:05 +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 Eric Abrahamsen writes: > Rasmus writes: > >> Eric Abrahamsen writes: >> >>> Eric Abrahamsen writes: >>> >>>> Rasmus writes: >>>> >>>>> Kaushal Modi writes: >>>>> >>>>>> On Fri, Dec 15, 2017 at 6:23 AM Rasmus wrote: >>>>>> >>>>>>> The only way it’s "bad" is in the sense it limits the flexibility of >>>>>>> snippets, like ">>>>>> I can no longer have ">>> >>>> I don't see any way around that. Any system that allows string keys of >>>> arbitrary length is going to run into that problem. >>> >>> One possible fix, a bit arbitrary: in the default value, provide >>> as an artificial "stop key" in the sub-menus. So "s" starts the "source >>> code" sub-menu, and a after that simply inserts "#+begin_src", and >>> leaves point after that. >> >> Yeah, I tried to suggest that earlier (unless I didn’t say it), but I >> might not have expressed the idea in an understandable manner :) > > Maybe I missed it! > >> I think that would be the best approach, but there’s no infrastructure >> that I know of that does this ATM (but I haven’t had a lot of time lately, >> so my knowledge on this issue is limited!). > > Can't we do this with tempo? It will have to be "handmade", not > automatic, but: > > '(("s" "Source Code") > ("se" "Elisp" "src elisp") > ("sp" "Python" "src python") > ("TAB" "Empty" "src ") > ...etc > ("e" "Export Block") > ("eh" "HTML" "export html") > ("el" "LaTeX" "export latex") > ("TAB" "Empty" "export ") > ...etc > ("v" "Verbatim" "verbatim") > ("q" "Quote" "quote") > ("E" "Example" "example") > ...etc > ) Ahem, should have actually tried that first: (org-mks '(("s" "Source Code") ("se" "Elisp" "src elisp") ("sp" "Python" "src python") ("s\t" "Empty" "src ") ("e" "Export Block") ("eh" "HTML" "export html") ("el" "LaTeX" "export latex") ("s\t" "Empty" "export ") ("v" "Verbatim" "verbatim") ("q" "Quote" "quote") ("E" "Example" "example")) "Insert Block" "Block: ") It's a bit ugly, but it works...