@@ -80,6 +80,7 @@ separator that does not otherwise occur in citation keys."
8080
8181(defvar citar-notes-paths )
8282(defvar citar-library-paths )
83+ (defvar citar-library-paths-recursive )
8384(defvar citar-library-file-extensions )
8485(defvar citar-note-format-function )
8586
@@ -177,6 +178,14 @@ whether entries have associated files."
177178 (when citar-file-variable
178179 (lambda (citekey ) (and (citar-get-value citar-file-variable citekey) t ))))
179180
181+ (defun citar--library-dirs ()
182+ " Return all directories to be searched for library files."
183+ (mapcar (lambda (dir )
184+ (cons dir (when citar-library-paths-recursive
185+ (directory-files-recursively dir " " :include-directories
186+ #'file-directory-p ))))
187+ citar-library-paths))
188+
180189(defun citar-file--get-from-file-field (&optional keys )
181190 " Return files for KEYS by parsing the `citar-file-variable' field.
182191
@@ -191,7 +200,7 @@ files associated with KEYS."
191200 (when-let ((filefield citar-file-variable))
192201 (citar--check-configuration 'citar-library-paths 'citar-library-file-extensions
193202 'citar-file-parser-functions )
194- (let ((dirs (append citar-library-paths
203+ (let ((dirs (append ( citar-- library-dirs)
195204 (mapcar #'file-name-directory (citar--bibliography-files)))))
196205 (citar--get-resources-using-function
197206 (lambda (citekey entry )
0 commit comments