projectile icon indicating copy to clipboard operation
projectile copied to clipboard

Renders emacs unusable on empty directories `(wrong-type-argument wholenump nil)`

Open taoufik07 opened this issue 1 year ago • 2 comments

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

  1. Create new dir mkdir poc && cd $_
  2. 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

taoufik07 avatar Sep 27 '24 02:09 taoufik07

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)
  ...

taoufik07 avatar Sep 27 '24 02:09 taoufik07

@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.

bbatsov avatar Sep 27 '24 04:09 bbatsov

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!

github-actions[bot] avatar Jan 19 '25 02:01 github-actions[bot]

Fixed by #1910.

bbatsov avatar Jan 30 '25 07:01 bbatsov