2012-04-03 82 views
2

當打開emacs-nav時,它會拆分窗口並將導航緩衝區放在左側。我希望它在右側進行。也許可以使其緩衝區寬度不變。如何在右側窗口中打開emacs-nav緩衝區?

很遺憾,我找不到任何文檔。

+1

你指的是這樣的:http://code.google.com/p/emacs-nav/? – phils 2012-04-03 05:47:20

+0

是的。正好......... – Cynede 2012-04-03 06:31:48

+0

好的。引用非標準庫時,您需要提供鏈接。如果人們無法確定你在問什麼,他們無法幫助你。 – phils 2012-04-03 07:01:43

回答

3

我可以在nav.el(nav)電話(split-window-horizontally)留下選擇的左側窗口,然後進入到調用(nav-in-place)這改變選定窗口的導航窗口底部看到。

因此,使用右側窗口並不真正支持;然而,假設沒有其他東西需要調用nav-in-place(當然,它沒有在該文件的其他地方引用),我們可以建議它在執行操作之前切換到另一個窗口。

(defadvice nav-in-place (before my-nav-in-other-window) 
    "Start Nav in the other window, after splitting." 
    (other-window 1)) 
(ad-activate 'nav-in-place) 
1

似乎提出的解決方案不再適用。

我必須重新定義整個導航功能

(defun nav-right() 
    "Run nav-mode in a narrow window on the left side." 
    (interactive) 
    (if (nav-is-open) 
     (nav-quit) 
    (delete-other-windows) 
    (split-window-horizontally) 
    ;;(other-window 1) 
    (ignore-errors (kill-buffer nav-buffer-name)) 
    (pop-to-buffer nav-buffer-name nil) 
    (set-window-dedicated-p (selected-window) t) 
    (nav-mode) 
    (when nav-resize-frame-p 
     (nav-resize-frame)))) 
相關問題