org-roam / org-roam-bibtex

Org Roam integration with bibliography management software
GNU General Public License v3.0
571 stars 47 forks source link

PDF Scrapper: Should not ask for generation of keys during export #161

Closed j-steinbach closed 3 years ago

j-steinbach commented 3 years ago

During the PDF Scrapper process, between the "Bibtex" and the "Org" phase, the user gets asked if they want to "automatically generate keys".

This behaviour does not fit the rest of the process and is confusing: The option to manually generate the keys is already given in the "head-bar", with the command "C-c C-u". New users will likely click "yes", which will bring them to the next step without giving them the chance to review the generation results. They have to then navigate back to fix issues. Advanced users (i.e. me) don't want the automatic generation, as they are likely are have generated and fixed their keys manually. Accepting "yes" in turn overwrites their work. They in turn have to click "no" every time.

Either remove the prompt, or make it disable-able, or only prompt if the user didn't already generated keys manually. ("You didn't generate keys yet. Generate keys automatically? Y/N)


I actually think I reported this before? Maybe I thought I did, as it has been annoying me for quite some time.

myshevchuk commented 3 years ago

Yeah, you mentioned this earlier. The actual behaviour was to prompt the user only when the buffer has been modified. The prompt would not appear if the buffer was saved before proceeding to Org. When generating keys with C-c C-u, the buffer is saved automatically, thus suppressing the future prompt. Also, the scrapper-save branch makes it possible to use C-x C-s to correctly save the changes, in this case the prompt is also suppressed. That was quite a reasonable behaviour for me as I sometimes forgot to generate keys after making changes to the buffer.

Anyway, the most recent commit introduces a user option orb-pdf-scrapper-prompt-to-generate-keys which allows for a more fine control of the prompt. The default value of this option, the symbol when-buffer-modified, allows to retain the old behaviour - prompt only if buffer was modified. Setting this variable to nil will make the prompt disappear forever. Setting it to any other non-nil value, will make the prompt even more annoying - it will appear always! (make a bug into a feature)

j-steinbach commented 3 years ago

My bad, sorry for the trouble. I will make sure to double-check if I reported something previously before in the future. :disappointed:

myshevchuk commented 3 years ago

No problem, technically you did not report in a separate issue. So you can now set (setq orb-pdf-scrapper-prompt-to-generate-keys nil) to forget about the prompt forever.