update packages
This commit is contained in:
@@ -567,7 +567,7 @@ Return the ID of the location."
|
||||
;; caller.
|
||||
(save-excursion
|
||||
(goto-char p)
|
||||
(if-let ((id (org-entry-get p "ID")))
|
||||
(if-let* ((id (org-entry-get p "ID")))
|
||||
(setf (org-roam-node-id org-roam-capture--node) id)
|
||||
(org-entry-put p "ID" (org-roam-node-id org-roam-capture--node)))
|
||||
(prog1
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
;;; org-roam-dailies.el --- Daily-notes for Org-roam -*- coding: utf-8; lexical-binding: t; -*-
|
||||
;;;
|
||||
|
||||
;; Copyright © 2020-2025 Jethro Kuan <jethrokuan95@gmail.com>
|
||||
;; Copyright © 2020 Leo Vivier <leo.vivier+dev@gmail.com>
|
||||
|
||||
;; Author: Jethro Kuan <jethrokuan95@gmail.com>
|
||||
;; Leo Vivier <leo.vivier+dev@gmail.com>
|
||||
;; URL: https://github.com/org-roam/org-roam
|
||||
;; Keywords: org-mode, roam, convenience
|
||||
;; Package-Requires: ((emacs "26.1") (org-roam "2.1"))
|
||||
|
||||
;; This file is NOT part of GNU Emacs.
|
||||
|
||||
|
||||
@@ -4,8 +4,6 @@
|
||||
|
||||
;; Author: Jethro Kuan <jethrokuan95@gmail.com>
|
||||
;; URL: https://github.com/org-roam/org-roam
|
||||
;; Keywords: org-mode, roam, convenience
|
||||
;; Package-Requires: ((emacs "26.1") (org "9.6") (org-roam "2.1"))
|
||||
|
||||
;; This file is NOT part of GNU Emacs.
|
||||
|
||||
|
||||
@@ -4,8 +4,6 @@
|
||||
|
||||
;; Author: Jethro Kuan <jethrokuan95@gmail.com>
|
||||
;; URL: https://github.com/org-roam/org-roam
|
||||
;; Keywords: org-mode, roam, convenience
|
||||
;; Package-Requires: ((emacs "26.1") (org "9.6") (org-roam "2.1"))
|
||||
|
||||
;; This file is NOT part of GNU Emacs.
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
;;; Code:
|
||||
(require 'crm)
|
||||
(require 'subr-x)
|
||||
(eval-when-compile (require 'rx))
|
||||
(require 'org-roam)
|
||||
|
||||
;;; Options
|
||||
@@ -793,27 +794,41 @@ Assumes that the cursor was put where the link is."
|
||||
|
||||
;;;;;; Completion-at-point interface
|
||||
(defconst org-roam-bracket-completion-re
|
||||
"\\[\\[\\(\\(?:roam:\\)?\\)\\([^z-a]*?\\)]]"
|
||||
"Regex for completion within link brackets.
|
||||
We use this as a substitute for `org-link-bracket-re', because
|
||||
`org-link-bracket-re' requires content within the brackets for a match.")
|
||||
(rx "[["
|
||||
(group (opt "roam:"))
|
||||
;; Change from ‘org-link-bracket-re’: allow empty URI part
|
||||
(group (zero-or-more
|
||||
(or (not (any "[]\\"))
|
||||
(and "\\" (zero-or-more "\\\\") (any "[]"))
|
||||
(and (one-or-more "\\") (not (any "[]"))))))
|
||||
"]]")
|
||||
"Regexp for completion within link brackets.
|
||||
Intended for ‘org-roam-complete-link-at-point’, which see.")
|
||||
|
||||
(defun org-roam-complete-link-at-point ()
|
||||
"Complete \"roam:\" link at point to an existing Org-roam node."
|
||||
(let (roam-p start end)
|
||||
(when (org-in-regexp org-roam-bracket-completion-re 1)
|
||||
(setq roam-p (not (or (org-in-src-block-p)
|
||||
(string-blank-p (match-string 1))))
|
||||
start (match-beginning 2)
|
||||
end (match-end 2))
|
||||
(list start end
|
||||
(org-roam--get-titles)
|
||||
:exit-function
|
||||
(lambda (str &rest _)
|
||||
(delete-char (- 0 (length str)))
|
||||
(insert (concat (unless roam-p "roam:")
|
||||
str))
|
||||
(forward-char 2))))))
|
||||
"Complete inside link brackets to an existing Org-roam node.
|
||||
Targets [[$title]] and [[roam:$title]] links. [[id:$id][$description]]
|
||||
links are not targeted to allow for changing link descriptions without
|
||||
changing the target node."
|
||||
(when-let* ((_ (org-in-regexp org-roam-bracket-completion-re 1))
|
||||
(uri-start (match-beginning 1))
|
||||
(title-start (match-beginning 2))
|
||||
(end (match-end 2))
|
||||
;; don’t try to complete if point is in the delimiting brackets
|
||||
(_ (<= title-start (point) end))
|
||||
(_ (not (org-in-src-block-p))))
|
||||
(list title-start end
|
||||
(org-roam--get-titles)
|
||||
:exit-function
|
||||
(lambda (str &rest _)
|
||||
"Replace title inserted by completion with ID and title."
|
||||
(delete-region uri-start (point))
|
||||
(insert "id:"
|
||||
(org-roam-node-id (org-roam-node-from-title-or-alias
|
||||
(substring-no-properties str)))
|
||||
"][" str)
|
||||
;; Move point after closing brackets
|
||||
(forward-char 2)))))
|
||||
|
||||
(defun org-roam-complete-everywhere ()
|
||||
"Complete symbol at point as a link completion to an Org-roam node.
|
||||
@@ -821,7 +836,7 @@ This is a `completion-at-point' function, and is active when
|
||||
`org-roam-completion-everywhere' is non-nil.
|
||||
|
||||
Unlike `org-roam-complete-link-at-point' this will complete even
|
||||
outside of the bracket syntax for links (i.e. \"[[roam:|]]\"),
|
||||
outside of the bracket syntax for links (i.e. \"[[|]]\"),
|
||||
hence \"everywhere\"."
|
||||
(when (and org-roam-completion-everywhere
|
||||
(thing-at-point 'word)
|
||||
@@ -833,7 +848,10 @@ hence \"everywhere\"."
|
||||
:exit-function
|
||||
(lambda (str _status)
|
||||
(delete-char (- (length str)))
|
||||
(insert "[[roam:" str "]]"))
|
||||
(insert "[[id:"
|
||||
(org-roam-node-id (org-roam-node-from-title-or-alias
|
||||
(substring-no-properties str)))
|
||||
"][" str "]]"))
|
||||
;; Proceed with the next completion function if the returned titles
|
||||
;; do not match. This allows the default Org capfs or custom capfs
|
||||
;; of lower priority to run.
|
||||
@@ -1095,13 +1113,7 @@ and when nil is returned the node will be filtered out."
|
||||
(defun org-roam-tag-completions ()
|
||||
"Return list of tags for completions within Org-roam."
|
||||
(let ((roam-tags (mapcar #'car (org-roam-db-query [:select :distinct [tag] :from tags])))
|
||||
(org-tags (cl-loop for tagg in org-tag-alist
|
||||
nconc (pcase tagg
|
||||
('(:newline)
|
||||
nil)
|
||||
(`(,tag . ,_)
|
||||
(list tag))
|
||||
(_ nil)))))
|
||||
(org-tags (seq-filter #'stringp (mapcar #'car org-tag-alist))))
|
||||
(seq-uniq (append roam-tags org-tags))))
|
||||
|
||||
;;;; Editing
|
||||
|
||||
@@ -4,8 +4,6 @@
|
||||
|
||||
;; Author: Jethro Kuan <jethrokuan95@gmail.com>
|
||||
;; URL: https://github.com/org-roam/org-roam
|
||||
;; Keywords: org-mode, roam, convenience
|
||||
;; Package-Requires: ((emacs "26.1") (org "9.6") (org-roam "2.1"))
|
||||
|
||||
;; This file is NOT part of GNU Emacs.
|
||||
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
;; -*- no-byte-compile: t; lexical-binding: nil -*-
|
||||
(define-package "org-roam" "20260224.1637"
|
||||
(define-package "org-roam" "20260425.1623"
|
||||
"A database abstraction layer for Org-mode."
|
||||
'((emacs "26.1")
|
||||
'((emacs "27.1")
|
||||
(compat "30.1")
|
||||
(org "9.6")
|
||||
(emacsql "4.1.0")
|
||||
(magit-section "3.0.0"))
|
||||
(emacsql "4.3.3")
|
||||
(magit-section "4.4.2"))
|
||||
:url "https://github.com/org-roam/org-roam"
|
||||
:commit "20934cfb5a2e7ae037ec10bbc81ca97478738178"
|
||||
:revdesc "20934cfb5a2e"
|
||||
:commit "c54c523dec175695645399705606ea19056a3053"
|
||||
:revdesc "c54c523dec17"
|
||||
:keywords '("org-mode" "roam" "convenience")
|
||||
:authors '(("Jethro Kuan" . "jethrokuan95@gmail.com"))
|
||||
:maintainers '(("Jethro Kuan" . "jethrokuan95@gmail.com")))
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
;;; org-roam-protocol.el --- Protocol handler for roam:// links -*- coding: utf-8; lexical-binding: t; -*-
|
||||
|
||||
;; Copyright © 2020-2025 Jethro Kuan <jethrokuan95@gmail.com>
|
||||
|
||||
;; Author: Jethro Kuan <jethrokuan95@gmail.com>
|
||||
;; URL: https://github.com/org-roam/org-roam
|
||||
;; Keywords: org-mode, roam, convenience
|
||||
;; Package-Requires: ((emacs "26.1") (org "9.6") (org-roam "2.1"))
|
||||
|
||||
;; This file is NOT part of GNU Emacs.
|
||||
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
;; Author: Jethro Kuan <jethrokuan95@gmail.com>
|
||||
;; URL: https://github.com/org-roam/org-roam
|
||||
;; Keywords: org-mode, roam, convenience
|
||||
;; Package-Version: 20260224.1637
|
||||
;; Package-Revision: 20934cfb5a2e
|
||||
;; Package-Requires: ((emacs "26.1") (compat "30.1") (org "9.6") (emacsql "4.1.0") (magit-section "3.0.0"))
|
||||
;; Package-Version: 20260425.1623
|
||||
;; Package-Revision: c54c523dec17
|
||||
;; Package-Requires: ((emacs "27.1") (compat "30.1") (org "9.6") (emacsql "4.3.3") (magit-section "4.4.2"))
|
||||
|
||||
;; This file is NOT part of GNU Emacs.
|
||||
|
||||
|
||||
@@ -1095,8 +1095,7 @@ Completions within link brackets are provided by
|
||||
‘org-roam-complete-link-at-point’.
|
||||
|
||||
The completion candidates are the titles and aliases for all Org-roam
|
||||
nodes. Upon choosing a candidate, a ‘roam:Title’ link will be inserted,
|
||||
linking to node of choice.
|
||||
nodes. Choosing a candidate inserts an ID link to the chosen node.
|
||||
|
||||
|
||||
File: org-roam.info, Node: Completing anywhere, Prev: Completing within Link Brackets, Up: Completion
|
||||
@@ -1107,9 +1106,8 @@ File: org-roam.info, Node: Completing anywhere, Prev: Completing within Link B
|
||||
The same completions can be triggered anywhere for the symbol at point
|
||||
if not within a bracketed link. This is provided by
|
||||
‘org-roam-complete-everywhere’. Similarly, the completion candidates
|
||||
are the titles and aliases for all Org-roam nodes, and upon choosing a
|
||||
candidate a ‘roam:Title’ link will be inserted linking to the node of
|
||||
choice.
|
||||
are the titles and aliases for all Org-roam nodes, and choosing a
|
||||
candidate inserts an ID link to the chosen node.
|
||||
|
||||
This is disabled by default. To enable it, set
|
||||
‘org-roam-completion-everywhere’ to ‘t’:
|
||||
@@ -2393,7 +2391,7 @@ Appendix D Variable Index
|
||||
| ||||