Question

Emacs is my editor of choice, and I use the cscope intergration xcscope.el provides. Recently I had a flirt with Vim. I decided to stay with Emacs, but one of the things I really liked in Vim was how I could control where my cscope windows should appear. Using cscope_maps.vim (http://cscope.sourceforge.net/cscope_maps.vim) I get shortcuts that let Vim open search results in the same buffer, a new horizontal or a new vertical split.

In Emacs a the cscope buffer just pops up in a window somewhere, according to some rules I don't know. My guess: A new window is opened if I have only one. If I have more, the one I've been away from for the longest time is used.

Pin Emacs buffers to windows (for cscope) is the only related topic I've found that helps a bit, but that doesn't make it near as flexible as the key bindings in Vim.

Anyone got a better cscope setup in Emacs than what xcscope.el provides? I don't know lisp, so I have no idea how hard it would be to make this work the way it does in Vim.

Was it helpful?

Solution

  1. Emacs 24 (not yet released) changes radically how it is decided which buffers are displayed in which windows. In principle it should give you more fine-grained control. In any case, how you solve the problem for Emacs 24 will be different from how you solve it for older versions.

  2. Consider filing an Emacs enhancement request to specifically get behavior more like what you had with Vim. To do that, use M-x report-emacs-bug.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top