Compare commits

...

2 commits

Author SHA1 Message Date
d48d07aff9 [feat/garden] add plant function 2024-07-14 22:53:11 +08:00
3e88db1510 [module] enable ansible 2024-07-14 22:48:25 +08:00
2 changed files with 26 additions and 3 deletions

View file

@ -115,7 +115,8 @@
:target (file+head "%<%Y-%m-%d>.org"
"#+title: %<%Y-%m-%d>\n#+date: %T\n#+hugo_auto_set_lastmod: t\n#+hugo_section: daily\n"))))
#+end_src
*** garden
*** Garden
数字花园,开始种植思想……
#+begin_src emacs-lisp
@ -127,6 +128,29 @@
(add-to-list 'org-agenda-files org-roam-garden-file)
#+end_src
#+begin_src emacs-lisp
(defun org-roam-garden-plant ()
(interactive)
(save-excursion
(goto-char (point-min))
(let* ((node (org-roam-node-at-point))
(title (org-roam-node-title node))
(file (org-roam-node-file node)))
(org-set-property "GARDEN-STATE" "seedling")
(org-roam-update-garden-file title file))
(save-buffer)))
(defun org-roam-update-garden-file (heading file-path)
(with-current-buffer (find-file-noselect org-roam-garden-file)
(let ((buffer (current-buffer)))
(if (org-find-exact-headline-in-buffer heading)
(message "Plant exists, skip...")
(goto-char (point-max))
(insert (concat "* " heading "\n[[" file-path "]]"))
(org-schedule nil (format "<%s 22:00 ++1d >" (format-time-string "%Y-%m-%d %u")))
(save-buffer)))))
#+end_src
** org-roam-ui
非常酷炫的一个网页 =roam= 笔记查看,可惜如果能够只查看某个节点就好了,
数据量一大我怕打开会直接卡死。
@ -563,7 +587,6 @@
** Paredit
#+begin_src emacs-lisp
(use-package! paredit
:after clojure-mode
:config
(add-hook 'clojure-mode-hook 'enable-paredit-mode)
(add-hook 'emacs-lisp-mode-hook 'enable-paredit-mode)

View file

@ -85,7 +85,7 @@
;; grammar ; tasing grammar mistake every you make
:tools
;;ansible
ansible
biblio ; Writes a PhD for you (citation needed)
(debugger +lsp) ; FIXME stepping through code, to help you add bugs
;;direnv