mirror of
https://github.com/org-roam/org-roam
synced 2025-08-01 12:17:21 -05:00
Address compiler warnings
Depend on Org 9.6 for `org-fold-show-context'.
This commit is contained in:
committed by
Dustin Farris
parent
551ff3b17e
commit
ed272eaf56
@ -337,7 +337,7 @@ If HASH is non-nil, use that as the file's hash without recalculating it."
|
||||
(let* ((begin (match-beginning 0))
|
||||
(element (org-element-context))
|
||||
(type (org-element-type element))
|
||||
link bounds)
|
||||
link)
|
||||
(cond
|
||||
;; Links correctly recognized by Org Mode
|
||||
((eq type 'link)
|
||||
@ -581,7 +581,8 @@ in `org-roam-db-sync'."
|
||||
(emacsql-with-transaction (org-roam-db)
|
||||
(org-with-wide-buffer
|
||||
(org-set-regexps-and-options 'tags-only)
|
||||
(org-refresh-category-properties)
|
||||
;; Org doesn't use this anymore, so we probably should stop too.
|
||||
;; (org-refresh-category-properties)
|
||||
(org-roam-db-clear-file)
|
||||
(org-roam-db-insert-file content-hash)
|
||||
(org-roam-db-insert-file-node)
|
||||
|
@ -55,11 +55,10 @@ With optional argument MARKERP, return the position as a new marker."
|
||||
(let ((node (org-roam-populate (org-roam-node-create :id id))))
|
||||
(when-let ((file (org-roam-node-file node)))
|
||||
(if markerp
|
||||
(unwind-protect
|
||||
(let ((buffer (or (find-buffer-visiting file)
|
||||
(find-file-noselect file))))
|
||||
(with-current-buffer buffer
|
||||
(move-marker (make-marker) (org-roam-node-point node) buffer))))
|
||||
(let ((buffer (or (find-buffer-visiting file)
|
||||
(find-file-noselect file))))
|
||||
(with-current-buffer buffer
|
||||
(move-marker (make-marker) (org-roam-node-point node) buffer)))
|
||||
(cons (org-roam-node-file node)
|
||||
(org-roam-node-point node))))))
|
||||
|
||||
|
@ -319,7 +319,7 @@ To toggle its display use `org-roam-buffer-toggle' command.")
|
||||
|
||||
(define-inline org-roam-buffer--visibility ()
|
||||
"Return the current visibility state of the persistent `org-roam-buffer'.
|
||||
Valid states are 'visible, 'exists and 'none."
|
||||
Valid states are `visible', `exists' and `none'."
|
||||
(declare (side-effect-free t))
|
||||
(inline-quote
|
||||
(cond
|
||||
|
@ -32,6 +32,7 @@
|
||||
;; interactively.
|
||||
;;
|
||||
;;; Code:
|
||||
(require 'crm)
|
||||
(require 'org-roam)
|
||||
|
||||
;;; Options
|
||||
@ -446,12 +447,11 @@ GROUP BY id")))
|
||||
;;;; Finders
|
||||
(defun org-roam-node-marker (node)
|
||||
"Get the marker for NODE."
|
||||
(unwind-protect
|
||||
(let* ((file (org-roam-node-file node))
|
||||
(buffer (or (find-buffer-visiting file)
|
||||
(find-file-noselect file))))
|
||||
(with-current-buffer buffer
|
||||
(move-marker (make-marker) (org-roam-node-point node) buffer)))))
|
||||
(let* ((file (org-roam-node-file node))
|
||||
(buffer (or (find-buffer-visiting file)
|
||||
(find-file-noselect file))))
|
||||
(with-current-buffer buffer
|
||||
(move-marker (make-marker) (org-roam-node-point node) buffer))))
|
||||
|
||||
(defun org-roam-node-open (node &optional cmd force)
|
||||
"Go to the node NODE.
|
||||
@ -1057,7 +1057,7 @@ and when nil is returned the node will be filtered out."
|
||||
(let ((node (org-roam-node-at-point 'assert)))
|
||||
(save-excursion
|
||||
(goto-char (org-roam-node-point node))
|
||||
(org-roam-property-add "ROAM_REFS" (if (memq " " (string-to-list ref))
|
||||
(org-roam-property-add "ROAM_REFS" (if (member " " (string-to-list ref))
|
||||
(concat "\"" ref "\"")
|
||||
ref)))))
|
||||
|
||||
|
@ -72,11 +72,10 @@ Like `string-equal', but case-insensitive."
|
||||
(defun org-roam-whitespace-content (s)
|
||||
"Return the whitespace content at the end of S."
|
||||
(with-temp-buffer
|
||||
(let ((c 0))
|
||||
(insert s)
|
||||
(skip-chars-backward " \t\n")
|
||||
(buffer-substring-no-properties
|
||||
(point) (point-max)))))
|
||||
(insert s)
|
||||
(skip-chars-backward " \t\n")
|
||||
(buffer-substring-no-properties
|
||||
(point) (point-max))))
|
||||
|
||||
(defun org-roam-strip-comments (s)
|
||||
"Strip Org comments from string S."
|
||||
@ -85,7 +84,8 @@ Like `string-equal', but case-insensitive."
|
||||
(goto-char (point-min))
|
||||
(while (not (eobp))
|
||||
(if (org-at-comment-p)
|
||||
(delete-region (point-at-bol) (progn (forward-line) (point)))
|
||||
(delete-region (line-beginning-position)
|
||||
(progn (forward-line) (point)))
|
||||
(forward-line)))
|
||||
(buffer-string)))
|
||||
|
||||
|
@ -186,7 +186,7 @@ in the list is found.
|
||||
By default, `executable-find' will be used to look up the path to
|
||||
the executable. If a custom path is required, it can be specified
|
||||
together with the method symbol as a cons cell. For example:
|
||||
'(find (rg . \"/path/to/rg\"))."
|
||||
\\='(find (rg . \"/path/to/rg\"))."
|
||||
:type '(set
|
||||
(const :tag "find" find)
|
||||
(const :tag "fd" fd)
|
||||
|
Reference in New Issue
Block a user