質問
ようにしている検出する画面の大きさんemacsは、調整の位置とサイズの画面で(いのではないでしょうかは、フレームをemacs語なくなりつつあります。ようにしているか.emacsでいう"合理的に大きな"ウィンドウでの左上隅の近くの左上の画面になります。
かこ 大きな お願い一般の場合に、狭いたり、いろいろ少し私が最も興味を持GNU Emacs22Windowsおよび(Debian)プログラムを利用しています。.
解決
変更したい場合は、サイズに解決できるようにこの調整は適切な幅は、決議により特定のニーズ):
(defun set-frame-size-according-to-resolution ()
(interactive)
(if window-system
(progn
;; use 120 char wide window for largeish displays
;; and smaller 80 column windows for smaller displays
;; pick whatever numbers make sense for you
(if (> (x-display-pixel-width) 1280)
(add-to-list 'default-frame-alist (cons 'width 120))
(add-to-list 'default-frame-alist (cons 'width 80)))
;; for the height, subtract a couple hundred pixels
;; from the screen height (for panels, menubars and
;; whatnot), then divide by the height of a char to
;; get the height we want
(add-to-list 'default-frame-alist
(cons 'height (/ (- (x-display-pixel-height) 200)
(frame-char-height)))))))
(set-frame-size-according-to-resolution)
注そのウィンドウ-システムが推奨されていませんで新しいバージョンのemacs.適切な置換が (display-graphic-p)
.見 この答え の質問 どのように検出するemacsはターミナル-モードになっていますか? ちょっと背景のもの。
他のヒント
私には、以下の私の .emacs
:
(if (window-system)
(set-frame-height (selected-frame) 60))
ものの機能 set-frame-size
, set-frame-position
, は、 set-frame-width
.使用 C-h f
(通称 M-x describe-function
)において詳細に。
さんがあり方を計算するための最高高さ/幅をフレームの現在のウィンドウ環境です。
から: http://www.gnu.org/software/emacs/windows/old/faq4.html
(setq default-frame-alist
'((top . 200) (left . 400)
(width . 80) (height . 40)
(cursor-color . "white")
(cursor-type . box)
(foreground-color . "yellow")
(background-color . "black")
(font . "-*-Courier-normal-r-*-*-13-*-*-*-c-*-iso8859-1")))
(setq initial-frame-alist '((top . 10) (left . 30)))
最初の設定が適用されるのはすべてのemacsフレームを含む最初のポップアップときに開始されます。の設定を追加し新しい属性を追加する最初のフレーム。ここでも良いのオリジナルフレームを開始すemacsです。
最も簡単な方法がその場で発音を確認することがなX-Window環境を X資源.に関連する部分のmy.Xdefaultsようになります:
Emacs.geometry: 80x70
対応することができるでしょう接尾辞で+0+0の位置座標での左上隅に表示されます。その理由んでいoccasionnallyし、新しいフレームでも混乱れが同じ場所に前一)
に応じてマニュアル この技法の作品にはMS Windowsのもの, 保存の資源としてのキーと値のペアのレジストリ。ったものを試験します。ですが、もし多くのご迷惑に比べて簡単に編集ファイルです。
い、次のコードを追加することを .emacs
(add-to-list 'default-frame-alist '(height . 24))
(add-to-list 'default-frame-alist '(width . 80))
また、幾何学パラメータが焼成までemacs: emacs -geometry 80x60+20+30
まだウィンドウ80文字幅60列の左上隅20ピクセルのピクセルを30からの左上隅の背景になります。
Ubuntuい:
(defun toggle-fullscreen ()
(interactive)
(x-send-client-message nil 0 nil "_NET_WM_STATE" 32
'(2 "_NET_WM_STATE_MAXIMIZED_VERT" 0))
(x-send-client-message nil 0 nil "_NET_WM_STATE" 32
'(2 "_NET_WM_STATE_MAXIMIZED_HORZ" 0))
)
(toggle-fullscreen)
Windowsでは、こemacsフレームを最大化をこの関数:
(defun w32-maximize-frame ()
"Maximize the current frame"
(interactive)
(w32-send-sys-command 61488))
(setq initial-frame-alist
(append '((width . 263) (height . 112) (top . -5) (left . 5) (font . "4.System VIO"))
initial-frame-alist))
(setq default-frame-alist
(append '((width . 263) (height . 112) (top . -5) (left . 5) (font . "4.System VIO"))
default-frame-alist))
(defun set-frame-size-according-to-resolution ()
(interactive)
(if window-system
(progn
;; use 120 char wide window for largeish displays
;; and smaller 80 column windows for smaller displays
;; pick whatever numbers make sense for you
(if (> (x-display-pixel-width) 1280)
(add-to-list 'default-frame-alist (cons 'width 120))
(add-to-list 'default-frame-alist (cons 'width 80)))
;; for the height, subtract a couple hundred pixels
;; from the screen height (for panels, menubars and
;; whatnot), then divide by the height of a char to
;; get the height we want
(add-to-list 'default-frame-alist
(cons 'height (/ (- (x-display-pixel-height) 200)
(frame-char-height)))))))
(set-frame-size-according-to-resolution)
うチャレンジャーのブライアンザの設定です。しかし、 '高さ 正常に動作しない私のGNU Emacs24.1.1.