mirror of
https://github.com/org-roam/org-roam
synced 2025-08-01 12:17:21 -05:00
(feat): add customizable org-roam-title-to-slug-function (#833)
Co-authored-by: Jethro Kuan <jethrokuan95@gmail.com>
This commit is contained in:
@ -39,12 +39,12 @@
|
||||
(defvar org-roam-encrypt-files)
|
||||
(defvar org-roam-directory)
|
||||
(defvar org-roam-mode)
|
||||
(defvar org-roam-title-to-slug-function)
|
||||
(declare-function org-roam--get-title-path-completions "org-roam")
|
||||
(declare-function org-roam--get-ref-path-completions "org-roam")
|
||||
(declare-function org-roam--file-path-from-id "org-roam")
|
||||
(declare-function org-roam--find-file "org-roam")
|
||||
(declare-function org-roam--format-link "org-roam")
|
||||
(declare-function org-roam--title-to-slug "org-roam")
|
||||
(declare-function org-roam-mode "org-roam")
|
||||
(declare-function org-roam-completion--completing-read "org-roam-completion")
|
||||
|
||||
@ -349,7 +349,7 @@ This uses the templates defined at `org-roam-capture-templates'."
|
||||
(title (or (plist-get res :title) title-with-keys))
|
||||
(file-path (plist-get res :path)))
|
||||
(let ((org-roam-capture--info (list (cons 'title title)
|
||||
(cons 'slug (org-roam--title-to-slug title))
|
||||
(cons 'slug (funcall org-roam-title-to-slug-function title))
|
||||
(cons 'file file-path)))
|
||||
(org-roam-capture--context 'capture))
|
||||
(setq org-roam-capture-additional-template-props (list :capture-fn 'org-roam-capture))
|
||||
|
Reference in New Issue
Block a user