-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
An empty entry can still be added without warning message (and lead to an error when compiling) #8645
Comments
@ruoyu-qian: You may want to enhance your previous contribution to JabRef. Cheers. |
Wait, this preference seems broken then? Edit: It is not broken. On my machine it works. It creates a citation key, when clicking on save, but only if the fields present in the entry are detected by my citationkey pattern. Here my pattern: hence my pattern also, just as you, does NOT create a citationkey for
|
@ThiloteE Not really: my key pattern is [auth][shortyear]. Since my "almost empty" entry does not have an author or a year, I cannot really blame this feature. 😉 |
Put devcall label, because there is the idea to get rid of the whole dialogue and delete empty entries silently upon closing JabRef. |
We need to refine the functionality Actions needed
Discussion
Positive Consequences:
|
The challenge to work on this issue is to craft test cases. |
We went for the simple solution: Do not write empty entries to the .bib file. When closing and opening JabRef again, these "empty" entries are gone. TODO-tracking needs to be done by groups or other measures of JabRef. |
JabRef version
Latest development branch build (please note build date below)
Operating system
GNU / Linux
Details on version and operating system
JabRef 5.6--2022-04-04--dbf921e Linux 4.19.0-20-amd64 amd64 Java 17.0.2 JavaFX 18+12
Checked with the latest development build
Steps to reproduce the behaviour
No warning message is displayed (unlike stated in issue #8096), especially not the message of the PR #8218.
And so, the issue #8096 is still present: biber generates an error (
[8337] Utils.pm:411> ERROR - BibTeX subsystem: /tmp/biber_tmp_Qtbu/a9e03cb3043b9e2c02591da84105bb68_26801.utf8, line 36978, syntax error: found ",", expected one of: number, name (entry type, key, field, or macro name), end of entry ("}" or ")") or quoted string ({...} or "...")
)My analysis:
For me, by default, an empty entry is
So, not really an empty entry.
But, since an empty entry key is enough to lead to a biber error, I suggest an empty key should be enough to raise the warning message.
Because you can compile your file after saving (i.e. while keeping your library opened), the biber error is generated before the warning message has a chance to be displayed. Hence, the warning message should be displayed on saving (i.e. not on closing).
The feature "Generate keys before saving (for entries without a key)" in
Options -> Preferences -> Citation key generator
is of no help because no key are generated for such an "almost empty entry".Appendix
...
Log File
The text was updated successfully, but these errors were encountered: