Automatical update for new reference in bib file?

I just repeat it once more. All experiments step by step:

  1. My tm file uses ref.bib file. I print \cite, then right-click and select search in database and see all references in file ref.bib
  2. I open ref,bib file with xed, and add a new reference in bib format and save it.
  3. I print \cite, then right-click and select search in database and see that a new reference does not appear.
  4. Then I make Document - Update - All 3 times
  5. I repeat item 3) and note a new reference does not appear.
  6. Then Data - Open bibliography and I see the content of ref.bib file without a new reference.
  7. Again Data - Import and select ref.bib.
  8. Vu a la - a new reference appears!

In my case, I have to make steps 6-7 after adding each new reference in bib file. I expected that new reference will appear automatically.

I use Linux Mint Mate 20 (based on the Ubuntu 20). Version on Texmacs 1.99.19.

Another experiment.

  1. Data - Open bibliography. I see content of the ref.bib file.
  2. Copy reference in the bib format and then insert as Bibtex and save.
  3. The reference appears in data base and I can see it in \cite right-click search in database.

This way is shorter because I do not need to open ref.bib by an external editor.

Let us close this thread. My wishes I will put in Savannah as suggestions.

This is expected behavior due to the differences between the TeXmacs’ internal bibliographic database and an external .bib file (see the earlier posts by @mgubi). search in database only searches the internal database.

In step 2 of experiment 1 you are adding the reference to an external .bib file, while in step 3 you are searching the internal database. Since you did not add the new element to the internal database, it is not found there by TeXmacs. Once you insert them in the internal database in step 7, it does work, because now the new element has been imported.

In the second experiment you import the new bibliography to the internal database in step 2, so then its contents are also searchable. Note that in step 1 of experiment 2, you are not seeing the contents of ref.bib. You are seeing the contents of the internal database, which in this case just happen to mirror ref.bib.

Thank you for the detailed explanation. I understand now. What is the reason for two databases - internal and external? Occam’s razor - “entities should not be multiplied without necessity”. It is difficult to find this explanation in the guide.

I am not sure about the reason. We’d have to ask the author. One reason may be convenience: the internal database is always activated, so you don’t need to first select a .bib file for every new document.

I guess the menu items could be made clearer to indicate when the internal or external bibliography is searched.

BTW thanks a lot for the detailed description, before this discussion I did not know that there is a bibliographic database, I had used only the external BibTeX (will probably continue to do so at least until I figure how to have multiple bibliographic databases).

Thanks to @jeroen for the clear explanation of the situation. TeXmacs has two ways to deal with bibliography (as I’ve also written in a previous post in this thread). The reason is flexibility wrt. to the user: any particular solution has technical tradeoffs. The internal database can be managed easily from within TeXmacs while external bib files could change without notice, being incorrect, etc… I agree however that we should be able to autocomplete from external bib files also, maybe monitoring them or just reading all the definitions when we scan them for typesetting the bibliography. I think the current behaviour is that (like in TeX, the only relevant bibliography items used from a bib file are those explicitly mentioned in the document). However if the user ask for autocompletion we should be able to rapidly scan eventual bib files mentioned in the document to find suitable matches.

As for me - it is very useful functionality for valuable work. I have already written above that it is better to have your own collection of references and use them in Texmacs and after work by single click create the bib file with references used for this paper. I will write this suggestion in Savannah. It will be better if you will write your suggestion, too.