Skip to content

Instantly share code, notes, and snippets.

@lislon
Created November 23, 2015 13:33
Show Gist options
  • Select an option

  • Save lislon/b70d43f53340ee3ebd4e to your computer and use it in GitHub Desktop.

Select an option

Save lislon/b70d43f53340ee3ebd4e to your computer and use it in GitHub Desktop.
;; ------------------------------------------------------------------------------
;; lord-lislon hooks
;; ------------------------------------------------------------------------------
(add-to-list 'auto-mode-alist
'("lord-lislon\\.org\\'" . (lambda ()
(message "Hello")
(org-mode)
(add-hook 'org-insert-heading-hook 'my/lord-lislon-auto-insert-date-heading nil t))))
(defun my/lord-lislon-auto-insert-date-heading ()
"Automatically adds lislon or lord tags and timestamp when adding new headings"
(let ((cur (point)))
(insert (concat " :" my/lord-lislon-tag ":"))
(newline-and-indent)
(org-time-stamp '(16) 'inactive)
(goto-char cur))
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment