2012-12-16 2 views
2

나는 이맥스를 사용하여 파이썬으로 코딩하고있다. 나는 나의 필요에 맞게 ".emacs"를 수정했다. 그러나 현재 버퍼를 실행할 때 Windows의 기본 세로 분할 동작을 변경하는 방법을 모르겠습니다.현재 버퍼를 실행할 때 창을 emacs에서 가로로 분할하는 방법은 무엇입니까?

내가 알고 : 일반적으로

(setq split-height-threshold nil) 
(setq split-width-threshold 0) 

작품. 내 ~/이맥스에 위의 코드가 있더라도 C-c C-c

를 사용하여 처음으로 버퍼를 실행할 때 작동하지 않습니다, 다음은 C-c C-c에 발생합니다 내 질문은 분명하다 희망 vertical split :(

, 당신이 이것에 대해 조금이라도 알고 있다면 알려주십시오.

+0

내 이맥스 프레임이 높이보다 넓은 흥미롭게도, 만들면 기본적으로 이맥스는 지금'CX하고있는 중이 야 3'하지만 난 확신 창을 나란히 ... – lukstafi

+0

을 엽니이 있어야합니다 방법은 Python-IDE로 이맥스에서 디폴트가되도록한다. – Chirag

+0

@lukstafi ... 그건 내가 관찰하는 것이 아니다. – Chirag

답변

1

다음을 사용합니다. 그것은 이맥스가 처음부터 윈도우를 분리하는 것을 방지 할뿐만 아니라 문제를 해결한다.

;;; ------------------------------------------------------------------ 
;;; display-buffer 

;; The default behaviour of `display-buffer' is to always create a new 
;; window. As I normally use a large display sporting a number of 
;; side-by-side windows, this is a bit obnoxious. 
;; 
;; The code below will make Emacs reuse existing windows, with the 
;; exception that if have a single window open in a large display, it 
;; will be split horisontally. 

(setq pop-up-windows nil) 

(defun my-display-buffer-function (buf not-this-window) 
    (if (and (not pop-up-frames) 
      (one-window-p) 
      (or not-this-window 
       (not (eq (window-buffer (selected-window)) buf))) 
      (> (frame-width) 162)) 
     (split-window-horizontally)) 
    ;; Note: Some modules sets `pop-up-windows' to t before calling 
    ;; `display-buffer' -- Why, oh, why! 
    (let ((display-buffer-function nil) 
     (pop-up-windows nil)) 
    (display-buffer buf not-this-window))) 

(setq display-buffer-function 'my-display-buffer-function) 
+0

나는 이것을 시도했다, 그것은 작동하지 않았다. 나는 그것이 내가 몇몇 dot-el 파일을 사용하도록 설정 한 다른 설정 때문에있을 것이라고 생각한다. – Chirag

+0

너비가 162보다 작습니까? 이는 위의 스 니펫에서 하드 코딩 된 값이기 때문입니다. – Dmitry

+0

창 크기에 관계없이 가로로 나뉘 지 않습니다. – Chirag

관련 문제