GithubHelp home page GithubHelp logo

some advices about beagrep about beagrep HOT 4 CLOSED

baohaojun avatar baohaojun commented on July 22, 2024
some advices about beagrep

from beagrep.

Comments (4)

baohaojun avatar baohaojun commented on July 22, 2024

Thank you.

  1. I agree that ~/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?

  2. Do you mean you have a subfolder which is a symlink in your main source folder, and beagrep will show nothing about code in that symlinked subfolder? In this case it is by design of the underlying beagle search engine, it will ignore symlinks.

  3. 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))))
    

from beagrep.

sunwayforever avatar sunwayforever commented on July 22, 2024

"Do you mean you have a subfolder which is a symlink in your main source folder ....

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 ...

from beagrep.

baohaojun avatar baohaojun commented on July 22, 2024

I see, it is a bug and I have fixed it for the master branch. The 1. and 3. still not fixed yet.

Thanks.

from beagrep.

baohaojun avatar baohaojun commented on July 22, 2024
  1. and 3. are also fixed in master, please have a try.

Thanks!

Almost forgot: cd ~/tmp; mkdir -p ~/.cache; mv for-code-reading/ ~/.cache/

This will save you from rebuilding the index.

from beagrep.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.