[Top][All Lists]

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

Re: [O] [patch] structure snippet completions

From: Rasmus
Subject: Re: [O] [patch] structure snippet completions
Date: Fri, 08 Dec 2017 22:20:48 +0100
User-agent: Emacs Gnus

"Berry, Charles" <address@hidden> writes:

>> On Dec 7, 2017, at 3:37 PM, Rasmus <address@hidden> wrote:
>> I have also pushed the code.  "<s"-like snippet expansion should be
>> enabled by requiring org-tempo.
> Thanks. I was in a deep funk without "<s" and friends.  Feeling better now.

I am happy that I am able to help you for once!

>> Let me know about any issues.
> Maybe make `tempo-match-finder' be "^ *\\(<[[:word:]]+\\)" so it will
> match things like "<la" when I want a latex align environment.  Or let
> the user customize it.

At the moment snippets with more than one character isn’t supported.  Note
that the car of org-structure-template-alist elements is now a character.
"Snippet-strings" (like "la") will be re-added soon cf. the email from
Eric earlier on in this thread.

> A minor gotcha: if you `(require 'org-tempo)' after an org buffer has
> been created you will need to (org-mode-restart) the buffer to enable
> completions.  I got stuck trying to add custom templates until I
> realized this.

It shouldn’t do that since this is near the bottom of org-tempo:

    (when (eq major-mode 'org-mode) (org-tempo-setup))

On my system it works in the first buffer where I require org-tempo, even
without reloading.

Which version of Emacs are you using?


A clever person solves a problem. A wise person avoids it

reply via email to

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