minad / cape

🦸cape.el - Completion At Point Extensions
GNU General Public License v3.0
603 stars 22 forks source link

cape-file completion error #112

Closed zijianyue closed 7 months ago

zijianyue commented 7 months ago

emacs-29.2 on centos7 emacs -Q, then eval below config, after that open my ~/.emacs.d/init.el and do some completion.

(add-to-list 'load-path "/home/gezijian/.emacs.d/elpa/corfu-20240122.2327")
(add-to-list 'load-path "/home/gezijian/.emacs.d/elpa/compat-29.1.4.4")
(add-to-list 'load-path "/home/gezijian/.emacs.d/elpa/cape-20240304.1824")

(use-package corfu
  :custom
  (corfu-auto t)
  (corfu-auto-prefix 1)
  (corfu-auto-delay 0))

(use-package cape
  :demand t
  )

(add-hook 'emacs-lisp-mode-hook
          (lambda ()
            (corfu-mode t)           
            (setq-local completion-at-point-functions
                        (list (cape-capf-super
                               #'cape-elisp-symbol
                               #'cape-dict
                               #'cape-abbrev
                               #'cape-elisp-block
                               #'cape-file
                               #'cape-dabbrev
                               )))

            ))

cape-file provided the correct candidate,

image

then I pressed enter, but it overrode the preceding dir.

image

BTW, if I manually execute cape-file, the result is correct.

image