diff options
| author | Craig Jennings <c@cjennings.net> | 2026-06-24 09:51:38 -0400 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-06-24 09:51:38 -0400 |
| commit | 53c20d92c0bc7698446de8711c8705c14ee70cc5 (patch) | |
| tree | d5fd25ca1ac432442d589de7567ee3f9deaab8f2 /modules/org-roam-config.el | |
| parent | 9c8b859cffdb7dda5ed4ffcb94d7e3b66587ad35 (diff) | |
| download | dotemacs-53c20d92c0bc7698446de8711c8705c14ee70cc5.tar.gz dotemacs-53c20d92c0bc7698446de8711c8705c14ee70cc5.zip | |
chore(elisp): clear byte-compile warnings (org, music, org-roam)
Move own-command bindings out of use-package :bind to keymap-global-set / with-eval-after-load (C-c C-a org-appear-toggle, R music radio-station, C-c n r/t roam recipe/topic) — same keys, verified live. Pull music-config helper defuns out of :config/with-eval-after-load to top level (their proper home; emms referenced only at call time via declare-function). Swap obsolete org-show-all for org-fold-show-all (9.6). Plus declare-function/defvar for lazy symbols. No behavior change; full suite + launch smoke green.
Claude-Session: https://claude.ai/code/session_01BqrdWUo9GcznYX2pZr76gZ
Diffstat (limited to 'modules/org-roam-config.el')
| -rw-r--r-- | modules/org-roam-config.el | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/modules/org-roam-config.el b/modules/org-roam-config.el index 40df688d9..c6083c8fb 100644 --- a/modules/org-roam-config.el +++ b/modules/org-roam-config.el @@ -32,6 +32,24 @@ ;; capture template never reaches org-roam-dailies (the foreign-special-var trap). (defvar org-roam-dailies-capture-templates) +;; External variables, declared special so byte-compilation doesn't treat them +;; as free references/assignments. Owned by org and org-roam-dailies. +(defvar org-agenda-timegrid-use-ampm) +(defvar org-roam-dailies-map) +(defvar org-last-state) + +;; External functions, declared so the byte-compiler knows they're defined at +;; runtime by their respective packages. +(declare-function org-roam-node-tags "org-roam") +(declare-function org-roam-node-file "org-roam") +(declare-function org-roam-node-list "org-roam") +(declare-function org-roam-dailies--capture "org-roam-dailies") +(declare-function org-capture-get "org-capture") +(declare-function org-at-heading-p "org") +(declare-function org-heading-components "org") +(declare-function org-copy-subtree "org") +(declare-function org-cut-subtree "org") + ;; ---------------------------------- Org Roam --------------------------------- (defconst cj/--org-roam-dailies-head @@ -76,8 +94,6 @@ FILETAGS and TITLE must sit on separate lines so Org parses the :bind (("C-c n l" . org-roam-buffer-toggle) ("C-c n f" . org-roam-node-find) ("C-c n p" . cj/org-roam-find-node-project) - ("C-c n r" . cj/org-roam-find-node-recipe) - ("C-c n t" . cj/org-roam-find-node-topic) ("C-c n i" . org-roam-node-insert) ("C-c n w" . cj/org-roam-find-node-webclip) :map org-mode-map @@ -191,6 +207,11 @@ created in that subdirectory of `org-roam-directory'." (interactive) (cj/org-roam-find-node "Recipe" "r" (concat roam-dir "templates/recipe.org") "recipes/")) +;; Bound after their defuns (not in the use-package :bind) so the byte-compiler +;; doesn't see both a :bind autoload and the real defun as two definitions. +(keymap-global-set "C-c n r" #'cj/org-roam-find-node-recipe) +(keymap-global-set "C-c n t" #'cj/org-roam-find-node-topic) + ;; ---------------------- Org Capture After Finalize Hook ---------------------- (defun cj/org-roam-add-node-to-agenda-files-finalize-hook () |
