@@ -80,6 +80,7 @@ separator that does not otherwise occur in citation keys."
80
80
81
81
(defvar citar-notes-paths )
82
82
(defvar citar-library-paths )
83
+ (defvar citar-library-paths-recursive )
83
84
(defvar citar-library-file-extensions )
84
85
(defvar citar-note-format-function )
85
86
@@ -177,6 +178,14 @@ whether entries have associated files."
177
178
(when citar-file-variable
178
179
(lambda (citekey ) (and (citar-get-value citar-file-variable citekey) t ))))
179
180
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
+
180
189
(defun citar-file--get-from-file-field (&optional keys )
181
190
" Return files for KEYS by parsing the `citar-file-variable' field.
182
191
@@ -191,7 +200,7 @@ files associated with KEYS."
191
200
(when-let ((filefield citar-file-variable))
192
201
(citar--check-configuration 'citar-library-paths 'citar-library-file-extensions
193
202
'citar-file-parser-functions )
194
- (let ((dirs (append citar-library-paths
203
+ (let ((dirs (append ( citar-- library-dirs)
195
204
(mapcar #'file-name-directory (citar--bibliography-files)))))
196
205
(citar--get-resources-using-function
197
206
(lambda (citekey entry )
0 commit comments