Closed sunwayforever closed 8 years ago
Thank you.
~/tmp/for-code-reading
is a bad choice I made. But to allow it to be customized also cause me uneasiness, so maybe I can use another less obtrusive hardcoded value such as the ~/.cache/for-code-reading? What do you think? I checked my ~/.cache directory, seems a lot open source projects are using it already, so maybe it is part of FHS recommendation?I agree with you. But please note that when you use it in Emacs, displaying the shortened filename may cause it unable to find the file, because the default directory could be not the same as the top indexed project directory. That's why I made this decision. Aslo, the absolute path make it easily for scripting in other programs.
So I will add a -s|--short option, what do you think?
You may have to add the make(1)'s Entering directory '/media/sunway/...'
and tweak Emacs's grep-mode to behave like its parent compilation-mode to not ignore those Entering directory
marks:
(add-hook 'grep-mode-hook
(lambda ()
(setq compilation-directory-matcher (default-value 'compilation-directory-matcher))))
Nop, for example, my code is located at /media/sunway/android
, while /media/sunway
is symbolic linked to /home/sunway/source
, then if I run mkbeagrepidx
in /media/sunway/android
, the index file will be put into ~/tmp/for-code-reading/media/sunway/android
, right? but when I run beagrep -e xxx
in /home/sunway/source/android
later, it will try to locate the index file in ~/tmp/for-code-reading/home/sunway/source/android
, which does not exist. btw, it doesn't work even I build the index in /home/sunway/source/android
, because the index file is still put into ~/tmp/for-code-reading/media/sunway/android
...
I see, it is a bug and I have fixed it for the master branch. The 1. and 3. still not fixed yet.
Thanks.
Thanks!
Almost forgot: cd ~/tmp; mkdir -p ~/.cache; mv for-code-reading/ ~/.cache/
This will save you from rebuilding the index.
thanks for your great work, but there is some advice for beagrep
~/tmp/for-code-reading
should be able to be customized/media/sunway/storage3/android/frameworks/base/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java
should be renamed toframeworks/base/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java
since I make the index in /media/sunway/storage3/android