Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Key generator not so automatic #4569

Closed
alfureu opened this issue Jan 7, 2019 · 10 comments
Closed

Key generator not so automatic #4569

alfureu opened this issue Jan 7, 2019 · 10 comments

Comments

@alfureu
Copy link

alfureu commented Jan 7, 2019

JabRef 5.0-dev--snapshot--2019-01-05--master--e1cfec9c5
Windows 10 10.0 amd64
Java 1.8.0_172

I have enabled the automatic key generator with the following pattern:

[auth:lower]_[veryshorttitle:lower]_[year]

Whenever I add a new entry manually, starting with entry of Author, then Title, and Date, the resulting key generated is always __. I always need to delete this in order to have the key re-generated.

What should be the desired operation is that as soon as an entry is entered, that is relevant for the bibkey generated, the key should be automatically re-generated. Even if some entry points are still missing. I am not sure though whether this re-generation should occur only one leaves a field. If the re-generation is continuous, it might cause some higher CPU usage, I assume, but it would be nice to have it continuously scanned. Another issue might be how to respect once edited keys to remain the same.

@Siedlerchr
Copy link
Member

Siedlerchr commented Jan 7, 2019

Do you have "Overwrite existing keys" enabled?
Then you an simply press CTRL + G to regenerate the key

@alfureu
Copy link
Author

alfureu commented Jan 7, 2019

Yes, under Preferences > BibTeX key generator::

  • Generate keys for imported entries
  • Warn before overwriting keys
  • Do not overwrite existing keys

@tobiasdiez
Copy link
Member

I see where you are coming from but I believe that automatically updating leads to more frustration. It's a good idea when you add new entries. However, imagine you edit older ones and then your latex build fails just because you changed a year and forgot that the bibtexkey updates automatically... For this reason, I think, editing the key should be conscious process.

That being said, with your configuration you should be able to overwrite the key without the need to clear the field before. Is this not working for you?

@tobiasdiez tobiasdiez added keygenerator status: waiting-for-feedback The submitter or other users need to provide more information about the issue labels Jan 7, 2019
@matthiasgeiger
Copy link
Member

I agree with the reasoning of @tobiasdiez and would not like to have this "automated" key generator.

@alfureu
Copy link
Author

alfureu commented Jan 7, 2019

Hi @tobiasdiez, I absolutely agree with you, bibtex keys should not change without approval of the user.

My use-case is that the autogeneration when adding new entries does not work as it should, as after filling in the necessary entry fields all the bibtex key inserts automatically are the _ elements, without the entry fields.

All I had in mind is that if my BibTeX key generator is defined as follows:

[auth:lower]_[veryshorttitle:lower]_[year]

When I type in the Author field as AAA, the bibkey should already look like aaa__. When I add Title field as TTT, the bibkey should then look immediately as I type as aaa_ttt_, and adding the Date as 2019-01-06 would yield the bibkey as aaa_ttt_2019 as soon as I type it in. At the moment after filling in all these fields I get only __ as a result (please note the underscores are there 2x).

Thanks for looking into this for me.

@matthiasgeiger
Copy link
Member

Hi @DOFfactory ,
I also get your point.
In case of an import of a complete entry (e.g. from Websearch or by DOI/ISBN) the automated generation is already possible. However, it is hard to detect whether you are editing a "new" entry manually or an entry which BibTeX key already has been used in ia some file or not. Because this is just an "edit operation" in a bibentry.

As @Siedlerchr already mentioned: Entering the data step-by-step, than hitting CTRL-G once should do the trick for you. Isn't that acceptable?

@alfureu
Copy link
Author

alfureu commented Jan 7, 2019

Hi @matthiasgeiger, while I see your point, would you not agree that hitting an extra CTRL-G goes against the whole idea of auto key generation?

In my humble opinion, whenever one edits a field that is relevant for the bibkey field, then clicks away to another field, there is no reason why not to fill it in to the auto key generator, if and only if there is no key present yet for the given entry. If you want to re-genenate, the CTRL-G is a useful shortcut.

@matthiasgeiger
Copy link
Member

As I usually create my entries using the 'new entry by DOI' feature I have a different workflow and do not rely on a "fully automated" key generator. And for me the 'automatic' part was only relevant for creation on import or as a "automatic creation after manual trigger", i.e., based on the settings the key is correctly determined "automatically".

However, regarding 'why not to fill it in to the auto key generator, if and only if there is no key present yet': But then again you have the problem, that as soon you have entered the author, the generator kicks in, creates a (partial) key that is then NOT overwritten automatically after adding the year as there is already a key present then. 😉

