Fix shared-org-file-p to handle nil shared-org-dir in container
The org-schedule advice calls imalison:shared-org-file-p which uses file-truename on imalison:shared-org-dir. When this var is nil (as in the container), it causes 'Wrong type argument: arrayp, nil' error. Override the function after loading tangled config to check for nil first.
This commit is contained in:
@@ -67,6 +67,15 @@ let
|
|||||||
"No-op stub for org-bullets-mode (package not available in container)."
|
"No-op stub for org-bullets-mode (package not available in container)."
|
||||||
nil)
|
nil)
|
||||||
|
|
||||||
|
;; Override shared-org-file-p to handle nil imalison:shared-org-dir
|
||||||
|
;; The original calls (file-truename imalison:shared-org-dir) which errors when nil
|
||||||
|
(defun imalison:shared-org-file-p ()
|
||||||
|
"Check if current file is in the shared org directory.
|
||||||
|
Returns nil if imalison:shared-org-dir is not set."
|
||||||
|
(and imalison:shared-org-dir
|
||||||
|
(string-prefix-p (file-truename imalison:shared-org-dir)
|
||||||
|
(file-truename default-directory))))
|
||||||
|
|
||||||
;; Helper functions used by org-agenda-custom-commands
|
;; Helper functions used by org-agenda-custom-commands
|
||||||
;; These are defined in README.org but needed for custom views
|
;; These are defined in README.org but needed for custom views
|
||||||
(defun imalison:compare-int-list (a b)
|
(defun imalison:compare-int-list (a b)
|
||||||
|
|||||||
Reference in New Issue
Block a user