tweaks to denote, org, and dnd

This commit is contained in:
Chris Cochrun 2024-08-28 13:27:18 -05:00
parent 0060ede50a
commit bbac8109c8
2 changed files with 56 additions and 10 deletions

30
init.el
View file

@ -671,6 +671,7 @@ much faster. The hope is to also make this a faster version of imenu."
org-directory "~/docs/notes")
(add-hook 'org-mode-hook 'chris/org-mode-setup)
(setq org-refile-targets '((org-agenda-files :maxlevel . 6) ("/home/chris/docs/todo/archive.org" :maxlevel . 6)))
(org-babel-do-load-languages 'org-babel-load-languages
'((emacs-lisp . t)
@ -944,7 +945,7 @@ much faster. The hope is to also make this a faster version of imenu."
"Function to return the lesson file that is needed for TFC plan capture and move to correct position for plan insertion"
(interactive)
;; (unless org-roam-mode (org-roam-mode +1))
(let* ((files (denote-all-files))
(let* ((files (denote-directory-files))
(lessons (remove nil
(cl-loop for file in files
collect (if (string-match "lessons/" file) file))))
@ -1020,7 +1021,7 @@ much faster. The hope is to also make this a faster version of imenu."
:config
(require 'denote-org-extras)
(setq denote-directory "/home/chris/docs/notes"
denote-dired-directories '("/home/chris/docs/notes")
denote-dired-directories '("/home/chris/docs/notes" "/home/chris/docs/notes/lessons")
denote-dired-directories-include-subdirectories t
denote-modules '(project xref ffap)
denote-known-keywords '("emacs" "bible" "jesus" "tfc" "lesson" "it" "dev"))
@ -1058,7 +1059,8 @@ much faster. The hope is to also make this a faster version of imenu."
:keymaps 'override
"nf" 'denote-open-or-create
"nb" 'denote-backlinks
"nk" 'denote-keywords-add))
"nk" 'denote-keywords-add
"nl" 'denote-link-or-create))
(use-package org-present
:commands org-present
@ -4012,6 +4014,8 @@ interfere with the default `bongo-playlist-buffer'."
"N" 'mastodon-notifications--timeline))
(load (concat user-emacs-directory "bible.el"))
(add-to-list 'warning-suppress-types '(org-element))
(add-to-list 'warning-suppress-log-types '(org-element))
(add-to-list 'load-path "/home/chris/dev/emacs-rpgdm/")
(use-package rpgdm
@ -4019,8 +4023,24 @@ interfere with the default `bongo-playlist-buffer'."
(defun chris/dnd-skill-check (&optional skill)
"Roll for a skill check using skill or prompting for one."
(interactive)
(let* ((skills (org-table-get-remote-range "20240826T061454.312500:skills" "$I..II"))
(skill (if skill skill (completing-read "Which skill: " ))))))
(let* ((skills (with-current-buffer
(find-file-noselect "~/docs/notes/20240804T132141--dungeons-and-dragons__area_fun_personal.org")
(org-table-get-remote-range
"skills" "@I$1..@II$2")))
(skill (completing-read "Which skill: "
(seq-filter
'stringp
(cl-loop for e in skills
collect
(if (= 0 (string-to-number
(substring-no-properties e)))
(substring-no-properties e))))))
(value (substring-no-properties
(nth (+ 1 (cl-position
skill skills
:test 'string=))
skills))))
(message value)))
:general
(chris/leader-keys