Open c02y opened 6 years ago
Euh no, it should be like that. Could you tell me if cscope works in your Emacs, ie. do a : M-: (start-process "rscope-buf" "rscope-buf" "cscope")
Is a buffer named "rscope-buf" spawned ?
And no, the database can be automatically generated within emacs if one of the automatic hooks matches (ie. there is a .git directory, a configure.ac file or an existing cscope.out)
After I disabled xcscope, enabled rscope and tried
M-: (start-process "rscope-buf" "rscope-buf" "cscope")
a buffer named “rscope-buf” is spawned, but the buffer's size is 41k, the buffer contains a lot of blanks, and multiple repeated string like:
Cscope version: 15.8b
Press ? key for help
I don't think the content of this buffer is normal, containing a lot of blanks and it's size is too big.
OK, function "rscope-find-global-definition" works now and it created cscope.out file automatically inside the current directory of the buffer, but if I delete or do not delete that cscope.out file and then call "rscope-regenerate-databse", it still says:
Cscope database generation failed, exit code=127
But what if I want to create cscope* files based on it's parent directory, such as I'm editing a file, and this file belongs to a submoduleA, the submoduleA contains .git and it is inside its parent directory, and the buffer called interfaces inside another submoduleB:
So I want to create cscope* files based on Parent directory, it seems rscope cannot do this.
============== UPDATE: I tried rscope for a file inside dirC, it won't create cscope* file, and it says:
Cscope database generation failed, exit code=127
Point1: I have the same result, and it is normal. That was just to be sure your cscope was working, as in your previous message you couldn't even generate a database
Point2: I created your exact layout, but added one 'toto.c' file into sbumoduleA, and one 'titi.c'. I open a dired buffer in dirC, then call 'rscope-regenerate-database' (pressing C-c s R), and it works, both '*.c' files are included in the generated cscope database.
I'm a bit confused why it doesn't work in your case...
I don't know, sometimes it works, sometimes it doesn't work.
But all I need is to rscope-regenerate-database
prompt the path to create cscope database, not based on the current directory.
Event if I still don't get why it works sometimes and not other times, what you want seems to be : (rscope-regenerate-cscope-database "my_path")
Why not make it prompt for path?
Because I wanted rscope to "auto-generate" the path for the lambda user, ie. use the automatic hooks, or the keyboard binding C-c s R in the right directory. For advanced users, they can type lisp evaluation and therefore don't need an interactive function.
I'm still at a loss why C-c s R in the dired buffer doesn't work 100% of the time for you. Do you have a pattern, a message or something I could try to reproduce your issue ? Is it on a Linux box or a Windows ? Is there anything specific to your environment you think of ?
Ubuntu 16.04 64-bit No other warning or error message, just
Cscope database generation failed, exit code=127
If I execute
(rscope-regenerate-cscope-database "my_path")
I already change "my_path" to an absolute path of my project. And if failed too:
Debugger entered--Lisp error: (error "Cscope database generation failed, exit code=127.")
signal(error ("Cscope database generation failed, exit code=127."))
error("Cscope database generation failed, exit code=%d." 127)
When I use rscope function such as
rscope-find-global-definition
or directly callrscope-regenerate-databse
, it says:The readme file says:
You mean I have to manually generate database outside of Emacs?
OK, I tried to manually generate database, and I tried to call
rscope-regenerate-databse
to regenerate database, it says "Cscope database generation failed, exit code=127" too.Is this a bug or defined like this?