No Emacs GUI with cscope

So, I am running emacs over a crappy ssh connection, and I configured it to use cscope. I cannot use X because of this ... hence, I run emacs inside putty. However, when I search for something with cscope and it opens a different buffer, I cannot follow the links where cscope tells me which file and line number is in the element. When I find t the line number and press enter, emacs tells me that "the buffer is read-only" (it is trying to actually enter a new line instead of the following link). Does anyone know how I can follow these links?

+3
source share
6 answers

I definitely donโ€™t know about cscope, but you should be able to find the appropriate key binding by executing "Ctrl-h m" in the buffer with all the links. This should open another buffer showing that you help / bind keys in all active modes.

eg. if you do the same in the grep result buffer, this indicates the key binding is โ€œCc Cc compile-goto-errorโ€, which is used to open the file by the grep line number (so it could be the same keys for cscope).

+5
source

As a workaround, I press <space> in the cscope result line. It shows the code in another frame, although it does not place the cursor there.

+1
source

Changing this line in xcscope.el fixed the problem on my computer.

-(define-key cscope-list-entry-keymap [return] 'cscope-select-entry-other-window) +(define-key cscope-list-entry-keymap (kbd "RET") 'cscope-select-entry-other-window) 
+1
source

Could you use cscope with Tramp mode? I am not familiar with cscope, but I had excellent results using tramp mode to remotely read / write files over an SSH connection.

0
source

I believe GNU find version 4.2 and higher supports -L to follow symbolic links. Hence,

 find -L . -name *.[ch] > cscope.files cscope -b -R -q -i cscope.files 

may work well

0
source

Another workaround. Just enter โ€œoโ€ to select what you want. This means cscope-select-entry-one-window :)

0
source

All Articles