It would be possible to implement a checking logic whether a change is affecting the key and then trigger the recreation automatically, but this definitely needs to be optional and I would not spend the effort in developing it as the CTRL-G workaround is possible. But that is just my opinion.

@tobiasdiez tobiasdiez added status: devcall and removed status: waiting-for-feedback The submitter or other users need to provide more information about the issue labels Jan 7, 2019
@Siedlerchr
Copy link
Member

I usually select all entries in my table, hit CTRL-G and that's it.

@koppor
Copy link
Member

koppor commented Jul 11, 2019

Good idea. Seems to be too intrusive at first. However, I like the automation. We will come back later to this topic, therefore closing adding freeze label and closing the issue for now.

@koppor koppor closed this as completed Jul 11, 2019
github-actions bot pushed a commit to calixtus/jabref that referenced this issue Feb 17, 2020
aa52aaa Encrypt Travis CI notification email addresses (JabRef#4570)
d8f2843 Update ayer.csl (JabRef#4569)
448e67e Create ayer.csl (JabRef#4565)
bf1ddae Update springer-basic-author-date.csl (JabRef#4562)
db525ac Update american-journal-of-physical-anthropology.csl (JabRef#4567)
9e81857 Update marine-ornithology.csl (JabRef#4566)
938537e Update government-and-opposition.csl (JabRef#4564)
50d0635 Update annales-de-demographie-historique.csl (JabRef#4560)
42b54d9 Create marine-ornithology.csl (JabRef#4559)
eff41bb Create dermatology-online.csl (JabRef#4558)
3911696 Update journal-of-forensic-sciences.csl (JabRef#4554)
059ea33 Small capitals and categories (JabRef#4556)
97b8c84 Create CSL Styles: estudios_hispanicos.csl (JabRef#4557)
57e0f9d Update sciences-po-ecole-doctorale-note-french.csl (JabRef#4552)
f481ea3 Create ipb-ppki-3.csl (JabRef#4550)
899d302 Update journal-of-neolithic-archaeology.csl (JabRef#4553)
e106215 Create annales-de-demographie-historique.csl (JabRef#4512)
4dd974e Create lauterbornia.csl (JabRef#4525)
e5277ae Update sciences-po-ecole-doctorale-note-french.csl (JabRef#4551)
f9cfe40 Add new IOP dependents (JabRef#4549)
daff985 Create brazilian-journal-of-veterinary-research-and-animal-science.csl (JabRef#4544)
10c6fa8 Update ens-de-lyon-centre-d-ingenierie-documentaire.csl (JabRef#4545)

git-subtree-dir: src/main/resources/csl-styles
git-subtree-split: aa52aaa
github-actions bot pushed a commit to NikodemKch/jabref-1 that referenced this issue Feb 19, 2020
9454897 Update ASA style
b3c6efd Reorder/reindent (JabRef#4571)
aa52aaa Encrypt Travis CI notification email addresses (JabRef#4570)
d8f2843 Update ayer.csl (JabRef#4569)
448e67e Create ayer.csl (JabRef#4565)
bf1ddae Update springer-basic-author-date.csl (JabRef#4562)
db525ac Update american-journal-of-physical-anthropology.csl (JabRef#4567)

git-subtree-dir: src/main/resources/csl-styles
git-subtree-split: 9454897
github-actions bot pushed a commit to abepolk/jabref that referenced this issue Feb 19, 2020
9454897 Update ASA style
b3c6efd Reorder/reindent (JabRef#4571)
aa52aaa Encrypt Travis CI notification email addresses (JabRef#4570)
d8f2843 Update ayer.csl (JabRef#4569)
448e67e Create ayer.csl (JabRef#4565)
bf1ddae Update springer-basic-author-date.csl (JabRef#4562)
db525ac Update american-journal-of-physical-anthropology.csl (JabRef#4567)

git-subtree-dir: src/main/resources/csl-styles
git-subtree-split: 9454897
github-actions bot pushed a commit that referenced this issue Feb 26, 2020
f03dece Bump nokogiri from 1.10.7 to 1.10.8 (#4580)
31bacc1 JCL: Fix formatting & space before locator
adfc9b0 Add The Journal of Comparative Law (#4576)
599d39c Create uni-freiburg-geschichte.csl (#4561)
3ad8d40 Add Begell House styles (#4575)
223527b Create begell-apa.csl (#4574)
d73b9a9 Update journal-of-neolithic-archaeology.csl (#4572)
5b2810c Create anatomical-sciences-education.csl (#4573)
9454897 Update ASA style
b3c6efd Reorder/reindent (#4571)
aa52aaa Encrypt Travis CI notification email addresses (#4570)
d8f2843 Update ayer.csl (#4569)
448e67e Create ayer.csl (#4565)
bf1ddae Update springer-basic-author-date.csl (#4562)
db525ac Update american-journal-of-physical-anthropology.csl (#4567)

git-subtree-dir: src/main/resources/csl-styles
git-subtree-split: f03dece
github-actions bot pushed a commit to systemoperator/jabref that referenced this issue Feb 26, 2020
f03dece Bump nokogiri from 1.10.7 to 1.10.8 (JabRef#4580)
31bacc1 JCL: Fix formatting & space before locator
adfc9b0 Add The Journal of Comparative Law (JabRef#4576)
599d39c Create uni-freiburg-geschichte.csl (JabRef#4561)
3ad8d40 Add Begell House styles (JabRef#4575)
223527b Create begell-apa.csl (JabRef#4574)
d73b9a9 Update journal-of-neolithic-archaeology.csl (JabRef#4572)
5b2810c Create anatomical-sciences-education.csl (JabRef#4573)
9454897 Update ASA style
b3c6efd Reorder/reindent (JabRef#4571)
aa52aaa Encrypt Travis CI notification email addresses (JabRef#4570)
d8f2843 Update ayer.csl (JabRef#4569)
448e67e Create ayer.csl (JabRef#4565)
bf1ddae Update springer-basic-author-date.csl (JabRef#4562)
db525ac Update american-journal-of-physical-anthropology.csl (JabRef#4567)
9e81857 Update marine-ornithology.csl (JabRef#4566)
938537e Update government-and-opposition.csl (JabRef#4564)
50d0635 Update annales-de-demographie-historique.csl (JabRef#4560)
42b54d9 Create marine-ornithology.csl (JabRef#4559)
eff41bb Create dermatology-online.csl (JabRef#4558)
3911696 Update journal-of-forensic-sciences.csl (JabRef#4554)
059ea33 Small capitals and categories (JabRef#4556)
97b8c84 Create CSL Styles: estudios_hispanicos.csl (JabRef#4557)
57e0f9d Update sciences-po-ecole-doctorale-note-french.csl (JabRef#4552)
f481ea3 Create ipb-ppki-3.csl (JabRef#4550)
899d302 Update journal-of-neolithic-archaeology.csl (JabRef#4553)
e106215 Create annales-de-demographie-historique.csl (JabRef#4512)
4dd974e Create lauterbornia.csl (JabRef#4525)
e5277ae Update sciences-po-ecole-doctorale-note-french.csl (JabRef#4551)
f9cfe40 Add new IOP dependents (JabRef#4549)
daff985 Create brazilian-journal-of-veterinary-research-and-animal-science.csl (JabRef#4544)
10c6fa8 Update ens-de-lyon-centre-d-ingenierie-documentaire.csl (JabRef#4545)

git-subtree-dir: src/main/resources/csl-styles
git-subtree-split: f03dece
github-actions bot pushed a commit to CaptainDaVinci/jabref that referenced this issue Mar 1, 2020
566df87 Create archeologicke-rozhledy.csl (JabRef#4586)
4205586 Update mcgill-en.csl - include render-legislation macro (JabRef#4579)
7d857f1 Create journal-of-plankton-research.csl (JabRef#4581)
05c8aca Update mercator-institut-fur-sprachforderung-und-deutsch-als-zweitsprache.csl (JabRef#4582)
564dc5f Update vodohospodarske-technicko-ekonomicke-informace.csl (JabRef#4584)
f03dece Bump nokogiri from 1.10.7 to 1.10.8 (JabRef#4580)
31bacc1 JCL: Fix formatting & space before locator
adfc9b0 Add The Journal of Comparative Law (JabRef#4576)
599d39c Create uni-freiburg-geschichte.csl (JabRef#4561)
3ad8d40 Add Begell House styles (JabRef#4575)
223527b Create begell-apa.csl (JabRef#4574)
d73b9a9 Update journal-of-neolithic-archaeology.csl (JabRef#4572)
5b2810c Create anatomical-sciences-education.csl (JabRef#4573)
9454897 Update ASA style
b3c6efd Reorder/reindent (JabRef#4571)
aa52aaa Encrypt Travis CI notification email addresses (JabRef#4570)
d8f2843 Update ayer.csl (JabRef#4569)
448e67e Create ayer.csl (JabRef#4565)
bf1ddae Update springer-basic-author-date.csl (JabRef#4562)
db525ac Update american-journal-of-physical-anthropology.csl (JabRef#4567)

git-subtree-dir: src/main/resources/csl-styles
git-subtree-split: 566df87
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants