org-capture テンプレートから削除

 

5 Org Roam Hacks for Better Productivity in Emacs - System Crafters

projectタグをつけられた書類を纏めて検索する。

此処の方法を試してみた。が見事失敗。

特にタスク管理を目指すわけでも無いのだが、

『自動化』の為の手続きに、興味を惹かれた。

新規のファイルに「タグ」を付ける。

此れらの「指定の手順」も新鮮に感じた。

いざ順を追って進めていくと、以前追記した

Jethro Kuan氏の設定の方法で十分ファイルの

属性が確認できる。

書類の保存先フォルダーの指定の方が『簡単』で、

何も「agenda」機能を使用して、作成された書類群を

探し出す必要も無い。

最初から『同じフォルダー』に『目的が同じ』物だけが

保存されている。

How I Take Notes with Org-roam

[[How I Take Notes with Org-roam]]

Listing 4: Modifying the display template to show the node “type”

(setq org-roam-node-display-template

      (concat "${type:15} ${title:*} " (propertize "${tags:10}" 'face 'org-tag)))

 

「C-c n i」での候補となる「ファイル」には

画像の様な仕分けがされているので、上記Org Roam Hacksサイトでの

書き込みは「余り有効ではなかった」

 

f:id:moyse:20220415171250p:plain

org-capture-template

;;===========20220415日ここから削除

(defun my/org-roam-project-finalize-hook ()

  "Adds the captured project file to `org-agenda-files' if the

capture was not aborted."

  ;; Remove the hook since it was added temporarily

  (remove-hook 'org-capture-after-finalize-hook #'my/org-roam-project-finalize-hook)

 

  ;; Add project file to the agenda list if the capture was confirmed

  (unless org-note-abort

    (with-current-buffer (org-capture-get :buffer)

      (add-to-list 'org-agenda-files (buffer-file-name)))))

 

(defun my/org-roam-find-project ()

  (interactive)

  ;; Add the project file to the agenda after capture is finished

  (add-hook 'org-capture-after-finalize-hook #'my/org-roam-project-finalize-hook)

 

  ;; Select a project file to open, creating it if necessary

;  (org-roam-node-find

;   nil

;   nil

   (my/org-roam-filter-by-tag "Project")

   :templates

;   '(("p" "project" plain "* Goals\n\n%?\n\n* Tasks\n\n** TODO Add initial tasks\n\n* Dates\n\n"

;      :if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n#+category: ${title}\n#+filetags: Project")

;      :unnarrowed t)))

   )

 

(global-set-key (kbd "C-c n p") #'my/org-roam-find-project)

 

;;=============20220415日削除おわり