Closed sdh0618 closed 3 years ago
Hi, so how exactly do you trigger orb-edit-notes
, through following an Org-ref cite:citation
?
Anyway, there are several places in your config that may cause problems, although I'm not sure they are responsible for this issue. Maybe they are!
(setq org-ref-notes-function 'orb-edit-notes)
Don't do that. Instead, make sure org-roam-bibtex-mode
is on. It sets the correct function. If you absolutely want to do it yourself, you should (setq org-ref-notes-function 'orb-notes-fn)
org-ref-default-bibliography "~/Dropbox/Bibtex/main.bib"
This variable should be a list, e.g. org-ref-default-bibliography '("~/Dropbox/Bibtex/main.bib")
(after-init . org-roam-mode)
can cause loading issues for Org-roam and Org-related packages, you should make it (org-load . org-roam-mode)
instead.Try fixing these, restart Emacs and see if the issue persists. If it does, please report in more detail what you actually do. E.g. I call this function, then this function, then I get this error.
Hi @myshevchuk , thanks for your comments. Unfortunately the error's still there after I applied them.
The orb-edit-notes
is triggered by either using the orb-insert
in a org file, or trying to add notes to an Org-ref cite:citation
. Both cases, the error shows up when the note is first created (if the note doesn't exist before calling the orb-edit-notes
).
As I described, the note will be created properly, but in the background buffers. The error blocked the switching buffer which is annoying.
@sdh0618 I cannot reproduce this issue, which means something must be wrong in your configuration. Something you didn't share here because it did not seem relevant. Most probably, something related to Org or Org-capture. You can try to debug it with Edebug. Try instrumenting orb--edit-notes
: go to org-roam-bibtex.el
source file in your installation location, find the function orb--edit-notes
and call M-x edebug-defun
. Then trigger orb-edit-notes
and step through the function until the error is thrown.
You may also want to make sure that there are no stale .elc
files in your installation. This happens sometimes after an upgrade. You should look for Org, Org-roam and Org-roam-bibtex installation directories, remove all the .elc
files and reinstall/rebuild the packages.
@myshevchuk Thanks! It turns out everything is .elc
in the Org directory, which is the one install with emacs. I guess the emacs in my system just prefer the .elc
files.
Now I installed the Org manually from their website and the error disappeared.
@sdh0618 Good that you have it fixed. Emacs comes with precompiled .elc files, the source files are distributed as .el.gz archives. Thanks for reporting this. I will investigate why Org-roam-bibtex does not work with Org 9.3, although it should.
had the exact same issue wit Emacs 27.1 and stock Org 9.3, can confirm that installing newer Org (9.4.6) version fixes it.
I've just tested it on a clean Emacs 27.2 installation, which ships with Org 9.4.4 and I can't reproduce this error. So perhaps this is specific to Emacs <27.1 and Org <9.4. I will update the ORB's dependencies accordingly. Emacs 27.2 is the current stable version and ORB supports official stable versions of Emacs.
Thank you for brining it to my attention!
Describe the bug The above error shows when orb-edit-notes is used to create a new note. A new buffer will be created in the background with the correct orb-templates but the error will prompt first.
Expected behavior When orb-edit-notes is called and if the note hasn't been created yet, a new buffer will appear based on the orb-templates and without showing the error.
ORB configuration
Environment (please complete the following information):