denote

2022-11-20 • 预计阅读时间 1 分钟

近期把笔记软件从Org-roam迁移到了Denote (denote.el),主要是有以下几个考虑:

  • org-roam在windows下面的性能堪忧,即使使用了emacs内置的sqlite性能还是不太行.
  • 酷炫的org-roam/org-roam-ui其实没啥用
  • denote性能和命名规范都挺合心意,

以下是我的配置:

(use-package denote
  :bind
  (("C-c n n" . denote)
   ("C-c n i" . denote-link-or-create)
   ("C-c n I" . denote-link)
   ("C-c n b" . denote-link-backlinks)
   ("C-c n a" . denote-add-front-matter)
   ("C-c n r" . denote-rename-file)
   ("C-c n R" . denote-rename-file-using-front-matter)
   )
  )

(setq denote-directory (expand-file-name "~/Org/notes/")
      denote-known-keywords '("dev" "read" "report" "cslp")
      denote-infer-keywords t
      denote-sort-keywords t
      denote-allow-multi-word-keywords t
      denote-date-prompt-use-org-read-date t
      denote-link-fontify-backlinks t
      denote-front-matter-date-format 'org-timestamp
      denote-prompts '(title keywords))

;; 在work目录下创建标签为work的笔记
(defun my-work-notes ()
  "Create an entry tagged 'journal', while prompting for a title."
  (interactive)
  (denote
   (denote--title-prompt)
   '("work") 'denote-file-type '"./work"))

笔记查找使用的是mclear-tools/consult-notes: Use consult to search notes

(setq xref-search-program 'ripgrep)
  (use-package consult-notes
    :commands (consult-notes
               consult-notes-search-in-all-notes
               consult-notes-org-roam-find-node
               consult-notes-org-roam-find-node-relation)
    :config
    (setq consult-notes-sources
          '(
            ("notes"             ?o "~/Org/notes")
            ))
    :bind
    (    ("C-c n F" . consult-notes))
    )

  (use-package consult-denote
    :bind
    (
     ("C-c n f" . consult-denote))
    )

参考资料

emacs

wentao

写点代码,解决点问题。

快速查找PowerShell的历史命令

利用PowerShell来进行端口连通性测试