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
Wrong type argument: integer-or-marker-p, nil #2361
Comments
+1. Exactly the same problem. The only clue I've been able to find is that the probem seems to be related to links. Both of my probloematic files contain links. One has external links and the other org-roam links. Deleting the links solves the problem.
|
I checked a subset of my notes that got successfully imported and can confirm they did not contain links. |
Also had this, slightly downgrading org-mode (to commit |
Below is a simple node example that triggers the error. There are no square brackets around the link info. This is the complete text of the node.
Removing the colon from the last line fixes the problem.
|
Thanks! With
This gets rid of the error for me. If I understand correctly, straight installs the latest version by default ( |
Quick note that
|
I also have this issue. Any note with links fully messes up my emacs somehow. |
+1 Same problem here. I am using: Org roam: v2.2.2-42-g5c06471 So if using the pre-release version of org mode is the problem, how do I exactly reverse to a previous version? I am using straight, but I my expertise is very thin. From what was described before, I need to:
... and then? I am not sure how to force straight to re-install org mode. Could you give me some points? Thanks! :) |
I second this. If someone could explain how to get this done for the novices like me/us I'd be very grateful. My whole workflow is broken now so I'd love to fix it. |
Check my previous reply for configuring |
@otech-nl, I was trying to follow your instructions. I ran An of course, this happens when I on a deadline and I need to use org-roam a lot. Murphy's law, I guess... |
You may have to delete
More like Finagle's corollary ;) |
Is there a bug report for this in org-mode? |
Thank you @otech-nl, deleting org from those locations was the key, and in hindsight something obvious to do. Now I am in org 9.5.5. and everything works fine. Hopefully this will get sorted soon. |
I can't get straight.el to work. I have tried using straight-freeze-versions but this gives me a vague error that "Caches are still outdated; something is seriously wrong" but I can't find the cause of this. Am I missing some glaringly obvious step in the straight.el process? |
I confirm the latest stable version 9.6.7 also works. Configure in (package! org :pin "5890ac") |
Thanks for the tip, but where did you get that commit? I couldn't find it anywhere. I pegged to 9.6.7 with: (package! org :pin "ca873f7") and things are working much smoother now :-) |
See my comment in radian-software/straight.el#1107 for the likely reason. |
Hello @dustinfarris , I pined to "ca873f7" and "5890ac", but still does not work. |
@yanboyang713 You may need to re-compile everything that depends on Org. Because the issue is related to inlined functions that may be left in mixed state if you switched back-and-forth between the pins. |
Thanks @yantar92 . Working now. |
Hi @dustinfarris, where did you get the |
5890ac is the tag ref. The actual commit that was tagged is ca873f7
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?h=release_9.6.7&id=ca873f7fe47546bca19821f1578a6ab95bf5351c
|
|
You would need to update to straight's "develop" branch. (setq straight-repository-branch "develop") Before straight's bootstrapping snippet. |
Ah! You are right @progfolio. Now things are working! |
Quick step-by-step instructions for Doom emacs users:
To rollback (package! org
:recipe (:host github
...)
:pin "5890ac") ;; <--- Edit this line with the right commit. This one works on my machine. ... and save the file. No, you can run
Finally, start your Emacs and enjoy your org-roam while waiting for further updates. |
@gicrisf You can pin org-mode version in |
@Samoed Does it work too?! This is great, I thought the modules would be loaded first |
I pinned it according to @gicrisf but I still have the same error in files that contain links. The error messages start to stack up. I can still use org mode but every time I update my config I have the same error and the links in documents don't work. I am new to the whole (doom) emacs thing and I am really confused, sorry. I get these error messages:
It does say |
@Enemoy : Since you are using Doom Emacs, you are using straight and other supporting packages . . . Pin Org in packages.el ->
Then remove the Then simply run It should all complete without errors. Now, you can safely and successfully perform |
Fuco1/smartparens@7afd64739501 -> Fuco1/smartparens@79a338db115f Wilfred/helpful@94c25337b2de -> Wilfred/helpful@c57ff0d284b5 bbatsov/projectile@e18ad4d6111e -> bbatsov/projectile@971cd5c4f25f domtronn/all-the-icons.el@51bf77da1ebc -> domtronn/all-the-icons.el@f491f39c2133 emacs-compat/compat@be1d94d5e0e2 -> emacs-compat/compat@75d0b8527f51 emacs-straight/project@e086bdc7c515 -> emacs-straight/project@6c41ad68edf1 joddie/pcre2el@38c6f80c787d -> joddie/pcre2el@b941ed8a9629 jscheid/dtrt-indent@d4fd1b4977eb -> jscheid/dtrt-indent@be07f4979a5b justbur/emacs-which-key@809364403285 -> justbur/emacs-which-key@df6b0cb84498 noctuid/general.el@9651024e7f40 -> noctuid/general.el@833dea2c4a60 radian-software/straight.el@56a8b6c8a46f -> radian-software/straight.el@5e84c4e2cd8c Close: #7343 Fix: #7326 Ref: radian-software/straight.el#1107 Ref: org-roam/org-roam#2361 Co-authored-by: Samoed <Samoed@users.noreply.github.com>
+1 facing this problem as well. This workaround solved the problem in my case: #2361 (comment). As mentioned in the comment (using an external link), after pinning the version we need to run |
@progfolio Thank you for looking into this, moving to the development branch of straight.el fixes this problem for me. |
Fuco1/smartparens@7afd64739501 -> Fuco1/smartparens@79a338db115f Wilfred/helpful@94c25337b2de -> Wilfred/helpful@c57ff0d284b5 bbatsov/projectile@e18ad4d6111e -> bbatsov/projectile@971cd5c4f25f domtronn/all-the-icons.el@51bf77da1ebc -> domtronn/all-the-icons.el@f491f39c2133 emacs-compat/compat@be1d94d5e0e2 -> emacs-compat/compat@75d0b8527f51 emacs-straight/project@e086bdc7c515 -> emacs-straight/project@6c41ad68edf1 joddie/pcre2el@38c6f80c787d -> joddie/pcre2el@b941ed8a9629 jscheid/dtrt-indent@d4fd1b4977eb -> jscheid/dtrt-indent@be07f4979a5b justbur/emacs-which-key@809364403285 -> justbur/emacs-which-key@df6b0cb84498 noctuid/general.el@9651024e7f40 -> noctuid/general.el@833dea2c4a60 radian-software/straight.el@56a8b6c8a46f -> radian-software/straight.el@5e84c4e2cd8c Close: doomemacs#7343 Fix: doomemacs#7326 Ref: radian-software/straight.el#1107 Ref: org-roam/org-roam#2361 Co-authored-by: Samoed <Samoed@users.noreply.github.com>
For anyone using (use-package org
;; pin org at 9.6 for now
;; modified from elpaca/cache/gnu-elpa.eld to use the release_9.6 branch
:elpaca (:package "org" :repo "git://git.sv.gnu.org/emacs/elpa" :local-repo "org" :branch "release_9.6" :files ("*" (:exclude ".git" "etc/schema" "contrib" "mk" "testing" "lisp/org-install.el")))) |
Shouldn't need the workaround if you are using Elpaca. See the test case below: Test Case(elpaca-test
:early-init (setq elpaca-menu-functions '(elpaca-menu-org elpaca-menu-melpa))
:init (elpaca (compat :files ("*" (:exclude ".git")) :local-repo "compat" :repo
"https://github.com/emacs-compat/compat"))
(elpaca org)
(elpaca org-roam
(setq org-roam-directory "/tmp/test/" org-roam-v2-ack t))
(elpaca-wait)
(org-roam-db-sync)) Host Env
Output INFO Scraping files for loaddefs...
INFO Scraping files for loaddefs...done
GEN ../elpaca-autoloads.el
Cloning into '/tmp/elpaca.wsMEx5/elpaca/repos/elpaca'...
Your branch is up to date with 'origin/master'.
Checking /tmp/elpaca.wsMEx5/elpaca/repos/elpaca...
Compiling /tmp/elpaca.wsMEx5/elpaca/repos/elpaca/elpaca-info.el...
Compiling /tmp/elpaca.wsMEx5/elpaca/repos/elpaca/elpaca-log.el...
Compiling /tmp/elpaca.wsMEx5/elpaca/repos/elpaca/elpaca-manager.el...
Compiling /tmp/elpaca.wsMEx5/elpaca/repos/elpaca/elpaca-menu-elpa.el...
Compiling /tmp/elpaca.wsMEx5/elpaca/repos/elpaca/elpaca-menu-melpa.el...
Compiling /tmp/elpaca.wsMEx5/elpaca/repos/elpaca/elpaca-menu-org.el...
Compiling /tmp/elpaca.wsMEx5/elpaca/repos/elpaca/elpaca-process.el...
Compiling /tmp/elpaca.wsMEx5/elpaca/repos/elpaca/elpaca-test.el...
Compiling /tmp/elpaca.wsMEx5/elpaca/repos/elpaca/elpaca-ui.el...
Compiling /tmp/elpaca.wsMEx5/elpaca/repos/elpaca/elpaca.el...
Checking /tmp/elpaca.wsMEx5/elpaca/repos/elpaca/doc...
Compiling /tmp/elpaca.wsMEx5/elpaca/repos/elpaca/doc/early-init.el...
Compiling /tmp/elpaca.wsMEx5/elpaca/repos/elpaca/doc/init.el...
Checking /tmp/elpaca.wsMEx5/elpaca/repos/elpaca/extensions...
Compiling /tmp/elpaca.wsMEx5/elpaca/repos/elpaca/extensions/elpaca-use-package.el...
Checking /tmp/elpaca.wsMEx5/elpaca/repos/elpaca/images...
Checking /tmp/elpaca.wsMEx5/elpaca/repos/elpaca/test...
Compiling /tmp/elpaca.wsMEx5/elpaca/repos/elpaca/test/elpaca-test.el...
Done (Total of 11 files compiled, 3 skipped in 4 directories)
Downloading MELPA recipes...
Downloading MELPA recipes...100%
Clearing removed files...
Clearing removed files...done
Processing modified files...
Processing modified files...4%
Unable to read file "/home/n/git/Emacs/org-html-themes/setup/theme-readtheorg.setup"
Unable to read file "/home/n/git/Emacs/org-html-themes/setup/theme-readtheorg.setup"
Unable to read file "/home/n/git/Emacs/org-html-themes/setup/theme-readtheorg.setup"
Unable to read file "/home/n/git/Emacs/org-html-themes/setup/theme-readtheorg.setup"
Processing modified files...11%
Processing modified files...12%
Processing modified files...13%
Processing modified files...17%
Processing modified files...24%
Processing modified files...31%
Processing modified files...32%
Processing modified files...37%
Processing modified files...44%
Processing modified files...45%
Processing modified files...46%
Processing modified files...47%
Processing modified files...48%
Processing modified files...49%
Processing modified files...50%
Processing modified files...51%
Processing modified files...52%
Processing modified files...53%
Processing modified files...54%
Processing modified files...61%
Processing modified files...77%
Processing modified files...90%
Processing modified files...91%
Processing modified files...92%
Processing modified files...93%
Processing modified files...94%
Processing modified files...99%
Processing modified files...done
Test Env
Elpaca ad60abc HEAD -> master, origin/master, origin/HEAD
installer: 0.6
emacs-version: GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.38, cairo version 1.18.0)
of 2023-12-06
git --version: git version 2.43.0 |
Huh, well it was loading 0rg 9.7.X and breaking org-roam until I fixed it with that just a few days ago. So at least one person had the problem (me). |
Here's another test, explicitly listing the version of Org (9.7-pre): Test Case(elpaca-test
:early-init (setq elpaca-menu-functions '(elpaca-menu-org elpaca-menu-melpa))
:init (elpaca (compat :files ("*" (:exclude ".git")) :local-repo "compat" :repo
"https://github.com/emacs-compat/compat"))
(elpaca org)
(elpaca org-roam
(setq org-roam-directory "/tmp/test/" org-roam-v2-ack t))
(elpaca-wait)
(org-roam-db-sync)
(org-version nil 'full 'message)) Host Env
Output INFO Scraping files for loaddefs...
INFO Scraping files for loaddefs...done
GEN ../elpaca-autoloads.el
Cloning into '/tmp/elpaca.KZ2kgv/elpaca/repos/elpaca'...
Your branch is up to date with 'origin/master'.
Checking /tmp/elpaca.KZ2kgv/elpaca/repos/elpaca...
Compiling /tmp/elpaca.KZ2kgv/elpaca/repos/elpaca/elpaca-info.el...
Compiling /tmp/elpaca.KZ2kgv/elpaca/repos/elpaca/elpaca-log.el...
Compiling /tmp/elpaca.KZ2kgv/elpaca/repos/elpaca/elpaca-manager.el...
Compiling /tmp/elpaca.KZ2kgv/elpaca/repos/elpaca/elpaca-menu-elpa.el...
Compiling /tmp/elpaca.KZ2kgv/elpaca/repos/elpaca/elpaca-menu-melpa.el...
Compiling /tmp/elpaca.KZ2kgv/elpaca/repos/elpaca/elpaca-menu-org.el...
Compiling /tmp/elpaca.KZ2kgv/elpaca/repos/elpaca/elpaca-process.el...
Compiling /tmp/elpaca.KZ2kgv/elpaca/repos/elpaca/elpaca-test.el...
Compiling /tmp/elpaca.KZ2kgv/elpaca/repos/elpaca/elpaca-ui.el...
Compiling /tmp/elpaca.KZ2kgv/elpaca/repos/elpaca/elpaca.el...
Checking /tmp/elpaca.KZ2kgv/elpaca/repos/elpaca/doc...
Compiling /tmp/elpaca.KZ2kgv/elpaca/repos/elpaca/doc/early-init.el...
Compiling /tmp/elpaca.KZ2kgv/elpaca/repos/elpaca/doc/init.el...
Checking /tmp/elpaca.KZ2kgv/elpaca/repos/elpaca/extensions...
Compiling /tmp/elpaca.KZ2kgv/elpaca/repos/elpaca/extensions/elpaca-use-package.el...
Checking /tmp/elpaca.KZ2kgv/elpaca/repos/elpaca/images...
Checking /tmp/elpaca.KZ2kgv/elpaca/repos/elpaca/test...
Compiling /tmp/elpaca.KZ2kgv/elpaca/repos/elpaca/test/elpaca-test.el...
Done (Total of 11 files compiled, 3 skipped in 4 directories)
Downloading MELPA recipes...
Downloading MELPA recipes...100%
Clearing removed files...
Clearing removed files...done
Processing modified files...
Processing modified files...4%
Unable to read file "/home/n/git/Emacs/org-html-themes/setup/theme-readtheorg.setup"
Unable to read file "/home/n/git/Emacs/org-html-themes/setup/theme-readtheorg.setup"
Unable to read file "/home/n/git/Emacs/org-html-themes/setup/theme-readtheorg.setup"
Unable to read file "/home/n/git/Emacs/org-html-themes/setup/theme-readtheorg.setup"
Processing modified files...11%
Processing modified files...12%
Processing modified files...13%
Processing modified files...17%
Processing modified files...24%
Processing modified files...28%
Processing modified files...32%
Processing modified files...33%
Processing modified files...38%
Processing modified files...44%
Processing modified files...45%
Processing modified files...46%
Processing modified files...47%
Processing modified files...48%
Processing modified files...49%
Processing modified files...50%
Processing modified files...51%
Processing modified files...52%
Processing modified files...53%
Processing modified files...54%
Processing modified files...55%
Processing modified files...59%
Processing modified files...64%
Processing modified files...87%
Processing modified files...90%
Processing modified files...91%
Processing modified files...92%
Processing modified files...93%
Processing modified files...94%
Processing modified files...97%
Processing modified files...done
Org mode version 9.7-pre (9.7-pre-n/a-gb8d27b
@ /tmp/elpaca.KZ2kgv/elpaca/builds/org/)
Test Env
Elpaca ad60abc HEAD -> master, origin/master, origin/HEAD
installer: 0.6
emacs-version: GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.38, cairo version 1.18.0)
of 2023-12-06
git --version: git version 2.43.0 Do you recall what steps you took to see the error? |
Wrong type argument: integer-or-marker-p, nil org-roam/org-roam#2361
Straight package manage user here. Pinning to "ca873f7" worked for me with the following config: (use-package org-roam
:straight (org-roam :type git :host github :repo "org-roam/org-roam" :commit "ca873f7")
:init
(setq org-roam-v2-ack t)
:after org
:custom
(org-roam-directory "~/org/roam-brain")
(org-roam-completion-everywhere t)
:bind (("C-c n l" . org-roam-buffer-toggle)
("C-c n f" . org-roam-node-find)
("C-c n i" . org-roam-node-insert)
:map org-mode-map
("C-M-i" . completion-at-point))
:config
(org-roam-setup)) Once you pin the version then you need to restart Emacs. |
Kent Bull notifications@github.com writes:
FYI, straight.el has no :commit recipe keyword. From the README:
You'll want to use a lockfile. For Elpaca users, lockfiles are a planned feature. |
Ok, thanks for the correction. You're right. This means I don't know why it works for me. |
I've identified a temporary fix if you're using Org 9.7. Line 572 in 8667e44
Due to modifications in the Org Element API, the |
lum7na ***@***.***> writes:
I've identified a temporary fix if you're using Org 9.7.
https://github.com/org-roam/org-roam/blob/8667e441876cd2583fbf7282a65796ea149f0e5f/org-roam-db.el#L572
Due to modifications in the Org Element API, the `begin` property was
removed, leading to the aforementioned error.
This is not true. :begin property is still there, but the implementation
details of the org-element object structure have changed.
Replacing `(org-element-property :begin link))` with `(aref (org-element-property :standard-properties link) 0)` can resolve this issue.
I advice against using this implementation detail.
(org-element-property :begin link)) still works. But you may have to
make sure that the inlined functions are re-compiled. After upgrading
Org mode, all the users (including org-roam) of Org element API must be
re-compiled.
…--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
|
Description
I use org-roam on Linux and Windows, and recently added MacOS to the mix. The configuration that worked for me on other platforms now gives a "Wrong type argument: integer-or-marker-p, nil" when the org-roam db is updated.
Steps to Reproduce
The relevant part of my config (with straight use-package):
The error occurs when I start Emacs, but I can also trigger it with
org-roam-db-sync
.I also tried to remove the org-roam database and the complete
straight
folder before starting Emacs to force a clean start, but this gives the same result.Backtrace
I don't get a backtrace, even with
debug-on-error t
(or--debug-init
). Instead I get the following message for each of myorg-roam
files:This error messages comes from org-roam-db.el:698, which is confirmed because I see the message "Processing modified files..."
Expected Results
Updated database without errors
Actual Results
Error messages as described above.
The database does get filled with tables and data. I can't say if its complete.
Environment
Emacs installed with homebrew cask, which uses https://emacsformacosx.com/.
of 2023-02-22
The text was updated successfully, but these errors were encountered: