swiper icon indicating copy to clipboard operation
swiper copied to clipboard

ivy-rotate-sort in counsel-find-file resets current path

Open saolaolsson opened this issue 3 years ago • 3 comments

Using ivy-rotate-sort after counsel-up-directory while in counsel-find-file resets the current path to the path originally set when entering counsel-find-file. Expected that it would only change file list order.

Tested with 7c5d49f (2021-05-18).

saolaolsson avatar May 20 '21 18:05 saolaolsson

Any chance of a reproducer? I tried the following:

  1. emacs -Q
  2. M-x package-initialize RET
  3. M-x counsel-mode RET
  4. C-x C-f
  5. C-DEL
  6. C-c C-s

And nothing happens.

basil-conto avatar May 20 '21 18:05 basil-conto

ivy-sort-functions-alist needs to be set to something useful. https://oremacs.com/swiper/Changelog#0-9-0-nc-ivy-rotate-sort will reproduce, for example.

saolaolsson avatar May 20 '21 18:05 saolaolsson

Thanks. I don't know why ivy--cd doesn't update default-directory, nor why ivy--reset-state resets ivy--directory-hist. Hopefully someone else does.

basil-conto avatar May 20 '21 19:05 basil-conto