Skip to content
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

How to use cscope-database-regexps #4

Open
mjsilverstri opened this issue Mar 26, 2014 · 4 comments
Open

How to use cscope-database-regexps #4

mjsilverstri opened this issue Mar 26, 2014 · 4 comments

Comments

@mjsilverstri
Copy link

am using emacs 24.3 with xcscope. I need help in setting cscope-database-regexps. I am trying to setup so that it will look for code in this order

/home/mike/Src/master1/child1/child1
/home/mike/Src/master2/child2/child2
/home/mike/Src/master1
/home/mike/Src/master2

So in .emacs I did the following, but it does not work. I don't see cscope.out get created in each of the directories I listed above.

I put /home/mike/Src/master1/child1/child1 and /home/mike/Src/master2/child2/child2 since they are my primary area of my work. If a search is not found that, I want to expand to the rest of the tree. Hence I have my priorities. I want to know how can I do that with xcscope.

Thank you.

(setq cscope-database-regexps
'(
( "^/home/mike/Src/master1/child1/child1"
t
)
( "^/home/mike/Src/master1//"
t
)
( "^/home/mike/Src/master2/child2/child2"
t
)
( "^/home/mike/Src/master2/"
t
)
)
)

@dkogan
Copy link
Owner

dkogan commented Mar 26, 2014

mjsilverstri [email protected] writes:

am using emacs 24.3 with xcscope. I need help in setting cscope-database-regexps. I am trying to setup so that it will look for code in this order

/home/mike/Src/master1/child1/child1
/home/mike/Src/master2/child2/child2
/home/mike/Src/master1
/home/mike/Src/master2

So in .emacs I did the following, but it does not work. I don't see cscope.out get created in each of the directories I listed above.

I put /home/mike/Src/master1/child1/child1 and /home/mike/Src/master2/child2/child2 since they are my primary area of my work. If a search is not found that, I want to expand to the rest of the tree. Hence I have my priorities. I want to know how can I do that with xcscope.

Thank you.

(setq cscope-database-regexps
'(
( "^/home/mike/Src/master1/child1/child1"
t
)
( "^/home/mike/Src/master1//"
t
)
( "^/home/mike/Src/master2/child2/child2"
t
)
( "^/home/mike/Src/master2/"
t
)
)
)

Hi. Is this something that worked for you in the original version of
xcscope.el? I don't use this functionality, but it should work as
before. Regardless, I'll take a look when I have time in a few days.

@angrycandy
Copy link

I use cscope-database-regexps. You have to create the databases manually using xcscope.el in each directory.

See my example at http://www.emacswiki.org/emacs/CScopeAndEmacs#toc10

@dkogan
Copy link
Owner

dkogan commented Feb 2, 2016

Hi. I'm sorry it took so long to look at this. Are you sure this worked for you with older code as you set it up? 't means to stop the search and take what we found. Here it's the only item in the lists, so we haven't found anything yet, so this can't work.

@angrycandy
Copy link

Yes, cscope-database-regexps works for me when I define it correctly. The bottom of http://www.emacswiki.org/emacs/CScopeAndEmacs section cscope -q shows an example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants