fix denote format of buffer name

This commit is contained in:
Chris Cochrun 2024-01-10 11:43:06 -06:00
parent d038151f4f
commit b849691a77
2 changed files with 2 additions and 18 deletions

View file

@ -1430,18 +1430,10 @@ I might try switching to and using denote instead of Org Roam. Denote doesn't us
denote-modules '(project xref ffap)
denote-known-keywords '("emacs" "bible" "jesus" "tfc" "lesson" "it" "dev"))
(defun chris/denote-rename-buffer-with-prefix (&optional buffer)
"Rename denote buffers with title and then with the prefix D>."
(if (denote-file-is-note-p (buffer-file-name))
(progn (denote-rename-buffer-with-title)
(rename-buffer (concat "D> " (buffer-name (or buffer (current-buffer) title :unique)))))))
(setq denote-rename-buffer-format "[D] %>t")
(denote-rename-buffer-mode +1)
(setq denote-rename-buffer-function 'chris/denote-rename-buffer-with-prefix)
(setq denote-org-front-matter
"#+TITLE: %1$s\n#+AUTHOR: Chris Cochrun\n#+CREATED: %2$s\n#+filetags: %3$s\n#+identifier: %4$s\n")
(add-hook 'dired-mode-hook #'denote-dired-mode-in-directories)
;; (defvar denote-faces--file-name-regexp

10
init.el
View file

@ -950,18 +950,10 @@ much faster. The hope is to also make this a faster version of imenu."
denote-modules '(project xref ffap)
denote-known-keywords '("emacs" "bible" "jesus" "tfc" "lesson" "it" "dev"))
(defun chris/denote-rename-buffer-with-prefix (&optional buffer)
"Rename denote buffers with title and then with the prefix D>."
(if (denote-file-is-note-p (buffer-file-name))
(progn (denote-rename-buffer-with-title)
(rename-buffer (concat "D> " (buffer-name (or buffer (current-buffer) title :unique)))))))
(setq denote-rename-buffer-format "[D] %>t")
(denote-rename-buffer-mode +1)
(setq denote-rename-buffer-function 'chris/denote-rename-buffer-with-prefix)
(setq denote-org-front-matter
"#+TITLE: %1$s\n#+AUTHOR: Chris Cochrun\n#+CREATED: %2$s\n#+filetags: %3$s\n#+identifier: %4$s\n")
(add-hook 'dired-mode-hook #'denote-dired-mode-in-directories)
;; (defvar denote-faces--file-name-regexp