77; ; URL: https://github.com/meedstrom/org-node
88; ; Created: 2024-04-13
99; ; Keywords: org, hypermedia
10- ; ; Package-Requires: ((emacs "29.1") (llama "1.0") (magit-section "4.3.0") (org-mem "0.32.0"))
10+ ; ; Package-Requires: ((emacs "29.1") (cond-let "0.2") ( llama "1.0") (magit-section "4.3.0") (org-mem "0.32.0"))
1111
1212; ;; Commentary:
1313
130130(require 'cl-lib )
131131(require 'fileloop )
132132(require 'llama )
133+ (require 'cond-let )
133134(require 'org-faces )
134135(require 'org-mem )
135136(require 'org-mem-updater )
@@ -486,11 +487,11 @@ aliases."
486487(defun org-node-prepend-olp (node title )
487488 " Prepend NODE\\= 's outline path to TITLE."
488489 (list title
489- (if-let* ((fontified-ancestors
490- (cl-loop
491- for ancestor in (org-mem-olpath-with-file-title node)
492- collect
493- (propertize ancestor 'face 'org-node-parent ))))
490+ (if-let ((fontified-ancestors
491+ (cl-loop
492+ for ancestor in (org-mem-olpath-with-file-title node)
493+ collect
494+ (propertize ancestor 'face 'org-node-parent ))))
494495 (concat (string-join fontified-ancestors " > " ) " > " )
495496 " " )
496497 " " ))
@@ -697,7 +698,7 @@ used as INITIAL-INPUT in `completing-read'."
697698 (when (and (org-mem-entry-id entry)
698699 (funcall org-node-filter-fn entry))
699700 (dolist (ref (org-mem-entry-roam-refs entry))
700- (puthash (concat (when-let* ((type (gethash ref org-mem--roam-ref<>type)))
701+ (puthash (concat (when-let ((type (gethash ref org-mem--roam-ref<>type)))
701702 (propertize (concat type " :" ) 'face 'org-node-cite-type ))
702703 (propertize ref 'face 'org-node-cite ))
703704 entry
@@ -1275,7 +1276,7 @@ type the name of a node that does not exist. That enables this
12751276 ; ; expansions %(org-capture-get :title) and %(org-capture-get :id) in the
12761277 ; ; template string.
12771278 (apply #'org-capture-put (org-node-capture-infer-title-etc))
1278- (if-let* ((node (org-capture-get :existing-node )))
1279+ (if-let ((node (org-capture-get :existing-node )))
12791280 (org-node-goto node t )
12801281 (org-node-new-file (org-capture-get :title )
12811282 (org-capture-get :id ))
@@ -2245,8 +2246,8 @@ user quits, do not apply any modifications."
22452246 (setq default-directory
22462247 (read-directory-name
22472248 " Directory with Org notes to operate on: " ))))
2248- (when-let* ((bufs (seq-filter (## string-search " *grep*" (buffer-name % ))
2249- (buffer-list ))))
2249+ (when-let ((bufs (seq-filter (## string-search " *grep*" (buffer-name % ))
2250+ (buffer-list ))))
22502251 (when (yes-or-no-p " Kill other *grep* buffers to be sure this works?" )
22512252 (mapc #'kill-buffer bufs)))
22522253 (let* ((filename (file-relative-name (read-file-name " File to rename: " )))
@@ -2917,7 +2918,7 @@ As bonus, do not land on an inlinetask, seek a real heading."
29172918(defun org-node-complete-at-point ()
29182919 " Expand word at point to a known node title, and linkify.
29192920Designed for `completion-at-point-functions' ."
2920- (when-let* ((bounds (bounds-of-thing-at-point 'word )))
2921+ (when-let ((bounds (bounds-of-thing-at-point 'word )))
29212922 (and (not (org-in-src-block-p ))
29222923 (not (save-match-data (org-in-regexp org-link-any-re)))
29232924 (list (car bounds)
@@ -2926,7 +2927,7 @@ Designed for `completion-at-point-functions'."
29262927 :exclusive 'no
29272928 :exit-function
29282929 (lambda (text _ )
2929- (when-let* ((id (gethash text org-mem--title<>id)))
2930+ (when-let ((id (gethash text org-mem--title<>id)))
29302931 (atomic-change-group
29312932 (delete-char (- (length text)))
29322933 (insert (org-link-make-string (concat " id:" id) text)))
@@ -2961,7 +2962,7 @@ the same link in its ROAM_REFS property, visit that node rather than
29612962following the link normally.
29622963
29632964If already visiting that node, then follow the link normally."
2964- (when-let* ((url (thing-at-point 'url )))
2965+ (when-let ((url (thing-at-point 'url )))
29652966 ; ; Rarely more than one valid target
29662967 (let* ((target (car (org-mem--split-roam-refs-field url)))
29672968 (found (cl-loop for node in (org-mem-all-id-nodes)
@@ -3450,3 +3451,15 @@ ENTRY should be an `org-mem-entry' object."
34503451(provide 'org-node )
34513452
34523453; ;; org-node.el ends here
3454+
3455+ ; ; Local Variables:
3456+ ; ; checkdoc-spellcheck-documentation-flag: nil
3457+ ; ; checkdoc-verb-check-experimental-flag: nil
3458+ ; ; emacs-lisp-docstring-fill-column: 72
3459+ ; ; read-symbol-shorthands: (("and$" . "cond-let--and$")
3460+ ; ; ("and>" . "cond-let--and>")
3461+ ; ; ("and-let" . "cond-let--and-let")
3462+ ; ; ("if-let" . "cond-let--if-let")
3463+ ; ; ("when-let" . "cond-let--when-let")
3464+ ; ; ("while-let" . "cond-let--while-let"))
3465+ ; ; End:
0 commit comments