3

So, i'm running emacs over a crappy ssh connection and I have it set up to use cscope. I can not use X because of this...hence I'm running emacs inside putty. However, when I search for something with cscope and it opens up the other buffer, I can not follow the links where cscope tells me which file and line number the item is on. When I go t a line number and hit enter, emacs tells me 'buffer is read-only' (it is trying to actually put in a new line instead of following the link). anyone know how I can follow those links?

Luke Girvin
  • 13,221
  • 9
  • 64
  • 84
robarson
  • 433
  • 4
  • 12

6 Answers6

5

I don't know about cscope for sure - but you should be able to find out the appropriate key binding by doing a "Ctrl-h m" in the buffer with all the links. This should open another buffer showing you help/key bindings on all the active modes.

E.g. if you do the same thing in a grep result buffer it indicates the key binding "C-c C-c compile-goto-error" which is used to open file at the grep line number (so it may be the same keys for cscope).

luapyad
  • 3,860
  • 26
  • 20
1

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)
jman
  • 11,334
  • 5
  • 39
  • 61
Peng
  • 116
  • 1
  • 3
1

As a workaround, I'm pressing <space> key on the cscope result line. It shows the code in the other frame, although it doesn't position the cursor there.

Deepak
  • 4,888
  • 1
  • 14
  • 7
0

Another workaround. Just type 'o' to select what you want. It means cscope-select-entry-one-window :)

0

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

0

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

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

might work well

जलजनक
  • 3,072
  • 2
  • 24
  • 30