Fuco1 / dired-hacks

Collection of useful dired additions
GNU General Public License v3.0
877 stars 77 forks source link

using dired-narrow changes the keybindings of "s" to dired-narrow-regexp #181

Open fab6 opened 3 years ago

fab6 commented 3 years ago

Hi,

I am running spacemacs-dev with emacs-git (but experienced similar behavior with emacs 27).

In my setup I use N for dired-narrow and set actually sorting to s

      (kbd "s") nil
      (kbd "ss") '(lambda () "sort by Size" (interactive) (dired-sort-other (concat dired-listing-switches " -S")))
      (kbd "sx") '(lambda () "sort by extension" (interactive) (dired-sort-other (concat dired-listing-switches " -X")))
      (kbd "sd") '(lambda () "sort by time" (interactive) (dired-sort-other (concat dired-listing-switches " -t")))
      (kbd "sn") '(lambda () "sort by name" (interactive) (dired-sort-other (concat dired-listing-switches)))

This works quite nice until I run the first time dired-narrow. Afterwards the keybinding for s is set to dired-narrow-regexp automatically.

How can I avoid this behavior? Do you have an advice? Thank you in advance!