UPDATE:
Haven't noticed that Org Mode 9.2 changed the mechanism of template expansion,
where org-structure-template-alist
is only for blocks defined by "#+BEGIN_"
and "#+END_"
.
And entry like ("p" ":PROPERTIES:?:END:")
is no longer accepted.
As mentioned in the above link, other "complex" template can be defined by function tempo-define-template
,
and org-tempo must be loaded((require 'org-tempo)
). Actually the entries of org-structure-template-alist
are converted to org-tempo-tags
via tempo-define-template
by org-tempo
, and org-tempo-tags
defaults to:
(("<i" . tempo-template-org-index)
("<A" . tempo-template-org-ascii)
("<H" . tempo-template-org-html)
("<L" . tempo-template-org-latex)
("<v" . tempo-template-org-verse)
("<s" . tempo-template-org-src)
("<q" . tempo-template-org-quote)
("<l" . tempo-template-org-export-latex)
("<h" . tempo-template-org-export-html)
("<E" . tempo-template-org-export)
("<e" . tempo-template-org-example)
("<C" . tempo-template-org-comment)
("<c" . tempo-template-org-center)
("<a" . tempo-template-org-export-ascii)
("<I" . tempo-template-org-include))
For your case, you can define a template by:
(tempo-define-template "my-property"
'(":PROPERTIES:" p ":END:" >)
"<p"
"Insert a property tempate")
Below answer only works for Org mode version prior to 9.2
Yes, you could add an entry to it like this:
(add-to-list 'org-structure-template-alist '("p" ":PROPERTIES:?:END:"))
Then in org file, you type <p
and TAB
, it will expand to property and
leave the point at the position of ?
.
And you can find more details in the documentation of the variable by typing C-h v org-structure-template-alist RET
.