Renders emacs unusable on empty directories `(wrong-type-argument wholenump nil)`
Expected behavior
Emacs should start normally without any blocking errors.
Actual behavior
When opening Emacs in a newly created directory, I encounter (wrong-type-argument wholenump nil) on initialization and with every key binding, which renders the application unusable.
Works fine when Initializing an empty repo .git.
Steps to reproduce the problem
- Create new dir
mkdir poc && cd $_ - Open emacs
emacs -nw
(use-package
projectile
:ensure t
:init
(projectile-mode)
:bind ("M-p" . 'projectile-command-map)
:custom ((setq projectile-enable-caching t)
(setq projectile-switch-project-action 'projectile-dired)
(setq projectile-completion-system 'default)))
Environment & Version information
- Projectile: 20240901.1554
- Emacs: GNU Emacs 29.4 (aarch64-apple-darwin)
- OS: macOS 14.6.1
I suspect it to be caused/triggered by the following commit https://github.com/bbatsov/projectile/commit/3c92d28c056c3553f83a513a35502b4547d29319
For now removing the buffer-list-update-hook #'projectile-track-known-projects-find-file-hook hook, seems to do the trick:
(use-package
projectile
:ensure t
:init
(projectile-mode)
(remove-hook 'buffer-list-update-hook #'projectile-track-known-projects-find-file-hook)
...
@jtamagnan Can you please take a look in case your change is really the culprit.
@taoufik07 Can you post here the full backtrace? That would make your problem easier to debug.
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!
Fixed by #1910.