1
0
Fork 0

Compare commits

..

4 commits

4 changed files with 21 additions and 28 deletions

View file

@ -4,7 +4,7 @@
;; Author: Tom Willemse <tom@ryuslash.org> ;; Author: Tom Willemse <tom@ryuslash.org>
;; Keywords: local ;; Keywords: local
;; Version: 2024.0202.103900 ;; Version: 2024.0205.222004
;; Package-Requires: (oni-data-dir oni-embrace oni-hydra expand-region multiple-cursors gcmh diminish ws-butler which-key insert-char-preview mixed-pitch ace-window vertico marginalia orderless consult embark docstr mini-frame) ;; Package-Requires: (oni-data-dir oni-embrace oni-hydra expand-region multiple-cursors gcmh diminish ws-butler which-key insert-char-preview mixed-pitch ace-window vertico marginalia orderless consult embark docstr mini-frame)
;; This program is free software; you can redistribute it and/or modify ;; This program is free software; you can redistribute it and/or modify
@ -386,6 +386,9 @@ _s_: String list"
(append '(cursor-intangible t) minibuffer-prompt-properties)) (append '(cursor-intangible t) minibuffer-prompt-properties))
(setq read-extended-command-predicate 'command-completion-default-include-p) (setq read-extended-command-predicate 'command-completion-default-include-p)
(setq read-buffer-completion-ignore-case t)
(setq read-file-name-completion-ignore-case t)
(setq completion-ignore-case t)
;;; Vertico ;;; Vertico

View file

