diff options
Diffstat (limited to '.config/emacs/modules/bd--notes.el')
-rw-r--r-- | .config/emacs/modules/bd--notes.el | 30 |
1 files changed, 9 insertions, 21 deletions
diff --git a/.config/emacs/modules/bd--notes.el b/.config/emacs/modules/bd--notes.el index 80d0a8c..aa1f4b1 100644 --- a/.config/emacs/modules/bd--notes.el +++ b/.config/emacs/modules/bd--notes.el @@ -11,24 +11,24 @@ then pastes the active region." (interactive) (let* ((mode major-mode) - (name (format "*scratch for %s*" mode)) - (contents (when (region-active-p) - (buffer-substring-no-properties - (region-beginning) (region-end)))) - (buf (get-buffer name))) + (name (format "*scratch for %s*" mode)) + (contents (when (region-active-p) + (buffer-substring-no-properties + (region-beginning) (region-end)))) + (buf (get-buffer name))) (pop-to-buffer (with-current-buffer (get-buffer-create name) (funcall mode) (setq-local scratch-buffer t) (when contents - (insert (format "\n\n%s" contents))) + (insert (format "\n\n%s" contents))) (current-buffer))))) (keymap-global-set "C-c s" #'bd/send-to-scratch) ;; default *scratch* must have var set (add-hook 'emacs-startup-hook - (lambda () - (with-current-buffer "*scratch*" - (setq-local scratch-buffer t)))) + (lambda () + (with-current-buffer "*scratch*" + (setq-local scratch-buffer t)))) (advice-add 'scratch-buffer :after (lambda () (setq-local scratch-buffer t))) (use-package denote @@ -55,18 +55,6 @@ then pastes the active region." "Format front matter KEYWORDS for skribe file type. KEYWORDS is a list of strings." (string-join keywords "\" \"")) - (add-to-list 'denote-file-types '(skribe - :extension ".skr" - :date-function bd/denote-skribe-format-date - :front-matter bd/denote-skribe-front-matter - :title-key-regexp "^:title\\s-*" - :title-value-function identity - :title-value-reverse-function denote-trim-whitespace - :keywords-key-regexp "^:tags\\s-*" - :keywords-value-function bd/denote-format-keywords-for-skribe-front-matter - :keywords-value-reverse-function denote-extract-keywords-from-front-matter - :link my-denote-shell-link-format - :link-in-context-regexp my-denote-shell-link-in-context-regexp)) :custom (denote-file-type 'org) (denote-known-keywords '("ss" "writing" "reading" "art" "csu" "umass" "cs" "guix" "emacs" "programs" "mem")) |