From ecc2b0ed676f0825bad624131dbe70a5f52ee0e1 Mon Sep 17 00:00:00 2001 From: Frederik Vanrenterghem Date: Mon, 4 Nov 2024 19:39:31 +0800 Subject: [PATCH] Change Org configuration: - Configure refile to use all notes as target options. - Mark time when todo item is closed. Use devdocs for offline documentation consultation. --- emacs/.emacs.d/init.el | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/emacs/.emacs.d/init.el b/emacs/.emacs.d/init.el index 0d4559a..8c72ba7 100644 --- a/emacs/.emacs.d/init.el +++ b/emacs/.emacs.d/init.el @@ -138,9 +138,22 @@ vc-follow-symlinks t '(("P" "Expired calendar events" ((tags "TIMESTAMP<=\"\""))) ("n" "Agenda and all TODOs" ((agenda "") (alltodo ""))))) :config + ;; Configure refile + (defun my/opened-buffer-files () + "Return the list of org files currently opened in emacs" + (delq nil + (mapcar (lambda (x) + (if (and (buffer-file-name x) + (string-match "\\.org$" + (buffer-file-name x))) + (buffer-file-name x))) + (buffer-list)))) + (setq org-refile-targets `((my/opened-buffer-files :maxlevel . 9) + (,(file-expand-wildcards "~/Nextcloud/notes/*.org") :maxlevel . 1))) (setq org-agenda-skip-scheduled-if-done t) (setq org-agenda-skip-deadline-if-done t) (setq org-agenda-start-on-weekday nil) + (setq org-log-done 'time) ;; Automatically flow lines based on window width and use ;; variable width fonts in org-mode. (add-hook 'org-mode-hook 'visual-line-mode) @@ -215,7 +228,7 @@ vc-follow-symlinks t '("8d146df8bd640320d5ca94d2913392bc6f763d5bc2bb47bed8e14975017eea91" "9a977ddae55e0e91c09952e96d614ae0be69727ea78ca145beea1aae01ac78d2" "0cf95236abcf59e05b1ea69b4edd53d293a5baec4fe4c3484543fee99bfd2204" "80b00f3bf7cdbdca6c80aadfbbb03145f3d0aacf6bf2a559301e61109954e30a" default)) '(org-export-backends '(ascii html icalendar latex md odt)) '(package-selected-packages - '(straight calfw calfw-org engrave-faces org-caldav nov eat mu4e ellama emms mpdel-embark libmpdel pass password-store fontaine osm orderless embark-consult embark consult jinx dired-preview ftable flx nerd-icons-dired nerd-icons all-the-icons-dired marginalia vertico denote ox-rss org-ql org-contrib mustache org-static-blog haskell-mode julia-mode elfeed-protocol ack company magit auctex lsp-mode elpy ## org htmlize leuven-theme lua-mode ess-smart-underscore ess-R-data-view ess)) + '(devdocs straight calfw calfw-org engrave-faces org-caldav nov eat mu4e ellama emms mpdel-embark libmpdel pass password-store fontaine osm orderless embark-consult embark consult jinx dired-preview ftable flx nerd-icons-dired nerd-icons all-the-icons-dired marginalia vertico denote ox-rss org-ql org-contrib mustache org-static-blog haskell-mode julia-mode elfeed-protocol ack company magit auctex lsp-mode elpy ## org htmlize leuven-theme lua-mode ess-smart-underscore ess-R-data-view ess)) '(use-package-compute-statistics t)) (custom-set-faces ;; custom-set-faces was added by Custom. @@ -548,6 +561,11 @@ vc-follow-symlinks t :variable-pitch-height 1.0 :line-spacing 1)))) +(use-package devdocs + :ensure t + :bind + ("C-h D" . devdocs-lookup)) + ;; Custom functions ;; Might want to run this automatically -- 2.39.5