"Alan E. Davis" writes: > Some notes on initially trying out this new tool. I have some reservations > as to whether it use it. There are certain good reasons in its favor. > > This works to both store bibtex database entries and export to .bib files. > I REALLY like the automagical harvesting of data using cb2Bib. It is > unique, and I don't see how to recruit it to produce a database in an org > file, or pipe it into this org-bibtex tool. > Org-bibtex can be used to collect bibtex entries from .bib files, and (with this most recent attached version) directly from the clipboard with `org-bibtex-yank'. Is there a more natural way that this could integrate with external tools like cb2bib? I've just now installed cb2bib, and I'm not sure I fully grasp its usage. > > The need to represent the bibtex database entry as a PROPERTY list would > appear to me to limit its usefulness to me. > in any particular way? > > A nit: I would prefer to be free to enter any optional field type I wished, > when I am entering the data. It is possible to add arbitrary properties to a headline with `org-set-property'. Or you could customize the variables holding bibtex field and entry types. For example to add a personal :mynotes field to every bibtex type just execute the following elisp code (or add it to your configuration). You will then be prompted for a mynotes field on every bibtex entry. You could also change the :required keyword to add your field as an option field. #+begin_src emacs-lisp (dolist (type org-bibtex-types) (push :mynotes (cdr (assoc :required (cdr type))))) (push (cons :mynotes "My personal field for notes") org-bibtex-fields) #+end_src > Of course, the tool as it stands helped me to filter out duplicate > fields and unused optional fields from the one bibtex entry I tried > using org-bibtex-read: the output of org-bibtex-write was cleaner, and > correctly incorporated aligning tabs where I'd carelessly left them > out.) > This functionality is all due to the formatting functions provided by the existing bibtex.el package. > > My INPUT ENTRY > > @INCOLLECTION{AED-IER-CR, > author = {Junior Noitall}, > title = {Specific disruption strategies}, > booktitle = {How to annoy the teacher}, > publisher = {Noitall Notes}, > year = {2011}, > editor = {Senior Noitall}, > chapter = {13}, > pages = {218--243}, > address = {Concentric Orbit}, > altauthor = {John Smith}, > alteditor = {Carl Pumpkin}, > isbn = {1-8777753-31-9}, > optaddress = {Room X777}, > optpages = {\frac{1}{2}} > } > > In the following output, the isbn field is missing. > > OUTPUT from org-bibtex-write > > @incollection{AED-IER-CR, > author = {Junior Noitall}, > title = {Specific disruption strategies}, > booktitle = {How to annoy the teacher}, > publisher = {Noitall Notes}, > year = 2011, > editor = {Senior Noitall}, > type = {incollection}, > chapter = 13, > pages = {218--243}, > address = {Concentric Orbit} > } > > > I understand I may add to the types variable. When using org-bibtex-create, > I can enter any arbitrary field as a PROPERTY; however, org-bibtex ignores > anything outside of the universe it knows about. Would it be bad practice > to allow the export of any arbitrary field type one has recorded? If a type is added as with the code given above, then it will be exported to .bib files along with the default fields. > I think the emacs bibtex-mode may recognize erroneous bibtex entries. > Somewhere there is code that does that. I do not know if bibtex-mode does that or not. I think that bibtex itself is supposed to simply ignore any fields which it does not recognize allowing extensibility. > It would be a huge and excellent addition to be able to pass other > types, while checking for proper formatting. Bibtex itself, and the > .bst files (at least for bibtex itself; I don't know about biblatex, > etc.) will cherry pick the needed fields. Am I wrong about this? > The above sounds correct to me. Given that org properties will likely contain non-bibtex content, I wouldn't want the default behavior to be exporting every property entry to bibtex. However if the above solution of adding to the org-bibtex-types/fields variables is not sufficient, it shouldn't be difficult to change the org-bibtex command so that if it is called with a prefix argument it will export *all* properties to the .bib file. > > > I am confused by the duplication of file names, though I can see that at > some point one of the two will lose. (Gauss's law of competitive exclusion, > referring to the biological case of two species occupying the same > ecological niche). > I think that rather than competing these files may be merging into a single file (as with the attached patch). However this remains to be seen. Thanks for the feedback and suggestions -- Eric > > > Alan Davis