update packages and add valign
This commit is contained in:
@@ -426,8 +426,7 @@ The INFO, if provided, is passed along to the underlying `org-roam-capture-'."
|
||||
:info info
|
||||
:keys keys
|
||||
:templates templates
|
||||
:node node
|
||||
:props '(:immediate-finish nil))))
|
||||
:node node)))
|
||||
|
||||
;;; Capture process
|
||||
(defun org-roam-capture-p ()
|
||||
@@ -460,23 +459,22 @@ processing by `org-capture'.
|
||||
Note: During the capture process this function is run by
|
||||
`org-capture-set-target-location', as a (function ...) based
|
||||
capture target."
|
||||
(if-let* ((id (run-hook-with-args-until-success 'org-roam-capture-preface-hook)))
|
||||
(org-roam-capture--put :id id)
|
||||
(org-roam-capture--setup-target-location)
|
||||
;; Adjust point for plain captures to skip past metadata (e.g. properties drawer)
|
||||
(org-roam-capture--adjust-point-for-capture-type))
|
||||
(let ((template (org-capture-get :template)))
|
||||
(when (stringp template)
|
||||
(org-capture-put
|
||||
:template
|
||||
(org-roam-capture--fill-template template))))
|
||||
(org-roam-capture--put :finalize (or (org-capture-get :finalize)
|
||||
(org-roam-capture--get :finalize))))
|
||||
(let ((id (cond ((run-hook-with-args-until-success 'org-roam-capture-preface-hook))
|
||||
(t (org-roam-capture--setup-target-location)))))
|
||||
(org-roam-capture--adjust-point-for-capture-type)
|
||||
(let ((template (org-capture-get :template)))
|
||||
(when (stringp template)
|
||||
(org-capture-put
|
||||
:template
|
||||
(org-roam-capture--fill-template template))))
|
||||
(org-roam-capture--put :id id)
|
||||
(org-roam-capture--put :finalize (or (org-capture-get :finalize)
|
||||
(org-roam-capture--get :finalize)))))
|
||||
|
||||
(defun org-roam-capture--setup-target-location ()
|
||||
"Initialize the buffer, and goto the location of the new capture."
|
||||
(let ((target-entry-p t)
|
||||
p new-file-p id)
|
||||
"Initialize the buffer, and goto the location of the new capture.
|
||||
Return the ID of the location."
|
||||
(let (p new-file-p)
|
||||
(pcase (org-roam-capture--get-target)
|
||||
(`(file ,path)
|
||||
(setq path (org-roam-capture--target-truepath path)
|
||||
@@ -484,8 +482,7 @@ capture target."
|
||||
(when new-file-p (org-roam-capture--put :new-file path))
|
||||
(set-buffer (org-capture-target-buffer path))
|
||||
(widen)
|
||||
(setq p (goto-char (point-min))
|
||||
target-entry-p nil))
|
||||
(setq p (goto-char (point-min))))
|
||||
(`(file+olp ,path ,olp)
|
||||
(setq path (org-roam-capture--target-truepath path)
|
||||
new-file-p (org-roam-capture--new-file-p path))
|
||||
@@ -501,12 +498,9 @@ capture target."
|
||||
(set-buffer (org-capture-target-buffer path))
|
||||
(when new-file-p
|
||||
(org-roam-capture--put :new-file path)
|
||||
(insert (org-roam-capture--fill-template head 'ensure-newline))
|
||||
(setq p (point-max)))
|
||||
(insert (org-roam-capture--fill-template head 'ensure-newline)))
|
||||
(widen)
|
||||
(unless new-file-p
|
||||
(setq p (goto-char (point-min))))
|
||||
(setq target-entry-p nil))
|
||||
(setq p (goto-char (point-min))))
|
||||
(`(file+head+olp ,path ,head ,olp)
|
||||
(setq path (org-roam-capture--target-truepath path)
|
||||
new-file-p (org-roam-capture--new-file-p path))
|
||||
@@ -568,45 +562,17 @@ capture target."
|
||||
(user-error "No node with title or id \"%s\"" title-or-id))))
|
||||
(set-buffer (org-capture-target-buffer (org-roam-node-file node)))
|
||||
(goto-char (org-roam-node-point node))
|
||||
(setq p (org-roam-node-point node)
|
||||
target-entry-p (and (derived-mode-p 'org-mode) (org-at-heading-p))))))
|
||||
(setq p (org-roam-node-point node)))))
|
||||
;; Setup `org-id' for the current capture target and return it back to the
|
||||
;; caller.
|
||||
;; Unless it's an entry type, then we want to create an ID for the entry instead
|
||||
(pcase (org-capture-get :type)
|
||||
('entry
|
||||
(advice-add #'org-capture-place-entry :after #'org-roam-capture--create-id-for-entry)
|
||||
(org-roam-capture--put :new-node-p t)
|
||||
(setq id (org-roam-node-id org-roam-capture--node)))
|
||||
(_
|
||||
(save-excursion
|
||||
(goto-char p)
|
||||
(unless (org-entry-get p "ID")
|
||||
(org-roam-capture--put :new-node-p t))
|
||||
(setq id (or (org-entry-get p "ID")
|
||||
(org-roam-node-id org-roam-capture--node)))
|
||||
(setf (org-roam-node-id org-roam-capture--node) id)
|
||||
(org-entry-put p "ID" id))))
|
||||
(org-roam-capture--put :id id)
|
||||
(org-roam-capture--put :target-entry-p target-entry-p)
|
||||
(advice-add #'org-capture-place-template :before #'org-roam-capture--set-target-entry-p-a)
|
||||
(advice-add #'org-capture-place-template :after #'org-roam-capture-run-new-node-hook-a)))
|
||||
|
||||
(defun org-roam-capture--set-target-entry-p-a (_)
|
||||
"Correct `:target-entry-p' in Org-capture template based on `:target.'."
|
||||
(org-capture-put :target-entry-p (org-roam-capture--get :target-entry-p))
|
||||
(advice-remove #'org-capture-place-template #'org-roam-capture--set-target-entry-p-a))
|
||||
|
||||
(defun org-roam-capture-run-new-node-hook-a (_)
|
||||
"Advice to run after the Org-capture template is placed."
|
||||
(when (org-roam-capture--get :new-node-p)
|
||||
(run-hooks 'org-roam-capture-new-node-hook))
|
||||
(advice-remove #'org-capture-place-template #'org-roam-capture-run-new-node-hook-a))
|
||||
|
||||
(defun org-roam-capture--create-id-for-entry ()
|
||||
"Create the ID for the new entry."
|
||||
(org-entry-put (point) "ID" (org-roam-capture--get :id))
|
||||
(advice-remove #'org-capture-place-entry #'org-roam-capture--create-id-for-entry))
|
||||
(save-excursion
|
||||
(goto-char p)
|
||||
(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
|
||||
(org-id-get)
|
||||
(run-hooks 'org-roam-capture-new-node-hook)))))
|
||||
|
||||
(defun org-roam-capture--get-target ()
|
||||
"Get the current capture :target for the capture template in use."
|
||||
@@ -684,17 +650,27 @@ POS is the current position of point (an integer) inside the
|
||||
currently active capture buffer, where the adjustment should
|
||||
start to begin from. If it's nil, then it will default to
|
||||
the current value of `point'."
|
||||
(goto-char (or pos (point)))
|
||||
(pcase (org-capture-get :type)
|
||||
(`plain
|
||||
(if (org-capture-get :prepend)
|
||||
(let ((el (org-element-at-point)))
|
||||
(while (and (not (eobp))
|
||||
(memq (org-element-type el)
|
||||
'(drawer property-drawer keyword comment comment-block horizontal-rule)))
|
||||
(goto-char (org-element-property :end el))
|
||||
(setq el (org-element-at-point))))
|
||||
(goto-char (org-entry-end-position)))))
|
||||
(or pos (setq pos (point)))
|
||||
(goto-char pos)
|
||||
(let ((location-type (if (= pos 1) 'beginning-of-file 'heading-at-point)))
|
||||
(and (eq location-type 'heading-at-point)
|
||||
(cl-assert (org-at-heading-p)))
|
||||
(pcase (org-capture-get :type)
|
||||
(`plain
|
||||
(cl-case location-type
|
||||
(beginning-of-file
|
||||
(if (org-capture-get :prepend)
|
||||
(let ((el (org-element-at-point)))
|
||||
(while (and (not (eobp))
|
||||
(memq (org-element-type el)
|
||||
'(drawer property-drawer keyword comment comment-block horizontal-rule)))
|
||||
(goto-char (org-element-property :end el))
|
||||
(setq el (org-element-at-point))))
|
||||
(goto-char (org-entry-end-position))))
|
||||
(heading-at-point
|
||||
(if (org-capture-get :prepend)
|
||||
(org-end-of-meta-data t)
|
||||
(goto-char (org-entry-end-position))))))))
|
||||
(point))
|
||||
|
||||
;;; Capture implementation
|
||||
|
||||
@@ -250,6 +250,11 @@ nodes." org-id-locations-file)
|
||||
(declare (obsolete org-roam-db-autosync-mode "2025-11-23"))
|
||||
(org-roam-db-autosync-mode 'toggle))
|
||||
|
||||
(defun org-roam-buffer-list ()
|
||||
"Return a list of buffers that are Org-roam files."
|
||||
(declare (obsolete nil "2026-02-08"))
|
||||
(seq-filter #'org-roam-buffer-p (buffer-list)))
|
||||
|
||||
(provide 'org-roam-compat)
|
||||
|
||||
;;; org-roam-compat.el ends here
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
;; 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") (dash "2.13") (org-roam "2.1"))
|
||||
;; Package-Requires: ((emacs "26.1") (org-roam "2.1"))
|
||||
|
||||
;; This file is NOT part of GNU Emacs.
|
||||
|
||||
@@ -36,7 +36,6 @@
|
||||
;; scratch notes or whatever else you can think of.
|
||||
;;
|
||||
;;; Code:
|
||||
(require 'dash)
|
||||
(require 'org-roam)
|
||||
|
||||
;;; Faces
|
||||
@@ -268,13 +267,13 @@ negative, find note N days in the future."
|
||||
"List all files in `org-roam-dailies-directory'.
|
||||
EXTRA-FILES can be used to append extra files to the list."
|
||||
(let ((dir (expand-file-name org-roam-dailies-directory org-roam-directory))
|
||||
(regexp (rx-to-string `(and "." (or ,@org-roam-file-extensions)))))
|
||||
(append (--remove (let ((file (file-name-nondirectory it)))
|
||||
(when (or (auto-save-file-name-p file)
|
||||
(backup-file-name-p file)
|
||||
(string-match "^\\." file))
|
||||
it))
|
||||
(directory-files-recursively dir regexp))
|
||||
(regexp (rx-to-string `(seq (literal ".") (or ,@org-roam-file-extensions) eos))))
|
||||
(append (seq-remove (lambda (file)
|
||||
(let ((name (file-name-nondirectory file)))
|
||||
(or (auto-save-file-name-p name)
|
||||
(backup-file-name-p name)
|
||||
(string-match "^\\." name))))
|
||||
(directory-files-recursively dir regexp))
|
||||
extra-files)))
|
||||
|
||||
(defun org-roam-dailies--daily-note-p (&optional file)
|
||||
|
||||
@@ -307,7 +307,10 @@ If HASH is non-nil, use that as the file's hash without recalculating it."
|
||||
|
||||
(defun org-roam-db-node-p ()
|
||||
"Return t if headline at point is an Org-roam node, else return nil."
|
||||
(and (org-id-get)
|
||||
;; In Org-mode 9.7 (Emacs 30.2), `org-id-get' throws an exception if it is
|
||||
;; called outside of an org-mode buffer.
|
||||
(and (derived-mode-p 'org-mode)
|
||||
(org-id-get)
|
||||
(not (org-entry-get (point) "ROAM_EXCLUDE"))
|
||||
(funcall org-roam-db-node-include-function)))
|
||||
|
||||
@@ -556,9 +559,7 @@ INFO is the org-element parsed buffer."
|
||||
(defun org-roam-db-update-file (&optional file-path _deprecated-arg)
|
||||
"Update Org-roam cache for FILE-PATH.
|
||||
|
||||
If the file does not exist anymore, remove it from the cache.
|
||||
|
||||
If the file exists, update the cache with information.
|
||||
Assumes FILE-PATH exists. See also `org-roam-db-clear-file'.
|
||||
|
||||
If NO-REQUIRE, don't require optional libraries. Set NO-REQUIRE
|
||||
when the libraries are already required at some toplevel, e.g.
|
||||
@@ -658,7 +659,7 @@ database, see `org-roam-db-sync' command."
|
||||
(advice-remove #'vc-delete-file #'org-roam-db-autosync--vc-delete-file-a)
|
||||
(org-roam-db--close-all)
|
||||
;; Disable local hooks for all org-roam buffers
|
||||
(dolist (buf (org-roam-buffer-list))
|
||||
(dolist (buf (seq-filter #'org-roam-buffer-p (buffer-list)))
|
||||
(with-current-buffer buf
|
||||
(remove-hook 'after-save-hook #'org-roam-db-autosync--try-update-on-save-h t)))))))
|
||||
|
||||
|
||||
@@ -348,7 +348,7 @@ Has no effect when there's no `org-roam-node-at-point'."
|
||||
"Reconstruct the persistent `org-roam-buffer'.
|
||||
This needs to be quick or infrequent, because this designed to
|
||||
run at `post-command-hook'."
|
||||
(and (get-buffer-window org-roam-buffer)
|
||||
(and (get-buffer-window org-roam-buffer 'visible)
|
||||
(org-roam-buffer-persistent-redisplay)))
|
||||
|
||||
;;; Sections
|
||||
|
||||
@@ -476,7 +476,7 @@ NODE, unless FORCE is non-nil."
|
||||
(org-fold-show-context))
|
||||
|
||||
(defun org-roam-node-visit (node &optional other-window force)
|
||||
"From the current buffer, visit NODE. Return the visited buffer.
|
||||
"From the current buffer, visit NODE.
|
||||
Display the buffer in the selected window. With a prefix
|
||||
argument OTHER-WINDOW display the buffer in another window
|
||||
instead.
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
;; -*- no-byte-compile: t; lexical-binding: nil -*-
|
||||
(define-package "org-roam" "20251125.729"
|
||||
(define-package "org-roam" "20260224.1637"
|
||||
"A database abstraction layer for Org-mode."
|
||||
'((emacs "26.1")
|
||||
(compat "30.1")
|
||||
(dash "2.13")
|
||||
(org "9.6")
|
||||
(emacsql "4.1.0")
|
||||
(magit-section "3.0.0"))
|
||||
:url "https://github.com/org-roam/org-roam"
|
||||
:commit "f4ba41cf3d59084e182a5186d432afc9aa3fc423"
|
||||
:revdesc "f4ba41cf3d59"
|
||||
:commit "20934cfb5a2e7ae037ec10bbc81ca97478738178"
|
||||
:revdesc "20934cfb5a2e"
|
||||
:keywords '("org-mode" "roam" "convenience")
|
||||
:authors '(("Jethro Kuan" . "jethrokuan95@gmail.com"))
|
||||
:maintainers '(("Jethro Kuan" . "jethrokuan95@gmail.com")))
|
||||
|
||||
@@ -37,9 +37,9 @@
|
||||
|
||||
(defun org-roam-quote-string (s)
|
||||
"Quotes string S."
|
||||
(->> s
|
||||
(org-roam-replace-string "\\" "\\\\")
|
||||
(org-roam-replace-string "\"" "\\\"")))
|
||||
(thread-last s
|
||||
(org-roam-replace-string "\\" "\\\\")
|
||||
(org-roam-replace-string "\"" "\\\"")))
|
||||
|
||||
(defun org-roam-word-wrap (len s)
|
||||
"If S is longer than LEN, wrap the words with newlines."
|
||||
|
||||
@@ -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: 20251125.729
|
||||
;; Package-Revision: f4ba41cf3d59
|
||||
;; Package-Requires: ((emacs "26.1") (compat "30.1") (dash "2.13") (org "9.6") (emacsql "4.1.0") (magit-section "3.0.0"))
|
||||
;; 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"))
|
||||
|
||||
;; This file is NOT part of GNU Emacs.
|
||||
|
||||
@@ -72,7 +72,6 @@
|
||||
;; majority of them can be found at https://github.com/org-roam and MELPA.
|
||||
;;
|
||||
;;; Code:
|
||||
(require 'dash)
|
||||
|
||||
(require 'rx)
|
||||
(require 'seq)
|
||||
@@ -252,11 +251,6 @@ If BUFFER is not specified, use the current buffer."
|
||||
(setq path (buffer-file-name (buffer-base-buffer)))
|
||||
(org-roam-file-p path)))))
|
||||
|
||||
(defun org-roam-buffer-list ()
|
||||
"Return a list of buffers that are Org-roam files."
|
||||
(--filter (org-roam-buffer-p it)
|
||||
(buffer-list)))
|
||||
|
||||
(defun org-roam--file-name-extension (filename)
|
||||
"Return file name extension for FILENAME.
|
||||
Like `file-name-extension', but does not strip version number."
|
||||
@@ -295,12 +289,12 @@ Use external shell commands if defined in `org-roam-list-files-commands'."
|
||||
(defun org-roam--shell-command-files (cmd)
|
||||
"Run CMD in the shell and return a list of files.
|
||||
If no files are found, an empty list is returned."
|
||||
(--> cmd
|
||||
(shell-command-to-string it)
|
||||
(ansi-color-filter-apply it)
|
||||
(split-string it "\n")
|
||||
(seq-filter (lambda (s)
|
||||
(not (or (null s) (string= "" s)))) it)))
|
||||
(thread-last cmd
|
||||
shell-command-to-string
|
||||
ansi-color-filter-apply
|
||||
(funcall (lambda (str) (split-string str "\n")))
|
||||
(seq-filter (lambda (s)
|
||||
(not (or (null s) (string= "" s)))))))
|
||||
|
||||
(defun org-roam--list-files-search-globs (exts)
|
||||
"Given EXTS, return a list of search globs.
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
This is org-roam.info, produced by makeinfo version 7.2 from
|
||||
This is org-roam.info, produced by makeinfo version 7.3 from
|
||||
org-roam.texi.
|
||||
|
||||
Copyright (C) 2020-2025 Jethro Kuan <jethrokuan95@gmail.com>
|
||||
Copyright (C) 2020-2026 Jethro Kuan <jethrokuan95@gmail.com> and
|
||||
the Org-roam contributors
|
||||
|
||||
You can redistribute this document and/or modify it under the terms
|
||||
of the GNU General Public License as published by the Free Software
|
||||
@@ -24,9 +25,10 @@ File: org-roam.info, Node: Top, Next: Introduction, Up: (dir)
|
||||
Org-roam User Manual
|
||||
********************
|
||||
|
||||
This manual is for Org-roam version 2.3.1.
|
||||
This manual is for Org-roam version 2.3.1-devel.
|
||||
|
||||
Copyright (C) 2020-2025 Jethro Kuan <jethrokuan95@gmail.com>
|
||||
Copyright (C) 2020-2026 Jethro Kuan <jethrokuan95@gmail.com> and
|
||||
the Org-roam contributors
|
||||
|
||||
You can redistribute this document and/or modify it under the terms
|
||||
of the GNU General Public License as published by the Free Software
|
||||
@@ -415,9 +417,6 @@ the Org-roam library. Add the following code to your ‘.emacs’:
|
||||
You now have Org-roam installed. However, you don't necessarily have
|
||||
the dependencies that it requires. These include:
|
||||
|
||||
• dash
|
||||
• f
|
||||
• s
|
||||
• org
|
||||
• emacsql
|
||||
• magit-section
|
||||
@@ -603,8 +602,7 @@ Node selection is achieved via the ‘completing-read’ interface,
|
||||
typically through ‘org-roam-node-read’. The presentation of these nodes
|
||||
are governed by ‘org-roam-node-display-template’.
|
||||
|
||||
• Variable: org-roam-node-display-template
|
||||
|
||||
-- Variable: org-roam-node-display-template
|
||||
Configures display formatting for Org-roam node.
|
||||
|
||||
Patterns of form "${field-name:length}" are interpolated based on
|
||||
@@ -700,8 +698,7 @@ Org-roam takes special care of additionally trying to process these
|
||||
links. Use ‘org-roam-db-extra-links-elements’ to specify which
|
||||
additional Org AST element types to consider.
|
||||
|
||||
• Variable: org-roam-db-extra-links-elements
|
||||
|
||||
-- Variable: org-roam-db-extra-links-elements
|
||||
The list of Org element types to include for parsing by Org-roam.
|
||||
|
||||
By default, when parsing Org's AST, links within keywords and
|
||||
@@ -714,8 +711,7 @@ within property drawers. For example, we would not want ‘ROAM_REFS’
|
||||
links to be self-referential. Hence, to exclude specific keys, we use
|
||||
‘org-roam-db-extra-links-exclude-keys’.
|
||||
|
||||
• Variable: org-roam-db-extra-links-exclude-keys
|
||||
|
||||
-- Variable: org-roam-db-extra-links-exclude-keys
|
||||
Keys to ignore when mapping over links.
|
||||
|
||||
The car of the association list is the Org element type (e.g.
|
||||
@@ -737,8 +733,7 @@ using the interactive commands.
|
||||
can be a slow operation. You can disable the automatic updating of the
|
||||
database by setting ‘org-roam-db-update-on-save’ to ‘nil’.
|
||||
|
||||
• Variable: org-roam-db-update-on-save
|
||||
|
||||
-- Variable: org-roam-db-update-on-save
|
||||
If t, update the Org-roam database upon saving the file. Disable
|
||||
this if your files are large and updating the database is slow.
|
||||
|
||||
@@ -764,15 +759,13 @@ references etc.). There are two main commands to use here:
|
||||
To bring up a buffer that tracks the current node at point, call ‘M-x
|
||||
org-roam-buffer-toggle’.
|
||||
|
||||
• Function: org-roam-buffer-toggle
|
||||
|
||||
-- Function: org-roam-buffer-toggle
|
||||
Toggle display of the ‘org-roam-buffer’.
|
||||
|
||||
To bring up a buffer that's dedicated for a specific node, call ‘M-x
|
||||
org-roam-buffer-display-dedicated’.
|
||||
|
||||
• Function: org-roam-buffer-display-dedicated
|
||||
|
||||
-- Function: org-roam-buffer-display-dedicated
|
||||
Launch node dedicated Org-roam buffer without visiting the node
|
||||
itself.
|
||||
|
||||
@@ -945,13 +938,11 @@ node:
|
||||
Alternatively, Org-roam provides some functions to add or remove
|
||||
aliases.
|
||||
|
||||
• Function: org-roam-alias-add alias
|
||||
|
||||
-- Function: org-roam-alias-add alias
|
||||
Add ALIAS to the node at point. When called interactively, prompt
|
||||
for the alias to add.
|
||||
|
||||
• Function: org-roam-alias-remove
|
||||
|
||||
-- Function: org-roam-alias-remove
|
||||
Remove an alias from the node at point.
|
||||
|
||||
|
||||
@@ -1001,13 +992,11 @@ has a citation key and a URL at the same time.
|
||||
|
||||
Org-roam also provides some functions to add or remove refs.
|
||||
|
||||
• Function: org-roam-ref-add ref
|
||||
|
||||
-- Function: org-roam-ref-add ref
|
||||
Add REF to the node at point. When called interactively, prompt
|
||||
for the ref to add.
|
||||
|
||||
• Function: org-roam-ref-remove
|
||||
|
||||
-- Function: org-roam-ref-remove
|
||||
Remove a ref from the node at point.
|
||||
|
||||
|
||||
@@ -1035,9 +1024,9 @@ File: org-roam.info, Node: Using the Cached Information, Up: Citations
|
||||
9.1 Using the Cached Information
|
||||
================================
|
||||
|
||||
It is common to use take reference notes for academic papers. To
|
||||
designate the node to be the canonical node for the academic paper, we
|
||||
can use its unique citation key:
|
||||
It is common to take notes on academic reference meterial. To designate
|
||||
a node as the canonical node for a particular reference, we can use its
|
||||
unique citation key:
|
||||
|
||||
* Probabilistic Robotics
|
||||
:PROPERTIES:
|
||||
@@ -1127,8 +1116,7 @@ choice.
|
||||
|
||||
(setq org-roam-completion-everywhere t)
|
||||
|
||||
• Variable: org-roam-completion-everywhere
|
||||
|
||||
-- Variable: org-roam-completion-everywhere
|
||||
When non-nil, provide link completion matching outside of Org links.
|
||||
|
||||
|
||||
@@ -1199,10 +1187,11 @@ the elements of the template are similar to ‘org-capture’ templates.
|
||||
6. ‘:target’ is a compulsory specification in the Org-roam capture
|
||||
template. The first element of the list indicates the type of the
|
||||
target, the second element indicates the location of the captured
|
||||
node, and the rest of the elements indicate prefilled template that
|
||||
will be inserted and the position of the point will be adjusted
|
||||
for. The latter behavior varies from type to type of the capture
|
||||
target.
|
||||
node (note the target location undergoes Org template expansion
|
||||
like the body elements), and the rest of the elements indicate
|
||||
prefilled template that will be inserted and the position of the
|
||||
point will be adjusted for. The latter behavior varies from type
|
||||
to type of the capture target.
|
||||
7. ‘:unnarrowed t’ tells org-capture to show the contents for the
|
||||
whole file, rather than narrowing to just the entry. This is part
|
||||
of the Org-capture templates.
|
||||
@@ -1416,14 +1405,14 @@ following additional configurations:
|
||||
1. Add option '-c' to 'emacsclient' in the script, and start emacs
|
||||
from command line with 'emacs -daemon'
|
||||
|
||||
on open location this_URL
|
||||
set EC to "/usr/local/bin/emacsclient -c --no-wait "
|
||||
set filePath to quoted form of this_URL
|
||||
do shell script EC & filePath & " &> /dev/null &"
|
||||
tell application "Emacs" to activate
|
||||
end open location
|
||||
on open location this_URL
|
||||
set EC to "/usr/local/bin/emacsclient -c --no-wait "
|
||||
set filePath to quoted form of this_URL
|
||||
do shell script EC & filePath & " &> /dev/null &"
|
||||
tell application "Emacs" to activate
|
||||
end open location
|
||||
|
||||
1. Add '(server-start)' in .emacs (in this case you do not need option
|
||||
2. Add '(server-start)' in .emacs (in this case you do not need option
|
||||
'-c' for 'emacsclient' in the script, and you do not need to start
|
||||
emacs with 'emacs -daemon'
|
||||
|
||||
@@ -1529,8 +1518,7 @@ org-roam-protocol::.
|
||||
|
||||
The entry point to graph creation is ‘org-roam-graph’.
|
||||
|
||||
• Function: org-roam-graph & optional arg node
|
||||
|
||||
-- Function: org-roam-graph & optional arg node
|
||||
Build and display a graph for NODE. ARG may be any of the following
|
||||
values:
|
||||
|
||||
@@ -1538,8 +1526,7 @@ values:
|
||||
• ‘integer’ an integer argument ‘N’ will show the graph for the
|
||||
connected components to node up to ‘N’ steps away.
|
||||
|
||||
• User Option: org-roam-graph-executable
|
||||
|
||||
-- User Option: org-roam-graph-executable
|
||||
Path to the graphing executable (in this case, Graphviz). Set this
|
||||
if Org-roam is unable to find the Graphviz executable on your
|
||||
system.
|
||||
@@ -1547,8 +1534,7 @@ values:
|
||||
You may also choose to use ‘neato’ in place of ‘dot’, which
|
||||
generates a more compact graph layout.
|
||||
|
||||
• User Option: org-roam-graph-viewer
|
||||
|
||||
-- User Option: org-roam-graph-viewer
|
||||
Org-roam defaults to using Firefox (located on PATH) to view the
|
||||
SVG, but you may choose to set it to:
|
||||
|
||||
@@ -1581,23 +1567,19 @@ Org-roam supports some of them. See
|
||||
<https://graphviz.gitlab.io/_pages/doc/info/attrs.html> for customizable
|
||||
options.
|
||||
|
||||
• User Option: org-roam-graph-filetype
|
||||
|
||||
-- User Option: org-roam-graph-filetype
|
||||
The file type to generate for graphs. This defaults to ‘"svg"’.
|
||||
|
||||
• User Option: org-roam-graph-extra-config
|
||||
|
||||
-- User Option: org-roam-graph-extra-config
|
||||
Extra options passed to graphviz for the digraph (The "G"
|
||||
attributes). Example: ‘'~(("rankdir" . "LR"))’
|
||||
|
||||
• User Option: org-roam-graph-node-extra-config
|
||||
|
||||
-- User Option: org-roam-graph-node-extra-config
|
||||
An alist of options to style the nodes. The car of the alist node
|
||||
type such as ‘"id"’, or ‘"http"’. The cdr of the list is another
|
||||
alist of Graphviz node options (the "N" attributes).
|
||||
|
||||
• User Option: org-roam-graph-edge-extra-config
|
||||
|
||||
-- User Option: org-roam-graph-edge-extra-config
|
||||
Extra options for edges in the graphviz output (The "E"
|
||||
attributes). Example: ‘'(("dir" . "back"))’
|
||||
|
||||
@@ -1623,13 +1605,11 @@ File: org-roam.info, Node: Configuration, Next: Usage, Up: org-roam-dailies
|
||||
|
||||
For ‘org-roam-dailies’ to work, you need to define two variables:
|
||||
|
||||
• Variable: ‘org-roam-dailies-directory’
|
||||
|
||||
-- Variable: org-roam-dailies-directory
|
||||
Path to daily-notes. This path is relative to
|
||||
‘org-roam-directory’.
|
||||
|
||||
• Variable: ‘org-roam-dailies-capture-templates’
|
||||
|
||||
-- Variable: org-roam-dailies-capture-templates
|
||||
Capture templates for daily-notes in Org-roam.
|
||||
|
||||
Here is a sane default configuration:
|
||||
@@ -1652,34 +1632,29 @@ File: org-roam.info, Node: Usage, Prev: Configuration, Up: org-roam-dailies
|
||||
|
||||
‘org-roam-dailies’ provides these interactive functions:
|
||||
|
||||
• Function: ‘org-roam-dailies-capture-today’ &optional goto
|
||||
|
||||
-- Function: org-roam-dailies-capture-today &optional goto
|
||||
Create an entry in the daily note for today.
|
||||
|
||||
When ‘goto’ is non-nil, go to the note without creating an entry.
|
||||
|
||||
• Function: ‘org-roam-dailies-goto-today’
|
||||
|
||||
-- Function: org-roam-dailies-goto-today
|
||||
Find the daily note for today, creating it if necessary.
|
||||
|
||||
There are variants of those commands for ‘-yesterday’ and
|
||||
‘-tomorrow’:
|
||||
|
||||
• Function: ‘org-roam-dailies-capture-yesterday’ n &optional goto
|
||||
|
||||
-- Function: org-roam-dailies-capture-yesterday n &optional goto
|
||||
Create an entry in the daily note for yesterday.
|
||||
|
||||
With numeric argument ‘n’, use the daily note ‘n’ days in the past.
|
||||
|
||||
• Function: ‘org-roam-dailies-goto-yesterday’
|
||||
|
||||
-- Function: org-roam-dailies-goto-yesterday
|
||||
With numeric argument N, use the daily-note N days in the future.
|
||||
|
||||
There are also commands which allow you to use Emacs’s ‘calendar’ to
|
||||
find the date
|
||||
|
||||
• Function: ‘org-roam-dailies-capture-date’
|
||||
|
||||
-- Function: org-roam-dailies-capture-date
|
||||
Create an entry in the daily note for a date using the calendar.
|
||||
|
||||
Prefer past dates, unless ‘prefer-future’ is non-nil.
|
||||
@@ -1687,23 +1662,19 @@ find the date
|
||||
With a 'C-u' prefix or when ‘goto’ is non-nil, go the note without
|
||||
creating an entry.
|
||||
|
||||
• Function: ‘org-roam-dailies-goto-date’
|
||||
|
||||
-- Function: org-roam-dailies-goto-date
|
||||
Find the daily note for a date using the calendar, creating it if
|
||||
necessary.
|
||||
|
||||
Prefer past dates, unless ‘prefer-future’ is non-nil.
|
||||
|
||||
• Function: ‘org-roam-dailies-find-directory’
|
||||
|
||||
-- Function: org-roam-dailies-find-directory
|
||||
Find and open ‘org-roam-dailies-directory’.
|
||||
|
||||
• Function: ‘org-roam-dailies-goto-previous-note’
|
||||
|
||||
-- Function: org-roam-dailies-goto-previous-note
|
||||
When in an daily-note, find the previous one.
|
||||
|
||||
• Function: ‘org-roam-dailies-goto-next-note’
|
||||
|
||||
-- Function: org-roam-dailies-goto-next-note
|
||||
When in an daily-note, find the next one.
|
||||
|
||||
|
||||
@@ -2260,14 +2231,12 @@ The node interface is cleanly defined using ‘cl-defstruct’. The primary
|
||||
method to access nodes is ‘org-roam-node-at-point’ and
|
||||
‘org-roam-node-read’:
|
||||
|
||||
• Function: org-roam-node-at-point &optional assert
|
||||
|
||||
-- Function: org-roam-node-at-point &optional assert
|
||||
Return the node at point. If ASSERT, throw an error if there is no
|
||||
node at point.
|
||||
|
||||
• Function: org-roam-node-read &optional initial-input filter-fn
|
||||
sort-fn require-match
|
||||
|
||||
-- Function: org-roam-node-read &optional initial-input filter-fn
|
||||
sort-fn require-match
|
||||
Read and return an 'org-roam-node'. INITIAL-INPUT is the initial
|
||||
minibuffer prompt value. FILTER-FN is a function to filter out
|
||||
nodes: it takes a single argument (an ‘org-roam-node’), and when
|
||||
@@ -2305,9 +2274,7 @@ the user experience, and sometimes it is desirable to use Org-roam's
|
||||
capturing system instead. The exposed function to be used in extensions
|
||||
is ‘org-roam-capture-’:
|
||||
|
||||
• Function: org-roam-capture- &key goto keys node info props
|
||||
templates
|
||||
|
||||
-- Function: org-roam-capture- &key goto keys node info props templates
|
||||
Main entry point. GOTO and KEYS correspond to 'org-capture'
|
||||
arguments. INFO is a plist for filling up Org-roam's capture
|
||||
templates. NODE is an 'org-roam-node' construct containing
|
||||
@@ -2391,103 +2358,147 @@ File: org-roam.info, Node: Function Index, Next: Variable Index, Prev: Comman
|
||||
Appendix C Function Index
|
||||
*************************
|
||||
|
||||
| ||||