Open otech-nl opened 1 year ago
+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.
:ensure t
:custom
(org-roam-directory (file-truename "~/org/org-roam/"))
:bind (("C-c n l" . org-roam-buffer-toggle)
("C-c n f" . org-roam-node-find)
("C-c n g" . org-roam-graph)
("C-c n i" . org-roam-node-insert)
("C-c n c" . org-roam-capture)
;; Dailies
("C-c n j" . org-roam-dailies-capture-today))
:config
(setq org-roam-node-display-template (concat "${title:*} " (propertize "${tags:10}" 'face 'org-tag)))
(org-roam-db-autosync-mode)
(require 'org-roam-protocol)
)
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 9082fa889
) resolved the issue, didn't investigate further than that
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.
:PROPERTIES:
:ID: C8AD00C6-A447-4BA4-B844-E48262019C1B
:END:
#+title: Test
id:D6765314-53B6-4D90-A0F7-889154A4C361
Removing the colon from the last line fixes the problem.
:PROPERTIES:
:ID: C8AD00C6-A447-4BA4-B844-E48262019C1B
:END:
#+title: Test
idD6765314-53B6-4D90-A0F7-889154A4C361
Also had this, slightly downgrading org-mode (to commit
9082fa889
) resolved the issue, didn't investigate further than that
Thanks! With straight.el
I can pin my version in .emacs.d/straight/versions/default.el
to org@9.5.5 with:
(("org" . "8ef6205a560cd3a92f8c5f8fe34953b80121c2cb"))
:gamma
This gets rid of the error for me.
If I understand correctly, straight installs the latest version by default (org@9.7-pre
). The above suggests that this pre-release breaks org-roam
. I am not sure if/how to inform the maintainers of org
/org-roam
. Any suggestions?
Quick note that M-x straight-freeze-versions
should be run first to write the .emacs.d/straight/versions/default.el
file. This will lock down all package versions, unless the file is edited to remove all but the org
-related commit.
Also had this, slightly downgrading org-mode (to commit
9082fa889
) resolved the issue, didn't investigate further than thatThanks! With
straight.el
I can pin my version in.emacs.d/straight/versions/default.el
to org@9.5.5 with:(("org" . "8ef6205a560cd3a92f8c5f8fe34953b80121c2cb")) :gamma
This gets rid of the error for me.
If I understand correctly, straight installs the latest version by default (
org@9.7-pre
). The above suggests that this pre-release breaksorg-roam
. I am not sure if/how to inform the maintainers oforg
/org-roam
. Any suggestions?
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 Org mode version 9.7-pre (release_9.6.7-572-g39de4a) GNU Emacs 30.0.50 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.37, cairo version 1.17.8) of 2023-05-09.
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! :)
+1 Same problem here. I am using:
Org roam: v2.2.2-42-g5c06471 Org mode version 9.7-pre (release_9.6.7-572-g39de4a) GNU Emacs 30.0.50 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.37, cairo version 1.17.8) of 2023-05-09.
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:
- Run straight-freeze-versions to generate the default.el file.
- Edit the org entry in the file
... 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 straight.el
.
@otech-nl, I was trying to follow your instructions. I ran straight-freeze-versions
and edited the defaul.el
file as you did. But I am not sure what to do after that. I did straight-pull org and straight-merge org, but my org mode version is still 9.7-pre. As I said, my expertise is thin... :)
An of course, this happens when I on a deadline and I need to use org-roam a lot. Murphy's law, I guess...
@otech-nl, I was trying to follow your instructions. I ran
straight-freeze-versions
and edited thedefaul.el
file as you did. But I am not sure what to do after that. I did straight-pull org and straight-merge org, but my org mode version is still 9.7-pre. As I said, my expertise is thin... :)
You may have to delete org
from .emacs.d/straight/repos
and/or .emacs.d/straight/build
and restart Emacs
An of course, this happens when I on a deadline and I need to use org-roam a lot. Murphy's law, I guess...
More like Finagle's corollary ;) Good luck!
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.
Check my previous reply for configuring
straight.el
.
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 packages.el
if using Doom Emacs:
(package! org :pin "5890ac")
I confirm the latest stable version 9.6.7 also works. Configure in
packages.el
if using Doom Emacs:(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 :-)
@dustinfarris In the link: https://git.savannah.gnu.org/cgit/emacs/org-mode.git/tag/?h=release_9.6.7
See my comment in https://github.com/radian-software/straight.el/issues/1107 for the likely reason. I believe that the issue belongs to straight.
Hello @dustinfarris ,
I pined to "ca873f7" and "5890ac", but still does not work. Which version of emacs are you using? I am using 28.2. Thanks
@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.
I pegged to 9.6.7 with:
(package! org :pin "ca873f7")
Hi @dustinfarris, where did you get the ca873f7
commit? I found 5890ac
is not usable when doom upgrade
.
5890ac is the tag ref. The actual commit that was tagged is ca873f7
@dustinfarris Got it, thank you!
Should be fixed on develop branch of straight.el. Testing is appreciated.
@progfolio For me, everything is working at the latest commit
I am still having the issue with release_9.6.7-644-gf80c82. :(
I am still having the issue with release_9.6.7-644-gf80c82. :(
What's the output of M-x straight-version
?
(HEAD -> master, origin/master, origin/HEAD) ff63b15 2023-06-15
(HEAD -> master, origin/master, origin/HEAD) ff63b15 2023-06-15
You would need to update to straight's "develop" branch. e.g.
(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:
~/.config/emacs/.local/
directory;~/.config/emacs/modules/lang/org/packages.el
;package! org...
and we want to rollback that.To rollback org
, look at the last line of package! org
expression...
(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 ~/.config/emacs/bin/doom install
.
Wait for Doom to install every package again. During the installation, you should see this line:
- Checked out org: 5890ac
Finally, start your Emacs and enjoy your org-roam while waiting for further updates.
@gicrisf You can pin org-mode version in doom/packages.el
. And after that delete org repos and then doom sync
.
@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.
Do I have to pin the version in packages.el
or where do I have to pin it? And which version of the package should I pin?
I am new to the whole (doom) emacs thing and I am really confused, sorry.
I get these error messages:
⛔ Warning (emacs): Org version mismatch. Org loading aborted.
This warning usually appears when a built-in Org version is loaded
prior to the more recent Org version.
Version mismatch is commonly encountered in the following situations:
1. Emacs is loaded using literate Org config and more recent Org
version is loaded inside the file loaded by ‘org-babel-load-file’.
‘org-babel-load-file’ triggers the built-in Org version clashing
the newer Org version attempt to be loaded later.
It is recommended to move the Org loading code before the
‘org-babel-load-file’ call.
2. New Org version is loaded manually by setting ‘load-path’, but some
other package depending on Org is loaded before the ‘load-path’ is
configured.
This "other package" is triggering built-in Org version, again
causing the version mismatch.
It is recommended to set ‘load-path’ as early in the config as
possible.
3. New Org version is loaded using straight.el package manager and
other package depending on Org is loaded before straight triggers
loading of the newer Org version.
It is recommended to put
(straight-use-package 'org)
early in the config. Ideally, right after the straight.el
bootstrap. Moving ‘use-package’ :straight declaration may not be
sufficient if the corresponding ‘use-package’ statement is
deferring the loading.
⛔ Error (org-roam): Failed to process <file> with error Wrong type argument: integer-or-marker-p, nil, skipping...
⛔ Error (org-roam): Failed to process<file> with error Wrong type argument: integer-or-marker-p, nil, skipping...
It does say config successfully reloaded!
though.
I have neither babel
nor straight
(consciously) installed and there is no load-path
anywhere in my config.
@Enemoy :
Since you are using Doom Emacs, you are using straight and other supporting packages . . .
Pin Org in packages.el ->
;; Fix for org-roam link issue
(package! org :pin "ca873f7")
Then remove the .local
directory in the main Doom dir.
Then simply run doom sync
- since you removed the local dir, Doom should automatically download and install all the packages.
It should all complete without errors.
Now, you can safely and successfully perform doom upgrade
+1 facing this problem as well.
This workaround solved the problem in my case: https://github.com/org-roam/org-roam/issues/2361#issuecomment-1632943836.
As mentioned in the comment (using an external link), after pinning the version we need to run M-x straight-thaw-versions
.
@progfolio Thank you for looking into this, moving to the development branch of straight.el fixes this problem for me.
For anyone using elpaca
, this use-package
clause works for me (maybe there's a better one, beats me):
(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"))))
For anyone using
elpaca
, thisuse-package
clause works for me (maybe there's a better one, beats me):(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:
elpaca | 1008684 HEAD -> feat/version-checks |
isntaller | 0.6 |
emacs | 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 | 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).
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):
elpaca | 1008684 HEAD -> feat/version-checks |
isntaller | 0.6 |
emacs | 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 | git version 2.43.0 |
Do you recall what steps you took to see the error? Were packages updated and then the error started happening, fresh install, etc?
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:
:straight (org-roam :type git :host github :repo "org-roam/org-roam" :commit "ca873f7") Once you pin the version then you need to restart Emacs.
FYI, straight.el has no :commit recipe keyword.
From the README:
We support :branch, but not :commit or :version-regexp. To lock a package to a specific commit, use a lockfile. See also #246 for discussion of extensions to the recipe to support package pinning, which is a planned feature.
You'll want to use a lockfile.
For Elpaca users, lockfiles are a planned feature.
However, Elpaca does have more flexible recipe keywords such as :ref
and :pin
.
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.
Due to modifications in the Org Element API, the begin
property was removed, leading to the aforementioned error. Replacing (org-element-property :begin link))
with (aref (org-element-property :standard-properties link) 0)
can resolve this issue.
lum7na @.***> writes:
I've identified a temporary fix if you're using Org 9.7.
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
Just a ping for anyone who pinned to an older version of org, you'll want to update to org 9.7.5 for a security vulnerability fix.
Org-roam from straight.el worked for me after I deleted the straight/build
directory to trigger a rebuild of everything.
I had the same problem but it's because I didn't rebuild all the packages when migrating to emacs-plus 30 on macOS. (package-recompile-all)
can help anyone who has the same problem.
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/.