summaryrefslogtreecommitdiff
path: root/.config/emacs/modules/bd--notes.el
diff options
context:
space:
mode:
authorbd <bdunahu@operationnull.com>2025-12-13 23:43:10 -0500
committerbdunahu <bdunahu@operationnull.com>2026-01-03 21:46:06 -0700
commit288ccb3984c7cb46b67d0f6bf7fb6d53c5d7a2d3 (patch)
tree47091f5aeede90e1364546e8122cd55e6d7f2971 /.config/emacs/modules/bd--notes.el
parentdf14036eb22ff9326c2806eb3f8cafc0d3042efa (diff)
guix: full refactor of configuration structure
Diffstat (limited to '.config/emacs/modules/bd--notes.el')
-rw-r--r--.config/emacs/modules/bd--notes.el77
1 files changed, 0 insertions, 77 deletions
diff --git a/.config/emacs/modules/bd--notes.el b/.config/emacs/modules/bd--notes.el
deleted file mode 100644
index 13f80f4..0000000
--- a/.config/emacs/modules/bd--notes.el
+++ /dev/null
@@ -1,77 +0,0 @@
-;;; -*- lexical-binding: t; -*-
-;;; Commentary:
-;;; Code:
-
-
-(defvar scratch-buffer nil
- "Non-nil if the current buffer is a scratch buffer.")
-(make-variable-buffer-local 'scratch-buffer)
-(defun bd/send-to-scratch ()
- "Creates/switches to the scratch for `major-mode',
-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)))
- (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)))
- (current-buffer)))))
-(keymap-global-set "C-c s" #'scratch-buffer)
-(keymap-global-set "C-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))))
-(advice-add 'scratch-buffer :after (lambda () (setq-local scratch-buffer t)))
-
-(use-package denote
- :defer 1
- :hook
- ((dired-mode . denote-dired-mode-in-directories))
- :bind (("C-c d d" . 'denote)
- ("C-c d f" . 'denote-open-or-create)
- :map org-mode-map
- ("C-c l" . 'denote-link))
- :config
-
- (defconst bd/denote-skribe-front-matter
- "(post
- :title \"%s\"
- :date %s
- :tags '(\"%s\")
- ;; identifier: %s
-\n\n)")
- (defun bd/denote-skribe-format-date (date)
- "Format DATE as a scheme procedure."
- (format-time-string "(make-date* %Y %m %d %H %M)" date))
- (defun bd/denote-format-keywords-for-skribe-front-matter (keywords)
- "Format front matter KEYWORDS for skribe file type.
-KEYWORDS is a list of strings."
- (string-join keywords "\" \""))
- :config
- (setopt denote-file-type 'org
- denote-known-keywords
- '("ss" "writing" "reading" "art"
- "csu" "umass" "cs" "guix"
- "emacs" "programs" "mem")
- denote-directory (expand-file-name "~/dc/")
- denote-prompts '(title file-type keywords subdirectory)
- denote-dired-directories (list denote-directory)))
-
-(use-package denote-journal
- :bind (("C-c d j" . 'denote-journal-new-or-existing-entry))
- :config
- (setopt denote-journal-directory (expand-file-name "~/dc/log")
- denote-journal-title-format 'day-date-month-year))
-
-
-(provide 'bd--notes)
-;;; bd--notes.el ends here