diff options
author | Matthew Lemon <matt@matthewlemon.com> | 2022-12-07 16:43:53 +0000 |
---|---|---|
committer | Matthew Lemon <matt@matthewlemon.com> | 2022-12-07 16:43:53 +0000 |
commit | db9ed361ce0b2eb2ec3cb3fd619ceaadfab474dd (patch) | |
tree | 5788b33d5438dc61a3a947884f37c9fded379a09 /init.el | |
parent | a4afa04a34dcbd06bd2d87ed45d2a421afd9f795 (diff) |
updated denote config
Diffstat (limited to 'init.el')
-rw-r--r-- | init.el | 24 |
1 files changed, 24 insertions, 0 deletions
@@ -14,6 +14,22 @@ ;; cursor colour (set-cursor-color "magenta") +;; timestamps +;; from: https://gist.github.com/takehiko/306021460b21f5d1520c32293cd831e0 +(defun mrl/insert-timestamp-default () + "Insert the current timestamp" + (interactive) + (insert (current-time-string))) + +(defun mrl/insert-timestamp-iso () + "Insert the current timestamp (ISO 8601 format)" + (interactive) + (insert + (concat + (format-time-string "%Y-%m-%dT%T") + ((lambda (x) (concat (substring x 0 3) ":" (substring x 3 5))) + (format-time-string "%z"))))) + ;; theme (load-theme 'light-blue) @@ -234,12 +250,20 @@ Restart works only on graphic display." (use-package denote :ensure t + :init + (add-hook 'dired-mode-hook #'denote-dired-mode) :config (setq denote-directory (expand-file-name "~/Documents/denote/")) (setq denote-known-keywords '("emacs" "clojure" "org-mode" "work")) (setq denote-file-type nil) (setq denote-prompts '(title keywords)) (setq denote-date-prompt-use-org-read-date t) + (defun mrl/denote-journal () + "Create an entry tagged 'journal' with the date as its title." + (interactive) + (denote + (format-time-string "%A %e %B %Y") ; format like Tuesday 14 June 2022 + '("journal"))) ; multiple keywords are a list of strings: '("one" "two") ) ;; Enable vertico |