Feature request: Allow citar
to add multiple files to library item/citeky via citar-add-file-to-library
#821
Labels
enhancement
New feature or request
While setting the
citar-file-additional-files-separator
variable to non-nil allows a library item to have multiple associated files under the same cite-key -- e.g.{cite-key}_{cite-year}.pdf
,{cite-key}_{cite-year}-1.pdf
,{cite-key}_{cite-year}-2.pdf
-- it is currently only possible to add an additional file to an item only by renaming the file and moving it to the directory manually. Otherwise, runningM-x citar-add-file-to-library
will produce theFile ... exists, overwrite? (y or n)
prompt in the minibuffer, and answering will either overwrite the existing file (y
) or cancel the operation (n
).Via @bdarcus in #820 (comment)_, the following code needs to change:
citar/citar.el
Lines 1337 to 1360 in 885b86f
I would say that
needs to change to prompt the user to either overwrite the existing file (
y
), or add the new file with an appended filename (a
), or cancel (c
/q
/n
).If the user chooses to add with an appended filename, then
citar
should check if the-1
,-2
...-n
. versions of the filename are in use, before adding the file with filename{cite_key}_{cite_year}-{n+1}.ext
.The text was updated successfully, but these errors were encountered: