Re: [O] [patch] structure snippet completions

2017-12-10 Thread Rasmus
"Berry, Charles" writes: >> On Dec 8, 2017, at 1:20 PM, Rasmus wrote: >> > >>> >>> 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

Re: [O] [patch] structure snippet completions

2017-12-09 Thread Berry, Charles
> On Dec 8, 2017, at 1:20 PM, Rasmus wrote: > >> >> 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 should

Re: [O] [patch] structure snippet completions

2017-12-09 Thread Rasmus
"numbch...@gmail.com" writes: > error report when I `(require 'org-tempo)` Because your org-structure-template-alist is mal-formatted: ("Q" "#+BEGIN_SRC sql-mode ?\n\n#+END_SRC" "#+BEGIN_SRC sql-mode ?\n\n#+END_SRC") Rasmus -- The right to be left alone is a human right

Re: [O] [patch] structure snippet completions

2017-12-09 Thread numbch...@gmail.com
error report when I `(require 'org-tempo)` Debugger entered--Lisp error: (error "Format specifier doesn’t match argument type") format("<%c" "Q") (closure (t) (pair) (format "<%c" (car pair)))(("Q" "#+BEGIN_SRC sql-mode ?\n\n#+END_SRC" "#+BEGIN_SRC sql-mode ?\n\n#+END_SRC")) mapcar((closure

Re: [O] [patch] structure snippet completions

2017-12-08 Thread Rasmus
"Berry, Charles" writes: >> On Dec 7, 2017, at 3:37 PM, Rasmus wrote: >> >> I have also pushed the code. "> enabled by requiring org-tempo. >> > > Thanks. I was in a deep funk without "> Let me know about any issues. >> > > Maybe make `tempo-match-finder' be "^ *\\(<[[:word:]]+\\)" so it wil

Re: [O] [patch] structure snippet completions

2017-12-08 Thread Berry, Charles
> On Dec 7, 2017, at 3:37 PM, Rasmus wrote: > > I have also pushed the code. " enabled by requiring org-tempo. > Thanks. I was in a deep funk without " Let me know about any issues. > Maybe make `tempo-match-finder' be "^ *\\(<[[:word:]]+\\)" so it will match things like "

Re: [O] [patch] structure snippet completions

2017-12-08 Thread Rasmus
Kaushal Modi writes: > On Thu, Dec 7, 2017 at 6:51 PM Rasmus wrote: > >> Rasmus writes: >> One possible "bug" that I discovered is illustrated by the following >> example. >> >> * foo >> suggested indention >> > >> When I tab at point ("|") extra indention will be stripped. I don’t >>

Re: [O] [patch] structure snippet completions

2017-12-07 Thread Kaushal Modi
On Thu, Dec 7, 2017 at 6:51 PM Rasmus wrote: > Rasmus writes: > One possible "bug" that I discovered is illustrated by the following > example. > > * foo > suggested indention > > When I tab at point ("|") extra indention will be stripped. I don’t > know if this is something that sho

Re: [O] [patch] structure snippet completions

2017-12-07 Thread Rasmus
Rasmus writes: > Hi, > > Nicolas Goaziou writes: > >> It looks like a typo, but the two lines above are commented. > > Indeed. Thanks. > >> Also, would it make sense to add a few tests? > > I never feel very creative about tests but I have added some. > > I have also pushed the code. " enabled

Re: [O] [patch] structure snippet completions

2017-12-07 Thread Rasmus
Hi, Nicolas Goaziou writes: > It looks like a typo, but the two lines above are commented. Indeed. Thanks. > Also, would it make sense to add a few tests? I never feel very creative about tests but I have added some. I have also pushed the code. "

Re: [O] [patch] structure snippet completions

2017-12-05 Thread Nicolas Goaziou
Hello, Rasmus writes: > +@cindex Tempo > +@cindex Template expansion > +@cindex template insertion > +@cindex insertion, of templates > +@vindex org-tempo-keywords-alist > +@vindex org-structure-template-alist > +Org Tempo expands snippets to structures defined in > +@c @code{org-structure-templ

Re: [O] [patch] structure snippet completions

2017-12-05 Thread Eric Abrahamsen
Rasmus writes: > Eric Abrahamsen writes: > >> Rasmus writes: >> >>> Hi, >>> >>> The attached patch adds expansions of ">> would like to include this in the next version of Org in anticipation of >>> the changes to the template system. >> >> Cool! We were talking about shifting the alist keys to

Re: [O] [patch] structure snippet completions

2017-12-05 Thread Rasmus
Eric Abrahamsen writes: > Rasmus writes: > >> Hi, >> >> The attached patch adds expansions of "> would like to include this in the next version of Org in anticipation of >> the changes to the template system. > > Cool! We were talking about shifting the alist keys to strings, do we > want to do

Re: [O] [patch] structure snippet completions

2017-12-05 Thread Rasmus
Hi, Thanks for the comments. I have attached a new version that addresses the issues you raised. I think Org Tempo should pretty much work as this point, but of course additional testing would be great. And more cool key expansions of course. >> +@vindex org-tempo > > Is it worth mentioning th

Re: [O] [patch] structure snippet completions

2017-12-04 Thread Eric Abrahamsen
Rasmus writes: > Hi, > > The attached patch adds expansions of " would like to include this in the next version of Org in anticipation of > the changes to the template system. Cool! We were talking about shifting the alist keys to strings, do we want to do that all at once, in both places, or le

Re: [O] [patch] structure snippet completions

2017-12-04 Thread Nicolas Goaziou
Hello, Rasmus writes: > The attached patch adds expansions of " would like to include this in the next version of Org in anticipation of > the changes to the template system. Thank you. Some, mostly cosmetics, comments follow. > > In at least emacs-git it "just works" after requiring org-tempo.