Fix structure-templates for Org 9.2

The <el TAB shortcut has migrated to a dedicated package with a
different syntax.
master
Jacopo De Simoi 6 years ago
parent 6aafbb89a6
commit 46a80642be
  1. 15
      global.org

@ -843,14 +843,21 @@
; ("\\subparagraph{%s}" . "\\subparagraph*{%s}")))
#+END_SRC
*** Source blocks
Add template for a source block in emacs-lisp. This is useful for
writing the emacs init file in literate form
Add template for a source block in a few selected languages; for
now I have
- emacs-lisp
- shell
. This is useful for writing the emacs init file in literate form,
or dotfiles for other code. Since Org 9.2, the behavior that I
grew accustomed to (e.g. ~<el TAB~) )is implemented by
~org-tempo~, so I need to require that as well.
#+BEGIN_SRC emacs-lisp
(mapcar (lambda (structure-template)
(add-to-list 'org-structure-template-alist
structure-template))
'(("el" "#+BEGIN_SRC emacs-lisp\n?\n#+END_SRC")
("sh" "#+BEGIN_SRC sh\n?\n#+END_SRC")))
'(("el" . "src emacs-lisp")
("sh" . "src sh")))
(require 'org-tempo)
#+END_SRC
Fontify src blocks
#+BEGIN_SRC emacs-lisp

Loading…
Cancel
Save