vendor: import org-roam blog export and helpers from mac@0789326
New files, no local counterpart, taken verbatim from upstream:
qwan/org-roam-export-blog.el org-roam note -> firehose draft / jekyll draft
qwan/org-roam-export-blog-test.el 364-line ERT suite for the above
qwan/test-fixtures/vault/ vault fixture (notes + .attach tree)
mostalive/{my-org-roam,convert-chats-to-org,journelly-convert-entry-to-org-roam}.el
config-local.example.el template for gitignored config-local.el
elfeed.org, mise.toml feed list; node 24 pin (2ad9dfd)
Not imported, deliberately:
qwan/qwan-markdown-dnd.el earlier, cruder prototype of the same idea as
our firehose-blog.el: copies dropped files to a
cwd-relative dir, overwrites on name clash,
no year dirs, no tests, and evaluates an
ert-deftest at load time (upstream had to
disable it in 7153a24/e1d2415). Installing it
alongside firehose-blog.el would put two
handlers in dnd-protocol-alist for markdown
buffers. Ours supersedes it.
.devcontainer/, run-container.sh, coe-xx/, .pi/, CLAUDE.md, investigation.md
container/game-and-watch/agent scaffolding
README.org, AGENTS.md upstream's docs; ours are doom-specific
Nothing is wired up yet -- these files are inert until the next commit
requires them. Note that mostalive/my-org-roam.el shadows the `my-org-roam'
we currently load from ~/dev/emacs/org-roaming, so do not put mostalive/ on
the load-path without deciding which one wins.
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
;;; mostalive/my-org-roam.el -*- lexical-binding: t; -*-
|
||||
|
||||
(provide 'my-org-roam)
|
||||
;; Insert a link to a node, don't go to buffer when the node is new.
|
||||
(defun org-roam-node-insert-immediate (arg &rest args)
|
||||
(interactive "P")
|
||||
(let ((args (push arg args))
|
||||
(org-roam-capture-templates
|
||||
(list
|
||||
(append (car org-roam-capture-templates) '(:immediate-finish t)))))
|
||||
(apply #'org-roam-node-insert args)))
|
||||
|
||||
|
||||
;; make sure that org-timer works and org-pomodoro therefore. Limit the number of agenda files searched
|
||||
;; plus a utility function for flattening, since that is not part of the standard library of emacs
|
||||
|
||||
(defun org-roam-collect-org-agenda-files ()
|
||||
(interactive)
|
||||
(setq org-agenda-files (collect-org-agenda-files-)))
|
||||
|
||||
(defun collect-org-agenda-files- ()
|
||||
(seq-map
|
||||
'car
|
||||
(org-roam-db-query
|
||||
[:select
|
||||
[file]
|
||||
:from files
|
||||
:where (like file "%daily\/2023%")
|
||||
:order-by (desc file)
|
||||
:limit 20])))
|
||||
|
||||
(setq org-agenda-files (collect-org-agenda-files-))
|
||||
|
||||
|
||||
(defun open-today-log ()
|
||||
"Open today's log file in log/YYYY-MM-DD.md format.
|
||||
Creates the log directory if it doesn't exist."
|
||||
(interactive)
|
||||
(let* ((git-root (locate-dominating-file "." ".git"))
|
||||
(log-dir (concat git-root "log"))
|
||||
(date-str (format-time-string "%Y-%m-%d")))
|
||||
(unless (file-directory-p log-dir)
|
||||
(make-directory log-dir t))
|
||||
(let ((file-name (concat log-dir "/" date-str ".org")))
|
||||
(if (file-exists-p file-name)
|
||||
(find-file file-name)
|
||||
(progn (find-file file-name)
|
||||
(insert (format "# %s\n\n" date-str)))))))
|
||||
Reference in New Issue
Block a user