No such file or directory, /storage/emulated on Android with org-roam
Expected behavior
M-x org-roam-node-find followed by selection of a node stored on the Android sdcard should open the selected node.
M-x org-roam-capture should open a capture buffer.
Actual behavior
M-x org-roam-node-find followed by selection of a node stored on the Android sdcard produces a message that includes:
no such file or directory, /storage/emulated
However, a buffer for the node is opened, but not presented.
If the Acton is repeated, there is no error message, and the buffer is presented.
M-x org-roam-capture should open a capture buffer, but the message above is generated, and no capture buffer is created. Repeating the process does not produce any different results.
Steps to reproduce the problem
Install the Emacs signed version of Termux and Android Emacs as described by the README at the bottom of https://sourceforge.net/projects/android-ports-for-gnu-emacs/files/termux/
It is very important to include the steps about creating early-init.el and external document storage.
If org-roam is installed using package-install, at this point and the org-roam-directory set to point to a directory on the sdcard, it works as expected:
- Note: some dependencies need to be installed in termux,
If, however, prelude is installed, using the curl method, and then org-roam is installed, and the org-roam-directory set to point to a directory on the sdcard, then the problem behavior results:
- Note:
curlputs . emacs.d in the termux home, so it has to be moved to Emacs home before prelude will work, - early-init should be moved to
.emacs.d/personal/preload/
Environment & Version information
Pixel tablet, and Pixel Fold
Emacs version
termux-app_apt-android-7-release_universal.apk and emacs-30.0.92-29-arm64-v8a-termux.apk.
Operating system
GrapheneOS build 2024120900 based on Android Open Source version 15
It looks like the init.el line (require 'prelude-editor) is the rough source of the problem.
Methodology: I commented out the active lines in init.el and all the modules in prelude-modules.el and reversed the process one section at a time until the bug recurred.
I have further narrowed it down to the Projectile lines in core/prelude-editor.el.
I still don't know if it's a problem with the prelude code or the projectile package. The init debugger has not been especially helpful in finding the problem.
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed soon if no further activity occurs. Thank you for your contribution and understanding!
I narrowed it down a little further, so my work-around can just be:
(setq prelude-guru nil)
As a result, I don't have to turn off all of projectile.
Hmm, that's interesting. This package just rebinds a few arrow keybindings, so I'm surprised it caused such issues. Anyways, it's good to hear you've figured this out!