Giter VIP home page Giter VIP logo

Comments (11)

myshevchuk avatar myshevchuk commented on August 17, 2024 1

The error you get means bibtex-completion-find-note-functions variable cannot be found. Yet since this variable is used by org-roam-bibtex only after bibtex-completion package is loaded, it is most probably a result of some corrupted *.elc files. Be sure to close Emacs, remove $DOOM/.local/straight/build, run doom sync && doom upgrade. If this does not help, try disabling other relevant packages, until you find what's causing the issue. Perhaps your loading order is messed up by misconfiguration of other packages.

Unfortunately, I can't help you more because the information you provided is not sufficient, e.g. what other packages you use and how you load them.

from org-roam-bibtex.

oatmealm avatar oatmealm commented on August 17, 2024 1

Ok, some progress... with orf-ref just in case someone comes across this post:

Firstly, make sure org-ref-default-bibliography is a list... while updating my settings and using a generalized variable, I had the default bib file as a string, so, i've re-purposed the variable into a proper list first:

(setq org-ref-default-bibliography `(,+biblio-default-bibliography-files))

Also, make sure bibtex-dialect is set, though I think org-ref will now gracefully select default.

Problem now is that org-ref opens the notes directory in dired rather than the actual note itself...

from org-roam-bibtex.

myshevchuk avatar myshevchuk commented on August 17, 2024

Hi! This is obviously a doom issue. I'd suggest you purging all the build files or the ./local/straight/ directory altogether and running doom update && doom sync afterwards. I hope it helps!

If the problem persists, please try reproducing it with vanilla Emacs and report it here.

from org-roam-bibtex.

maikol-solis avatar maikol-solis commented on August 17, 2024

Digging a little could be possible this related to this commit?

a9a7d23

I have only this in my config.el and seems that is missing something from bibtex-completion

 (use-package! org-roam-bibtex
   :after (org-roam)
   :hook (org-roam-mode . org-roam-bibtex-mode))

from org-roam-bibtex.

myshevchuk avatar myshevchuk commented on August 17, 2024

That is an indirect cause, yes. But there is nothing wrong with that commit. It works pretty well for me. The actual problem are stale *.elc files in your .local/straight/build. Have you tried purging the build directory and doom update && doom sync? Do you also experience this error with vanilla setup?

from org-roam-bibtex.

maikol-solis avatar maikol-solis commented on August 17, 2024

Thanks for the help. It was a silly mistake from the pin on the repos.

from org-roam-bibtex.

oatmealm avatar oatmealm commented on August 17, 2024

I'm seeing the same error... I've cleared and re-built, but still seeing this message on every interaction, inlcuding after manually enabling org-roam-bibtex.... both org-roam and bibtex-completion as well as ivy-bibtex are unpinned...

eval-after-load-helper: Symbol’s value as variable is void: bibtex-completion-find-note-functions

My setup:

(use-package! org-roam-bibtex
    :after org-roam
    :hook (org-roam-mode . org-roam-bibtex-mode)
    :bind (:map org-mode-map
           (("C-c n a" . orb-note-actions)))
    :config
    (setq orb-preformat-keywords
          '("=key=" "title" "url" "file" "author-or-editor" "keywords"))
    (setq orb-templates
          '(("r" "reference" plain (function org-roam-capture--get-point)
             ""
             :file-name "references/${=KEY=}"
             :head "#+title: ${author-or-editor}'s \"${title}\"\n#+ROAM_KEY: ${ref}\n#+CREATED: %(org-insert-time-stamp (current-time) t t)\n#+MODIFIED: %(org-insert-time-stamp (current-time) t t)\n\n%?"
             :unnarrowed t t)
          ("a" "annotations" plain (function org-roam-capture--get-point)
             ""
             :file-name "references/${=KEY=}"
             :head "#+title: ${author-or-editor}'s \"${title}\"\n#+ROAM_KEY: ${ref}\n#+CREATED: %(org-insert-time-stamp (current-time) t t)\n#+MODIFIED: %(org-insert-time-stamp (current-time) t t)\n\n%?\n\n* Annotations\n  :PROPERTIES:\n  :Custom_ID: ${=key=}\n  :URL: ${url}\n  :AUTHOR: ${author-or-editor}\n  :NOTER_DOCUMENT: %(orb-process-file-field \"${=key=}\")\n  :NOTER_PAGE: \n  :END:\n"
             :unnarrowed t t))))

from org-roam-bibtex.

myshevchuk avatar myshevchuk commented on August 17, 2024

Did you clear the whole directory$DOOM/.local/straight/build? Be sure to also remove any autoloads.el files. Sometimes purging $DOOM/.local/straight altogether is also a reasonable solution.

from org-roam-bibtex.

oatmealm avatar oatmealm commented on August 17, 2024

@myshevchuk Yes, I did. Right now the only way it works is if I set orb manually.

(setq org-ref-notes-function 'orb-notes-fn)

Edit: corrected the current setup.

from org-roam-bibtex.

oatmealm avatar oatmealm commented on August 17, 2024

Thanks alot for the ideas, will try. Was wondering, is there a way to see load order of packages in emacs or Doom? I've tried in fact to use-package org-roam-bibtex load :after (org-roam bibtex-completion) but it didn't help...

BTW, when I manually reload (SPC hrrr) I'm seeing the following, which threw me off, since it's seems to be coming from the "built-in" org module... while bibtex-completion comes from Doom's biblio module, though I have it unpinned.

Eager macro-expansion failure: (void-variable bibtex-completion-find-note-functions) [2 times]
error in process sentinel: let*: Error in a Doom module: "modules/lang/org/config.el", (void-variable bibtex-completion-find-note-functions)
error in process sentinel: Error in a Doom module: "modules/lang/org/config.el", (void-variable bibtex-completion-find-note-functions)

Regardless, with org-ref-notes-function set manully, orb seems to work, but org-ref fails on different actions.

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  insert-file-contents(nil)
  org-ref-get-bibtex-entry("Banjo2004")
  org-ref-notes-function-one-file("Banjo2004")
  org-ref-open-notes-at-point()
  funcall-interactively(org-ref-open-notes-at-point)
  call-interactively(org-ref-open-notes-at-point)
  hydra--call-interactively-remap-maybe(org-ref-open-notes-at-point)
  org-ref-cite-hydra/org-ref-open-notes-at-point-and-exit()
  funcall-interactively(org-ref-cite-hydra/org-ref-open-notes-at-point-and-exit)
  call-interactively(org-ref-cite-hydra/org-ref-open-notes-at-point-and-exit nil nil)
  command-execute(org-ref-cite-hydra/org-ref-open-notes-at-point-and-exit)

The item exists in the bibtex file org-ref-default-bibliography is pointing to, but there's no note yet... I thought it orb should inject itself at this point to offer a capture template for a new note, like it does from ivy-bibtex.... I don't see orb-* calls in the above trace...

from org-roam-bibtex.

myshevchuk avatar myshevchuk commented on August 17, 2024

I'd argue org-ref is responsible for all the mess. Try disabling it (its use-package block), quit Emacs, doom sync. Start Emacs and see whether the bibtex-completion issue persists. If it still persists, purge the straight build once again (sorry), and re-sync.

Right, that must be org-ref, because it also loads bibtex-completion. The errors you get are not coming from the "built-in" Org. They are indicative of loading problems and/or errors in compiled files.

FYI, I'm also using Doom, org-ref, etc., and do not have this issue.

from org-roam-bibtex.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.