(defun create-reference-file (filename title tags) "Creates a new reference and file it"
(interactive (list
(read-string "Filename: ")
(read-string "Title: ")
(read-string "Tags: ")
))
(set-buffer (get-buffer-create filename))
(beginning-of-buffer)
(insert (concat "* tags " tags))
;;saves the buffer
(when (file-writable-p filename)
(write-region (point-min) (point-max) (concat "~/org/data/dynamic_reference/" filename ".org")))
(end-of-buffer)
;;(create-wiki-page filename)
(insert (concat "** " title " " tags ":reference:file:\n"))
(org-insert-time-stamp nil t nil)
(insert "\n")
(insert (concat "[[file://~/org/data/dynamic_reference/" filename ".org]]"))
(insert "\n")
(save-buffer)
)
I'm only beginning with elisp, so bear with me...
Anyway, it works as expected, but I would like the tags prompt to be like the prompt org uses, with tags auto-completion and adding the : : automatically around the tags. Right now, I have to type the : around the words.
Marcelo.