From 85e99bfcdc4314a2c27f3bbb5f07858626f910a6 Mon Sep 17 00:00:00 2001 From: fz0x1 Date: Tue, 31 Dec 2024 18:33:12 +0100 Subject: [PATCH] 202412311735666392 HAPPY NEW YEAR --- global/.config/doom/config.el | 69 +++++++++++++++++++++++++++--- global/.config/doom/packages.el | 3 ++ global/.config/promnesia/config.py | 2 +- 3 files changed, 66 insertions(+), 8 deletions(-) diff --git a/global/.config/doom/config.el b/global/.config/doom/config.el index dcbc131..c17672a 100644 --- a/global/.config/doom/config.el +++ b/global/.config/doom/config.el @@ -81,17 +81,18 @@ (setq org-adapt-indentation t) (setq org-startup-indented t) (setq org-indent-mode t) -(setq org-archive-location "%s_archive::") +(setq org-archive-location "~/org/archive/%s_archive::") +;; (setq org-archive-location "%s_archive::") (add-hook 'org-mode-hook (lambda () (visual-line-mode 1))) ;; -(setq org-agenda-files '("~/org/grocery.org" "~/org/todos.org" "~/org/inbox.org" "~/org/priorities.org" "~/org/para.org")) -(setq org-agenda-files - (append org-agenda-files - (directory-files-recursively "~/org/braindump/" "\\.org$"))) +(setq org-agenda-files '("~/org/grocery.org" "~/org/todos.org" "~/org/inbox.org" "~/org/para.org" "~/org/braindump.org")) +;; (setq org-agenda-files +;; (append org-agenda-files +;; (directory-files-recursively "~/org/braindump/" "\\.org$"))) -(setq org-refile-targets '((org-agenda-files :maxlevel . 1))) +(setq org-refile-targets '((org-agenda-files :maxlevel . 3))) (setq org-refile-use-cache t) ;; clear cache every 5 minutes @@ -123,6 +124,60 @@ (not (member "ATTACH" (org-get-tags))))) ) +(use-package denote + :hook (dired-mode . denote-dired-mode) + :config + (setq denote-directory (expand-file-name "~/org/notes/")) + + ;; Automatically rename Denote buffers when opening them so that + ;; instead of their long file name they have, for example, a literal + ;; "[D]" followed by the file's title. Read the doc string of + ;; `denote-rename-buffer-format' for how to modify this. + (denote-rename-buffer-mode 1)) + +;; (use-package citar +;; :no-require +;; :custom +;; (org-cite-global-bibliography '("~/bib/main.bib")) +;; (org-cite-insert-processor 'citar) +;; (org-cite-follow-processor 'citar) +;; (org-cite-activate-processor 'citar) +;; (citar-bibliography org-cite-global-bibliography)) + +;; (use-package citar-denote +;; :custom +;; (citar-open-always-create-notes t) +;; :init +;; (citar-denote-mode) +;; :bind +;; (("C-c w b c" . citar-create-note) +;; ("C-c w b n" . citar-denote-open-note) +;; ("C-c w b x" . citar-denote-nocite) +;; :map org-mode-map +;; ("C-c w b k" . citar-denote-add-citekey) +;; ("C-c w b K" . citar-denote-remove-citekey) +;; ("C-c w b d" . citar-denote-dwim) +;; ("C-c w b e" . citar-denote-open-reference-entry))) + +(map! :leader + (:prefix ("d" . "denote") ;; Основное меню "denote" + :desc "Create a new note" "n" #'denote + :desc "Rename a note" "r" #'denote-rename-file + :desc "Create a link" "l" #'denote-link + :desc "Show backlinks" "b" #'denote-backlinks + :desc "Sort dired" "d" #'denote-sort-dired)) + +;; (:prefix ("c" . "citar-denote") +;; :desc "Citar create note" "n" #'citar-denote-create-note +;; :desc "Citar open denote note" "o" #'citar-denote-open-note +;; :desc "Citar open nocite entry" "x" #'citar-denote-nocite + +;; (:map org-mode-map +;; :desc "Add cite key or convert an existing Denote file to a bib note" "a" #'citar-denote-add-citekey +;; :desc "Remove cite key from a file" "r" #'citar-denote-remove-citekey +;; :desc "Open attachments menu" "m" #'citar-denote-dwim +;; :desc "Open bib entry for editing" "e" #'citar-denote-open-reference-entry)))) + (setq org-capture-templates '( ("p" "Private" @@ -173,7 +228,7 @@ ("L" "Unselected web capture" entry (file+headline "~/org/inbox.org" "Web links") - "* [%<%Y-%m-%d>] [[%:link][%(transform-square-brackets-to-round-ones \"%:description\")]]\n%? :inbox:\n:PROPERTIES:\n:ID: %(org-id-new)\n:END:\n" + "* [%<%Y-%m-%d>] [[%:link][%(transform-square-brackets-to-round-ones \"%:description\")]] %? :inbox:\n:PROPERTIES:\n:ID: %(org-id-new)\n:END:\n" :empty-lines 1))) (setq org-todo-keywords diff --git a/global/.config/doom/packages.el b/global/.config/doom/packages.el index b3322c7..e0f2080 100644 --- a/global/.config/doom/packages.el +++ b/global/.config/doom/packages.el @@ -47,3 +47,6 @@ ;; (unpin! pinned-package another-pinned-package) ;; ...Or *all* packages (NOT RECOMMENDED; will likely break things) ;; (unpin! t) +(package! denote) +;; (package! citar) +;; (package! citar-denote) diff --git a/global/.config/promnesia/config.py b/global/.config/promnesia/config.py index 53f9442..b712e4c 100644 --- a/global/.config/promnesia/config.py +++ b/global/.config/promnesia/config.py @@ -15,7 +15,7 @@ SOURCES = [ # ) Source( auto.index, - "/home/fz0x1/org/braindump/", + "/home/fz0x1/org/braindump.org", name="pkm", ignored=["*.html", "*.gpg"], ),