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))
|
(let* ((begin (match-beginning 0))
|
||||||
(element (org-element-context))
|
(element (org-element-context))
|
||||||
(type (org-element-type element))
|
(type (org-element-type element))
|
||||||
link bounds)
|
link)
|
||||||
(cond
|
(cond
|
||||||
;; Links correctly recognized by Org Mode
|
;; Links correctly recognized by Org Mode
|
||||||
((eq type 'link)
|
((eq type 'link)
|
||||||
@ -581,7 +581,8 @@ in `org-roam-db-sync'."
|
|||||||
(emacsql-with-transaction (org-roam-db)
|
(emacsql-with-transaction (org-roam-db)
|
||||||
(org-with-wide-buffer
|
(org-with-wide-buffer
|
||||||
(org-set-regexps-and-options 'tags-only)
|
(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-clear-file)
|
||||||
(org-roam-db-insert-file content-hash)
|
(org-roam-db-insert-file content-hash)
|
||||||
(org-roam-db-insert-file-node)
|
(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))))
|
(let ((node (org-roam-populate (org-roam-node-create :id id))))
|
||||||
(when-let ((file (org-roam-node-file node)))
|
(when-let ((file (org-roam-node-file node)))
|
||||||
(if markerp
|
(if markerp
|
||||||
(unwind-protect
|
(let ((buffer (or (find-buffer-visiting file)
|
||||||
(let ((buffer (or (find-buffer-visiting file)
|
(find-file-noselect file))))
|
||||||
(find-file-noselect file))))
|
(with-current-buffer buffer
|
||||||
(with-current-buffer buffer
|
(move-marker (make-marker) (org-roam-node-point node) buffer)))
|
||||||
(move-marker (make-marker) (org-roam-node-point node) buffer))))
|
|
||||||
(cons (org-roam-node-file node)
|
(cons (org-roam-node-file node)
|
||||||
(org-roam-node-point 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 ()
|
(define-inline org-roam-buffer--visibility ()
|
||||||
"Return the current visibility state of the persistent `org-roam-buffer'.
|
"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))
|
(declare (side-effect-free t))
|
||||||
(inline-quote
|
(inline-quote
|
||||||
(cond
|
(cond
|
||||||
|
@ -32,6 +32,7 @@
|
|||||||
;; interactively.
|
;; interactively.
|
||||||
;;
|
;;
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
(require 'crm)
|
||||||
(require 'org-roam)
|
(require 'org-roam)
|
||||||
|
|
||||||
;;; Options
|
;;; Options
|
||||||
@ -446,12 +447,11 @@ GROUP BY id")))
|
|||||||
;;;; Finders
|
;;;; Finders
|
||||||
(defun org-roam-node-marker (node)
|
(defun org-roam-node-marker (node)
|
||||||
"Get the marker for NODE."
|
"Get the marker for NODE."
|
||||||
(unwind-protect
|
(let* ((file (org-roam-node-file node))
|
||||||
(let* ((file (org-roam-node-file node))
|
(buffer (or (find-buffer-visiting file)
|
||||||
(buffer (or (find-buffer-visiting file)
|
(find-file-noselect file))))
|
||||||
(find-file-noselect file))))
|
(with-current-buffer buffer
|
||||||
(with-current-buffer buffer
|
(move-marker (make-marker) (org-roam-node-point node) buffer))))
|
||||||
(move-marker (make-marker) (org-roam-node-point node) buffer)))))
|
|
||||||
|
|
||||||
(defun org-roam-node-open (node &optional cmd force)
|
(defun org-roam-node-open (node &optional cmd force)
|
||||||
"Go to the node NODE.
|
"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)))
|
(let ((node (org-roam-node-at-point 'assert)))
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(goto-char (org-roam-node-point node))
|
(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 "\"")
|
(concat "\"" ref "\"")
|
||||||
ref)))))
|
ref)))))
|
||||||
|
|
||||||
|
@ -72,11 +72,10 @@ Like `string-equal', but case-insensitive."
|
|||||||
(defun org-roam-whitespace-content (s)
|
(defun org-roam-whitespace-content (s)
|
||||||
"Return the whitespace content at the end of S."
|
"Return the whitespace content at the end of S."
|
||||||
(with-temp-buffer
|
(with-temp-buffer
|
||||||
(let ((c 0))
|
(insert s)
|
||||||
(insert s)
|
(skip-chars-backward " \t\n")
|
||||||
(skip-chars-backward " \t\n")
|
(buffer-substring-no-properties
|
||||||
(buffer-substring-no-properties
|
(point) (point-max))))
|
||||||
(point) (point-max)))))
|
|
||||||
|
|
||||||
(defun org-roam-strip-comments (s)
|
(defun org-roam-strip-comments (s)
|
||||||
"Strip Org comments from string S."
|
"Strip Org comments from string S."
|
||||||
@ -85,7 +84,8 @@ Like `string-equal', but case-insensitive."
|
|||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
(while (not (eobp))
|
(while (not (eobp))
|
||||||
(if (org-at-comment-p)
|
(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)))
|
(forward-line)))
|
||||||
(buffer-string)))
|
(buffer-string)))
|
||||||
|
|
||||||
|
@ -186,7 +186,7 @@ in the list is found.
|
|||||||
By default, `executable-find' will be used to look up the path to
|
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
|
the executable. If a custom path is required, it can be specified
|
||||||
together with the method symbol as a cons cell. For example:
|
together with the method symbol as a cons cell. For example:
|
||||||
'(find (rg . \"/path/to/rg\"))."
|
\\='(find (rg . \"/path/to/rg\"))."
|
||||||
:type '(set
|
:type '(set
|
||||||
(const :tag "find" find)
|
(const :tag "find" find)
|
||||||
(const :tag "fd" fd)
|
(const :tag "fd" fd)
|
||||||
|
Reference in New Issue
Block a user