-
Notifications
You must be signed in to change notification settings - Fork 38
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
Feature request: search symlinked file, but make the file path in "*rg*" buffer the path of the symlink #156
Comments
Not sure I understand fully what you mean here. Could you give a more explicit example how a real directory structure with symlinks and all, what search you do in what dir and what you would expect to come out of it. |
Here is an example, the annex dir is managed with git-annex, and in the android dir I have several symlinks:
Now I search for "english" with emacs rg in the android dir:
Now I move point to the first match line (line with 15 60), and press enter. The file is opend, but the file path is:
The path above (let me call it path1) is not the symlink path "~/my_lib/annex/android/antennapod-feeds-2023-03-08.opml". From path1 you can not jump to the dir that contains the symlink. |
I have tried this:
|
Ok, now I understand. So you essentially don't want symlinks to be resolved when jumping to a file. |
One possible way to disable the symlink resolving is to open the file before compile-find-file. I just removed the file-truename function from compile-find-file, works for me now. |
This should probably be exposed as a customization of the compilation package. But that would be an emacs bug to report. |
People use symlinks to organize text documents, a file may have links in different dirs. For example, if we use dirs as catalogues, when a file is opened following the search result in a "rg" buffer, it would be convenient to jump to the catalogue by just M-x "dired". However, the current behavior is to jump to the dir that has the symlink destination file. For people using git-annex, the symlink destination dir could be a database dir, and it is not supposed to be accessed directly.
This request is to change the "default-directory" based on the search dir, not based on where the symlink destination dir.
The text was updated successfully, but these errors were encountered: