org-roam / org-roam-bibtex

Org Roam integration with bibliography management software
GNU General Public License v3.0
568 stars 47 forks source link

"file" keyword not processing in template expansion #214

Closed prashantnag93 closed 2 years ago

prashantnag93 commented 2 years ago

Describe the bug as org-roam-bibtex manual suggested here orb-process-file-keyword t will process file keyword for pdf path. but It's not able to put or asking for the path of PDF for the corresponding bib entry. one issue I have found regarding org-roam v2 [https://github.com/weirdNox/org-noter/issues/143] maybe this is the culprit.

To Reproduce Steps to reproduce the behavior: I have configured template from here. Invoked helm-bibtex then select the bib entry --> press F9 for Edit notes --> select the template for ref --> new note has created with nothing is the :NOTER-DOCUMENT: property.

Expected behavior It should put the PDF file path so that I can invoke org-noter from the title headline .

Environment (please complete the following information):

Screenshots If applicable, add screenshots to help explain your problem orb .

myshevchuk commented 2 years ago

Hi, could you please provide the BibTeX entry that caused the problem?

prashantnag93 commented 2 years ago

hey @myshevchuk Every Entry from my bibliography file creating the same problem, one of theme as follows

@article{li2021,
  title = {Word-Level Emotion Distribution with Two Schemas for Short Text Emotion Classification},
  author = {Li, Zongxi and Xie, Haoran and Cheng, Gary and Li, Qing},
  date = {2021-09-05},
  journaltitle = {Knowledge-Based Systems},
  volume = {227},
  pages = {107163},
  issn = {0950-7051},
  doi = {10.1016/j.knosys.2021.107163},
  url = {https://www.sciencedirect.com/science/article/pii/S0950705121004263},
  urldate = {2021-09-20},
  abstract = {Understanding word-level emotion in terms of both category and intensity has always been considered an essential step in addressing text emotion classification tasks. Existing studies have mainly adopted the categorical lexicons that are tagged by predefined emotion taxonomies to link affective words with discrete emotions. However, in these lexicons, emotion tags are restricted to a specific set of basic emotions. Moreover, the emotional intensity is ignored, making these methods less flexible and less informative. This paper proposes a novel method to generate a word-level emotion distribution (WED) vector by incorporating domain knowledge and dimensional lexicon. The proposed method can link a word with more generic and fine-grained emotion taxonomies with quantitatively computed intensities. We propose two schemas to utilize the WED vector implicitly and explicitly to facilitate classification. The implicit approach implements a rule-based conversion strategy to augment the information in the label space. The explicit approach exploits WED as an emotional word embedding to enhance the sentiment feature. We conduct extensive experiments on seven multiclass datasets. The results indicate that both proposed schemas produce competitive results compared with the state-of-the-art baselines.},
  langid = {english},
  file = {../../Zotero/storage/A7T3V97D/Li et al. - 2021 - Word-level emotion distribution with two schemas f.pdf;../../Zotero/storage/6MULSNXL/S0950705121004263.html}
}
myshevchuk commented 2 years ago

Using relative file names in the file field, although technically possible in principle with some patching, will always be a source of problems. Those files names, they are relative to what? To the BibTeX file, to the Org-roam note? For this to work, you'll have to keep your BibTeX file and Org-roam notes in the same directory, and also submit patches to Bibtex-completion and maybe Org-noter, which are independent packages not related to ORB, to make them properly work with relative file names. I'm not sure this is a worthy effort. You can easily achieve what you want by using absolute file names.

As far as I know, it is possible to tweak Zotero to export absolute file names.