@ -4,7 +4,7 @@
;; Author: Tom Willemse <tom@ryuslash.org> ;; Author: Tom Willemse <tom@ryuslash.org>
;; Keywords: local ;; Keywords: local
;; Version: 2023.1107.155953 ;; Version: 2024.0205.235009
;; Package-Requires: (elfeed olivetti) ;; Package-Requires: (elfeed olivetti)
;; This program is free software; you can redistribute it and/or modify ;; This program is free software; you can redistribute it and/or modify
@ -134,7 +134,9 @@
(defvar oni-elfeed-blabbermouth-favourite-tagger (defvar oni-elfeed-blabbermouth-favourite-tagger
(elfeed-make-tagger :feed-url (rx "blabbermouth.net") (elfeed-make-tagger :feed-url (rx "blabbermouth.net")
:entry-title (rx (or "SLIPKNOT" :entry-title (rx (or "SLIPKNOT"
(seq "DREAM" whitespace "THEATER"))) (seq "DREAM" whitespace "THEATER")
(seq "BLIND" whitespace "GUARDIAN")
"MASTODON"))
:add 'favourite) :add 'favourite)
"Tagger that highlights specific bands from Blabbermouth.") "Tagger that highlights specific bands from Blabbermouth.")

View file

@ -4,7 +4,7 @@
;; Author: Tom Willemse <tom@ryuslash.org> ;; Author: Tom Willemse <tom@ryuslash.org>
;; Keywords: local ;; Keywords: local
;; Version: 2023.0805.233914 ;; Version: 2024.0212.234817
;; Package-Requires: (oni-org org-roam) ;; Package-Requires: (oni-org org-roam)
;; This program is free software; you can redistribute it and/or modify ;; This program is free software; you can redistribute it and/or modify
@ -33,7 +33,7 @@
(require 'seq) (require 'seq)
(setq org-roam-completion-everywhere t) (setq org-roam-completion-everywhere t)
(setq org-roam-directory (expand-file-name "~/documents/exocortex/")) (setq org-roam-directory (expand-file-name "~/documents/exocortex-novus/reference/"))
(add-hook 'org-roam-mode-hook 'visual-line-mode) (add-hook 'org-roam-mode-hook 'visual-line-mode)
@ -49,23 +49,6 @@
(not (window-minibuffer-p))) (not (window-minibuffer-p)))
(org-roam-buffer-toggle)))) (org-roam-buffer-toggle))))
;;; Taken from/inspired by
;;; https://magnus.therning.org/2021-07-23-keeping-todo-items-in-org-roam-v2.html
(defun oni-org-roam-update-todo-files (&rest _)
"Set org-agenda-files to all roam files with a task in them."
(setq org-agenda-files (seq-uniq (append org-agenda-files (oni-org-roam--todo-files)))))
(defun oni-org-roam--todo-files ()
"Get a list of all the files in the org-roam database with tasks in them."
(let ((nodes (seq-filter #'oni-org-roam--todo-node-p (org-roam-node-list))))
(seq-uniq (seq-map #'org-roam-node-file nodes))))
(defun oni-org-roam--todo-node-p (node)
"Predicate to check whether or not NODE is task."
(let ((state (org-roam-node-todo node)))
(and (not (null state))
(not (string= state "FINISHED")))))
(defun oni-org-roam--books-to-read () (defun oni-org-roam--books-to-read ()
(org-roam-db-query (concat "select properties, file, title, group_concat(tag) as node_tags " (org-roam-db-query (concat "select properties, file, title, group_concat(tag) as node_tags "
"from nodes " "from nodes "
@ -99,8 +82,6 @@
(slot . 0) (slot . 0)
(window-width . 66))) (window-width . 66)))
(advice-add 'org-agenda :before #'oni-org-roam-update-todo-files)
;;; These two properties are used a lot when working in org-roam'. ROAM_REFS' ;;; These two properties are used a lot when working in org-roam'. ROAM_REFS'
;;; is used to specify a URL that (if pointed to) should be considered a ;;; is used to specify a URL that (if pointed to) should be considered a
;;; reference to a particular note. ROAM_ALIASES' sets up additional names for ;;; reference to a particular note. ROAM_ALIASES' sets up additional names for
@ -120,6 +101,15 @@
(cons '(org-roam-backlinks-section :unique t) (cons '(org-roam-backlinks-section :unique t)
(delete 'org-roam-backlinks-section org-roam-mode-sections))) (delete 'org-roam-backlinks-section org-roam-mode-sections)))
;; Show only the current element, not the whole heading for the org-roam-buffer
;; preview.
(defun oni-org-roam-preview-element-function ()
(let ((element (org-element-at-point)))
(buffer-substring-no-properties (org-element-property :begin element)
(org-element-property :end element))))
(setq org-roam-preview-function #'oni-org-roam-preview-element-function)
(org-roam-db-autosync-mode) (org-roam-db-autosync-mode)
(provide 'oni-org-roam) (provide 'oni-org-roam)

View file

@ -4,7 +4,7 @@
;; Author: Tom Willemse <tom@ryuslash.org> ;; Author: Tom Willemse <tom@ryuslash.org>
;; Keywords: local ;; Keywords: local
;; Version: 2024.0201.163746 ;; Version: 2024.0201.164329
;; Package-Requires: (oni-yasnippet oni-alert oni-hydra org org-bullets org-edna diminish all-the-icons olivetti form-feed org-pretty-table ob-async) ;; Package-Requires: (oni-yasnippet oni-alert oni-hydra org org-bullets org-edna diminish all-the-icons olivetti form-feed org-pretty-table ob-async)
;; This program is free software; you can redistribute it and/or modify ;; This program is free software; you can redistribute it and/or modify
@ -638,9 +638,7 @@ also move point to the start of the heading."
(org-roam-db-query (org-roam-db-query
[:select :distinct file :from nodes :where (= todo $s1)] "TODO"))) [:select :distinct file :from nodes :where (= todo $s1)] "TODO")))
(setq org-agenda-files (setq org-agenda-files (list oni-org-todo-main-file))
(cons oni-org-todo-main-file
(oni-org-roam-todo-files)))
(setq org-agenda-tags-todo-honor-ignore-options t) (setq org-agenda-tags-todo-honor-ignore-options t)
(setq org-agenda-todo-ignore-scheduled 'future) (setq org-agenda-todo-ignore-scheduled 'future)
(setq org-agenda-restore-windows-after-quit t) (setq org-agenda-restore-windows-after-quit t)