After setting up my emacs (26.3) with use-package and ivy/counsel, among other packages, emacs is sometimes hanging on C-x C-f. C-g does work to quit the process.
I ran debug-on-quit and this was the output:
Debugger entered--Lisp error: (quit)
ffap-file-at-point()
ffap-guesser()
ffap-guess-file-name-at-point()
run-hook-with-args-until-success(ffap-guess-file-name-at-point)
ivy-thing-at-point()
ivy--reset-state(#s(ivy-state :prompt "Find file: " :collection read-file-name-internal :predicate nil :require-match confirm-after-completion :initial-input nil :history file-name-history :preselect nil :keymap (keymap (remap keymap (undo . counsel-find-file-undo)) (96 lambda (&optional arg) "nil (`nil')" (interactive "p") (if (string= "" ivy-text) (execute-kbd-macro (kbd "M-o b")) (self-insert-command arg))) (C-backspace . counsel-up-directory) (67108991 . counsel-up-directory)) :update-fn nil :sort nil :frame #<frame F1 0xc90b00> :window #<window 1 on models.py> :buffer #<buffer models.py> :text nil :action (1 ("o" counsel-find-file-action "default") ("i" ivy--action-insert "insert") ("w" ivy--action-copy "copy") ("j" find-file-other-window "other window") ("f" find-file-other-frame "other frame") ("b" counsel-find-file-cd-bookmark-action "cd bookmark") ("x" counsel-find-file-extern "open externally") ("r" counsel-find-file-as-root "open as root") ("R" find-file-read-only "read only") ("l" find-file-literally "open literally") ("k" counsel-find-file-delete "delete") ("c" counsel-find-file-copy "copy file") ("m" counsel-find-file-move "move or rename") ("d" counsel-find-file-mkdir-action "mkdir")) :unwind nil :re-builder ivy--regex-plus :matcher counsel--find-file-matcher :dynamic-collection nil :display-transformer-fn ivy-read-file-transformer :directory "/home/alazar66/code/learning/html/qijc/app/" :caller counsel-find-file :current nil :def nil :ignore t :multi-action nil :extra-props nil))
ivy-read("Find file: " read-file-name-internal :matcher counsel--find-file-matcher :initial-input nil :action counsel-find-file-action :preselect nil :require-match confirm-after-completion :history file-name-history :keymap (keymap (remap keymap (undo . counsel-find-file-undo)) (96 lambda (&optional arg) "nil (`nil')" (interactive "p") (if (string= "" ivy-text) (execute-kbd-macro (kbd "M-o b")) (self-insert-command arg))) (C-backspace . counsel-up-directory) (67108991 . counsel-up-directory)) :caller counsel-find-file)
counsel--find-file-1("Find file: " nil counsel-find-file-action counsel-find-file)
counsel-find-file()
funcall-interactively(counsel-find-file)
call-interactively(counsel-find-file nil nil)
command-execute(counsel-find-file)
In case it's helpful, here's some of my .emacs:
(require 'package)
(add-to-list 'package-archives
'("melpa" . "https://melpa.org/packages/") t)
(package-initialize)
(when (not (package-installed-p 'use-package))
(package-refresh-contents)
(package-install 'use-package))
(eval-when-compile
(require 'use-package))
(use-package projectile
:ensure t
:config
(projectile-mode))
(use-package which-key
:ensure t
:config
(which-key-mode))
(use-package transpose-frame
:ensure t)
(use-package counsel
:after ivy
:config (counsel-mode))
(use-package ivy
:defer 0.1
:diminish
:ensure t
:config (ivy-mode))
(use-package swiper
:after ivy
:bind (("C-s" . swiper)
("C-r" . swiper)))