Wilfred / ag.el

An Emacs frontend to The Silver Searcher
http://agel.readthedocs.org/en/latest/
525 stars 61 forks source link

Keybinding to open result in other window #142

Closed holocronweaver closed 6 years ago

holocronweaver commented 6 years ago

I have ag-reuse-window set to t, but I still sometimes want to open a result in another window.

Could we add a keybinding to open the result window in another window, regardless of the setting of ag-reuse-window? Maybe bind o for 'other window'.

Wilfred commented 6 years ago

You should be able to do this by binding compile-goto-error (which is the underlying function) directly in the mode map:

(define-key ag-mode-map "o" #'compile-goto-error)

I think this is too specific to justify adding to ag.el proper, so I'm closing. I'm open to persuasion, of course :)

holocronweaver commented 6 years ago

Hm, I tried that and pressing o opened the result in the same window. Any idea why? Indeed if I directly call compile-goto-error it reuses the same window.