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 the _variable_ `org-tempo'? No. > Also, > > @cindex Tempo > @cindex Template expansion > @cindex ... whatever ... Good idea. >> +@vindex org-tempo-keywords-alist > > Is > > @vindex org-structure-template-alist > > missing? Perhaps. Added. >> +@code{org-structure-template-alist} and @code{org-tempo-keywords-alist}. For >> +example, @code{org-tempo} makes @kbd{<} @kbd{s} @kbd{@key{TAB}} >> expand to a > > For example, Org Tempo makes @kbd(< s @key{TAB}) expand to a code block. That was taken from an old revision of the manual, but I am happy to use the more clear form. >> +@samp{src} code block. Enable it by customizing @code{org-modules} or add >> +@code{(require 'org-tempo)} to your Emacs init file@footnote{For more >> +information, please refer to the commentary section in >> @code{org-tempo.el}}. > > ... @file{org-tempo.el}.}. So much texinfo syntax... >> + (user-error >> + "Duplicated keys in `org-structure-template-alist' and >> `org-tempo-keywords-alist'")) > > Is is an issue? I guess if "> +(defun org-tempo-add-keyword (entry) >> + "Add keyword entry from `org-tempo-keywords-alist'." >> + (let* ((key (format "<%c" (car entry))) >> + (name (cdr entry))) >> + (tempo-define-template (format "org-%s" (replace-regexp-in-string " " "-" name)) >> + `(,(format "#+%s: " name) p '>) >> + key >> + (format "Insert a %s keyword" name) >> + 'org-tempo-tags))) >> + >> +;;; Additional keywords >> + >> +(tempo-define-template "org-include" >> + '("#+include: " >> + (ignore-errors > > Why `ignore-errors'? In case the file selection is quit. But I have re-done the include keyword in a better way. >> + ;; Simple test if `org-tempo-setup' has been run. >> + ;; May not be the case if `org-tempo' was loaded >> + ;; after Org. >> + (unless (cl-member "> + (org-tempo-setup)) > > (unless (assoc " > But wouldn't calling > > (org-tempo-setup) > > at top level in "org-tempo.el" solve the issue? Good idea. I call it if we’re in an Org buffer. Perhaps people use Tempo in other modes so it would be potentially disruptive to call it in other modes. Rasmus -- You people at the NSA are becoming my new best friends!