Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Directions for setting '.' key does not work in Emacs 29.1 #7

Open
mok0 opened this issue Aug 12, 2023 · 2 comments
Open

Directions for setting '.' key does not work in Emacs 29.1 #7

mok0 opened this issue Aug 12, 2023 · 2 comments

Comments

@mok0
Copy link

mok0 commented Aug 12, 2023

When adding your suggested lines to my init.el I get the following warning from Emacs, and it fails to load the remainder of the init.el file:

⛔ Warning (initialization): An error occurred while loading ‘/Users/mok/.emacs.d/init.el’:

Symbol's value as variable is void: dired-mode-map
@mattiasb
Copy link
Owner

Ah.

You should probably:

(defun my-dired-mode-hook ()
  "My `dired' mode hook."
  ;; To hide dot-files by default
  (dired-hide-dotfiles-mode))

(with-eval-after-load 'dired
  (define-key dired-mode-map "." #'dired-hide-dotfiles-mode)
  (add-hook 'dired-mode-hook #'my-dired-mode-hook))

If that works and you feel like it, please send a PR.

@mok0
Copy link
Author

mok0 commented Aug 16, 2023

Thank you for your suggestion, unfortunately it does not work for me, I am not sure what is going on but it may interfere with the completion framework. Hitting '.' makes dired change directory to the parent even though I mapped it like you propose.

I will just live with the fact that dotfiles are not visible for now :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants