hylang / hy-mode

Hy mode for Emacs
GNU General Public License v3.0
189 stars 48 forks source link

Hy mode disables finding files! #79

Closed ghost closed 5 years ago

ghost commented 5 years ago

When in hy mode C-x C-f is not working any more. How am i supposed to work with my other files?

ekaschalk commented 5 years ago

Run describe-key then input C-x C-f. hy-mode does not bind that chord.

ghost commented 5 years ago

C-x C-f runs the command hy-shell-eval-current-form (found in hy-mode-map), which is an interactive autoloaded compiled Lisp function in ‘hy-mode.el’.

It is bound to C-x C-f, C-M-x.

(hy-shell-eval-current-form)

Send form containing current point to shell.

ekaschalk commented 5 years ago

C-M-x was added here: https://github.com/hylang/hy-mode/pull/64 by another user and is confirmed idiomatic here: https://www.gnu.org/software/emacs/manual/html_node/emacs/Key-Index.html

I do not know why C-x C-f is using that function, but hy-mode only binds C-M-x.

ekaschalk commented 5 years ago

Check your lisp-mode-shared-map, I suspect some configuration is adding that binding there.

(set-keymap-parent hy-mode-map lisp-mode-shared-map) is the only line of code that could cause this.

ghost commented 5 years ago

In hy-mode.el is (define-key hy-mode-map (kbd "C-M-x") 'hy-shell-eval-current-form) the only line bound to hy-shell-eval-current-form. This is the part i am seeing in hy-mode.el:

;; Spacemacs users please see spacemacs-hy, all bindings defined there (set-keymap-parent hy-mode-map lisp-mode-shared-map) (define-key hy-mode-map (kbd "C-c C-z") 'hy-shell-start-or-switch-to-shell) (define-key hy-mode-map (kbd "C-c C-b") 'hy-shell-eval-buffer) (define-key hy-mode-map (kbd "C-c C-t") 'hy-insert-pdb) (define-key hy-mode-map (kbd "C-c C-S-t") 'hy-insert-pdb-threaded) (define-key hy-mode-map (kbd "C-c C-r") 'hy-shell-eval-region) (define-key hy-mode-map (kbd "C-M-x") 'hy-shell-eval-current-form) (define-key hy-mode-map (kbd "C-c C-e") 'hy-shell-eval-last-sexp) (define-key inferior-hy-mode-map (kbd "C-c C-z") (lambda () (interactive) (other-window -1)))

ghost commented 5 years ago

Absolutely a problem with my own init.el! I am much sorry!