helm-bibtex icon indicating copy to clipboard operation
helm-bibtex copied to clipboard

add bibtex-completion-notes-prefix

Open ghost opened this issue 7 years ago • 3 comments

Hi!

Could I suggest that you might add a variable bibtex-completion-notes-prefix or similar? The reason for this is that biblatex has an automatic annotation support which expects that the annotation files are by default of the form bibannotation-[bibkey].tex. This is not possible to achieve with the current helm-bibtex (or ivy-bibtex, in my case) configuration system. (Or at least I can't figure out how.) If bibtex-completion-notes-path were just a text string added to the front of the bibkey when constructing the notes file names, then that could be used as in ~/path/to/notes/directory/bibannotation- but in current implementation, that results the notes ending up in the file called bibannotation-, so another option is needed to achieve the effect of placing the notes in a file like ~/path/to/notes/directory/bibannotation-bibkey.tex

Best,

Harri

ghost avatar Mar 29 '17 10:03 ghost

Sounds useful. Ideally we'd have a format string for the filename that users can structure in whichever way they want. Not sure though how to do that without breaking existing configurations (we already have bibtex-completion-notes-extension).

tmalsburg avatar Mar 29 '17 13:03 tmalsburg

You could still have the format string and extensions in separate, optional variables: the extension, if set, is always added to the end of the string formatted according to the format string, if set. This would keep backward compatibility and allow for more complex configurations in the case of the actual file name.

ghost avatar Mar 30 '17 16:03 ghost

Not as clean as I would like but, yes, that's probably the best solution. Would you mind making a PR for this?

tmalsburg avatar Mar 30 '17 16:03 tmalsburg