-
-
Notifications
You must be signed in to change notification settings - Fork 50
fix: (wrong-type-argument stringp nil) when adding a non-bibtex note #194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
partially works for Org Roam commit 28580d7 in my private fork
renamed symbols: orb-edit-notes -> orb-edit-note orb-notes-fn -> orb-org-ref-edit-note orb-edit-notes-ad -> orb-edit-notes orb--edit-notes -> orb--new-note orb--preformat-template -> orb--pre-expand-template
- orb-get-node-citekey - update orb-manual.org - use progress-reporter in orb--with-message! (not related to ORv2)
also get rid of the clumsy hook system
update Package-Version to 0.6
- update many docstrings - update REAMDE and manual - remove leftover functions and variables from v0.5 - remove deprecated functions and variables
- remove instructions to add `org-roam-bibtex-mode` to `org-roam-mode-hook` from README - add autoload tokens to `orb-org-ref-edit-note` and `orb-edit-notes`
Since template is only pre-selected in `orb--new-note`, not by proper `org-capture`, pressing `q` does not return a proper template list, and this case must be handled individually.
There seem to be issues on Emacs 27.1 with stock Org 9.3, see org-roam#188.
call `orb-make-notes-cache` in orb-edit-note, orb-insert-link and org-roam-bibtex-mode remove `orb-bibtex-completion-parse-bibliography-ad`
Provide `orb--add-ref` hook function for `org-roam-capture-new-node-hook` to add the citation key to ROAM_REFS in a newly created note. The behaviour of `org-roam-node-at-point` has changed in 409a147 breaking the previous way citation keys were added to ROAM_REFS, see org-roam#193. Should the upstream changes be reverted, this may be reverted as well.
When creating a non-bibtex note, it throws with the following error:
```
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
string-match("[\\\"]\\| " nil)
#f(compiled-function (str) #<bytecode 0x334e725>)(nil)
mapconcat(#f(compiled-function (str) #<bytecode 0x334e725>) (nil) " ")
combine-and-quote-strings((nil))
org-roam-add-property(nil "ROAM_REFS")
(save-excursion (org-roam-add-property orb--current-citekey "ROAM_REFS"))
orb--add-ref()
run-hooks(org-roam-capture-new-node-hook)
org-roam-capture--goto-location()
org-roam-capture--get-point()
org-capture-set-target-location(nil)
org-capture(nil nil)
org-roam-capture-(:node #s(org-roam-node :file nil :file-hash nil :file-atime nil :file-mtime nil :id nil :level nil :point nil :todo nil :priority nil :scheduled nil :deadline nil :title "hello" :properties nil :olp nil :tags nil :aliases nil :refs nil) :props (:finalize find-file :call-location #<marker at 129689 in README.org>))
org-roam-node-find()
funcall-interactively(org-roam-node-find)
call-interactively(org-roam-node-find nil nil)
command-execute(org-roam-node-find)
```
This happens because orb--current-citekey is nil but orb still tries
to set it to ROAM_REFS.
Add a conditional check, so orb does not interfere with non-bibtex
notes.
Author
|
See also: #193 (comment) — another possible fix is reverting c7f7cb0 |
Member
|
Thank you, see #193. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When creating a non-bibtex note, it throws with the following error:
This happens because orb--current-citekey is nil but orb still tries
to set it to ROAM_REFS.
Add a conditional check, so orb does not interfere with non-bibtex
notes.