mirror of
https://github.com/org-roam/org-roam
synced 2025-08-05 12:37:23 -05:00
prefer mapconcat over string-join (#1502)
This commit is contained in:
@ -419,9 +419,9 @@ References from FILE are excluded."
|
|||||||
(let* ((titles (cons (org-roam-node-title node)
|
(let* ((titles (cons (org-roam-node-title node)
|
||||||
(org-roam-node-aliases node)))
|
(org-roam-node-aliases node)))
|
||||||
(rg-command (concat "rg -o --vimgrep -P -i "
|
(rg-command (concat "rg -o --vimgrep -P -i "
|
||||||
(string-join (mapcar (lambda (glob) (concat "-g " glob))
|
(mapconcat (lambda (glob) (concat "-g " glob))
|
||||||
(org-roam--list-files-search-globs
|
(org-roam--list-files-search-globs org-roam-file-extensions)
|
||||||
org-roam-file-extensions)) " ")
|
" ")
|
||||||
(format " '\\[([^[]]++|(?R))*\\]%s' "
|
(format " '\\[([^[]]++|(?R))*\\]%s' "
|
||||||
(mapconcat (lambda (title)
|
(mapconcat (lambda (title)
|
||||||
(format "|(\\b%s\\b)" (shell-quote-argument title)))
|
(format "|(\\b%s\\b)" (shell-quote-argument title)))
|
||||||
|
@ -509,9 +509,7 @@ nodes."
|
|||||||
|
|
||||||
(defun org-roam--tags-to-str (tags)
|
(defun org-roam--tags-to-str (tags)
|
||||||
"Convert list of TAGS into a string."
|
"Convert list of TAGS into a string."
|
||||||
(string-join
|
(mapconcat (lambda (s) (concat "#" s)) tags " "))
|
||||||
(mapcar (lambda (s) (concat "#" s)) tags)
|
|
||||||
" "))
|
|
||||||
|
|
||||||
(defun org-roam-node--format-entry (node width)
|
(defun org-roam-node--format-entry (node width)
|
||||||
"Formats NODE for display in the results list.
|
"Formats NODE for display in the results list.
|
||||||
@ -698,8 +696,7 @@ POINT is the point in buffer for the link.
|
|||||||
PROPERTIES contains properties about the link."
|
PROPERTIES contains properties about the link."
|
||||||
(magit-insert-section section (org-roam-node-section)
|
(magit-insert-section section (org-roam-node-section)
|
||||||
(let ((outline (if-let ((outline (plist-get properties :outline)))
|
(let ((outline (if-let ((outline (plist-get properties :outline)))
|
||||||
(string-join (mapcar #'org-link-display-format outline)
|
(mapconcat #'org-link-display-format outline " > ")
|
||||||
" > ")
|
|
||||||
"Top")))
|
"Top")))
|
||||||
(insert (concat (propertize (org-roam-node-title source-node)
|
(insert (concat (propertize (org-roam-node-title source-node)
|
||||||
'font-lock-face 'org-roam-title)
|
'font-lock-face 'org-roam-title)
|
||||||
|
Reference in New Issue
Block a user