purcell / ibuffer-vc

Let Emacs' ibuffer-mode group files by git project etc., and show file state
171 stars 11 forks source link

Follow symlinks also when querying special buffers (like Dired) #21

Closed aplaice closed 6 years ago

aplaice commented 6 years ago

Otherwise, if you have, say, a symlink from ~/symlinked_repo/ to ~/true_path_to_repo/, and then:

  1. Open ~/symlinked_repo/ in Dired
  2. Open ~/symlinked_repo/a_file_under_vc
  3. Run M-x ibuffer-vc-set-filter-groups-by-vc-root

the Dired buffer and the file buffer will be in two different groups. (You will get something like the following:

[ Git:~/symlinked_repo/ ]
  %  symlinked_repo           $size Dired by name    ~/symlinked_repo
[ Git:~/true_path_to_repo/ ]
     a_file_under_vc          $size $mode    ~/symlinked_repo/a_file_under_vc

rather than:

[ Git:~/true_path_to_repo/ ]
  %  symlinked_repo           $size Dired by name    ~/symlinked_repo
     a_file_under_vc          $size $mode    ~/symlinked_repo/a_file_under_vc

The fact that the Filename column displays the symlinked path rather than the "true" path is obviously independent of ibuffer-vc.)

The issue also occurs with Magit buffers, ansi-term buffers etc.

PS I love ibuffer-vc and couldn't imagine life without it! :)

purcell commented 6 years ago

Makes sense, thanks! Happy that ibuffer-vc is useful to you.

aplaice commented 6 years ago

Thanks!