Skip to content

Commit

Permalink
ci: Fiddle around
Browse files Browse the repository at this point in the history
  • Loading branch information
meedstrom committed Sep 1, 2024
1 parent 529f23d commit 4c768e2
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 28 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/melpazoid.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
env:
LOCAL_REPO: ${{ github.workspace }}
# RECIPE is your recipe as written for MELPA:
RECIPE: (org-node :repo "meedstrom/org-node" :fetcher github)
RECIPE: (org-node :repo "meedstrom/org-node" :fetcher github :files ("org-node-fakeroam.el"))
# set this to false (or remove it) if the package isn't on MELPA:
EXIST_OK: false
run: echo $GITHUB_REF && make -C ~/melpazoid
56 changes: 30 additions & 26 deletions org-node-fakeroam.el
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
;;; org-node-fakeroam.el --- Stand-ins for org-roam-autosync-mode -*- no-byte-compile: t; no-native-compile: t; lexical-binding: t; -*-
;;; org-node-fakeroam.el --- Stand-ins for org-roam-autosync-mode -*- lexical-binding: t; -*-

;; Copyright (C) 2024 Martin Edström

Expand All @@ -17,9 +17,8 @@

;; Author: Martin Edström <[email protected]>
;; Created: 2024-04-13
;; Version: 0.6.0.50-git
;; Keywords: org, hypermedia
;; Package-Requires: ((emacs "28.1") (compat "30") (org-node "0.6.0.50-git") (org-roam "2.2.2") (emacsql "4.0.0"))
;; Package-Requires: ((emacs "28") (compat "30") (org-node "0") (org-roam "2.2.2") (emacsql "4.0.0"))
;; URL: https://github.com/meedstrom/org-node

;;; Commentary:
Expand All @@ -43,9 +42,14 @@
(declare-function org-roam-buffer--visibility "org-roam-mode")
(declare-function org-roam-buffer-persistent-redisplay "org-roam-mode")
(declare-function org-roam-buffer-refresh "org-roam-mode")
(declare-function org-roam-reflink-create "org-roam-mode")
(declare-function org-roam-backlink-create "org-roam-mode")
(declare-function org-roam-node-id "org-roam-node")
(declare-function org-roam-node-create "org-roam-node")
(declare-function org-roam-dailies--capture "org-roam-dailies")
(declare-function org-roam-db "org-roam-db")
(declare-function org-roam-db--close "org-roam-db")
(declare-function org-roam-db--close-all "org-roam-db")
(declare-function org-roam-db-query "org-roam-db")
(declare-function org-roam-fontify-like-in-org-mode "org-roam-utils")
(declare-function org-roam-node-insert-section "org-roam-mode")
Expand Down Expand Up @@ -475,6 +479,29 @@ This includes all links and citations that touch NODE."

;;;; Bonus advices

(defvar org-node-fakeroam-dir nil
"Cached value of `org-roam-directory' transformed for org-node.
This path should be directly comparable to the paths saved in
org-node objects, which lets you skip using `file-truename' to
compare paths.
See also `org-node-fakeroam-daily-dir'.")

(defvar org-node-fakeroam-daily-dir nil
"Cached value for Roam's dailies dir transformed for org-node.
This path should be directly comparable to the paths saved in
org-node objects, which lets you skip using `file-truename' to
compare paths.
Rationale: The original `org-roam-dailies-directory' was a
relative path, which incurred verbosity penalties in all code
that used it (plus practically a major performance penalty since
`expand-file-name' was often used instead of `file-name-concat').
Even more verbosity is added on top for org-node, which needs to
process the path through `org-node-abbrev-file-names'. Thus
this variable provides an easy shorthand.")

;; (benchmark-call (byte-compile #'org-roam-list-files))
;; (benchmark-call (byte-compile #'org-node-fakeroam-list-files))
(defun org-node-fakeroam-list-files ()
Expand Down Expand Up @@ -514,29 +541,6 @@ For argument FILE, see that function."

;;;; Series-related

(defvar org-node-fakeroam-dir nil
"Cached value of `org-roam-directory' transformed for org-node.
This path should be directly comparable to the paths saved in
org-node objects, which lets you skip using `file-truename' to
compare paths.
See also `org-node-fakeroam-daily-dir'.")

(defvar org-node-fakeroam-daily-dir nil
"Cached value for Roam's dailies dir transformed for org-node.
This path should be directly comparable to the paths saved in
org-node objects, which lets you skip using `file-truename' to
compare paths.
Rationale: The original `org-roam-dailies-directory' was a
relative path, which incurred verbosity penalties in all code
that used it (plus practically a major performance penalty since
`expand-file-name' was often used instead of `file-name-concat').
Even more verbosity is added on top for org-node, which needs to
process the path through `org-node-abbrev-file-names'. Thus
this variable provides an easy shorthand.")

;; TODO: Somehow make `org-node-new-via-roam-capture' able to do this?
;;;###autoload
(defun org-node-fakeroam-daily-create (ymd series-key &optional goto keys)
Expand Down
1 change: 0 additions & 1 deletion org-node.el
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

;; Author: Martin Edström <[email protected]>
;; Created: 2024-04-13
;; Version: 0.6.0.50-git
;; Keywords: org, hypermedia
;; Package-Requires: ((emacs "28.1") (compat "30") (dash "2.19.1") (transient "0.7.4") (persist "0.6.1"))
;; URL: https://github.com/meedstrom/org-node
Expand Down

0 comments on commit 4c768e2

Please sign in to comment.