Open Aneeqasif opened 6 months ago
How does org-roam create a note? I don't use it so I don't really know.
This code works
(defun fap/ignore-errors-advice (orig-fun &rest args)
(ignore-errors (apply orig-fun args)))
(advice-add 'xeft-create-note :around #'fap/ignore-errors-advice)
(setq xeft-filename-fn (lambda (search-phrase)
(org-roam-capture- :node (org-roam-node-create :title search-phrase))))
but xeft will throw an error as the function doesn't return the new filename. Don't know if this fixable as we don't know if the capture will get finalized/saved or discarded. But seems to work fine nonetheless, I was able to find the new file via xeft after finalizing the capture.
Ok, in that case you might want to redefine xeft-create-note
or add an advice around it.
Updated the code in my earlier comment, @Aneeqasif please have a look. :)
when a prompt is not matched in the notes xeft allow to make a new note. I want to use it but it should create new note just like org-roam created new note with the default template , i read the
org-roam-node-find
function andxeft-filename-fn
but i am not expert enough in elisp make it work, would you please help me out on this ?