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: Save/Export the "Text mode" and "BibTeX mode" buffers #140

Closed j-steinbach closed 3 years ago

j-steinbach commented 3 years ago

At the moment, the PDF Scrapper extracts a list of references from the source PDF. I manually edit and clean that list in the "Text mode" buffer, then it gets turned into a list of bib-entries in the "BibTeX mode" buffer. There I again manually do some cleaning, and then that list gets turned into a list of cite-keys in the "Org mode" buffer. Finally, the list of cite-keys is inserted into the original .org file (where I started the PDF Scrapper extraction), but all the manual work I did in the "Text mode" and "BibTeX mode" buffer gets thrown away.

I would like to have the content of those buffers also get inserted into my original .org file.

There are multiple reasons:

As mentioned in https://github.com/org-roam/org-roam-bibtex/issues/134

myshevchuk commented 3 years ago

There are technically three features here.

  1. An export command to save the buffer. In current implementation, using Emacs functions such write-file (C-x C-w) to save a buffer results in a broken scrapper session. Either fix this or make a separate command. I'd prefer the former. But the latter is easier to implement.
  2. Provide an option to allow including the extracted text and BibTeX references as subtrees in the buffer of origin.
  3. Restart ORB PDF Scrapper from a text or BibTeX source.

Features 1. and 2. will be quite easy, while three 3. will require more work and should probably be filed as a separate feature request.

j-steinbach commented 3 years ago

I agree. Originally I only had the first two, the last one was an after-thought - something to consider for the future. Should I put it in a separate feature request? I don't find it that important personally, but it makes sense from a logical perspective.

myshevchuk commented 3 years ago

but it makes sense from a logical perspective.

Absolutely. Please make a separate feature request.

I actually had an idea of making ORB PDF Scrapper into a separate, stand-alone package. It would, of course, be integrated into Org Roam (BibTeX), yet could be used independently of them anywhere else in Emacs. Such a feature would be a step toward this. Thank you for the idea!

j-steinbach commented 3 years ago

Here you go :)

I also added an issue to discuss the splitting of the package.

:broom:

myshevchuk commented 3 years ago

Now after #146 has been merged, this issue can be closed.