0

In my config file I changed the line

(set-face-attribute 'default nil :height 100)

to

(set-face-attribute 'default nil :height 90)

and suddenly, when I try to open a file in a separate vertical buffer with C-x 4 f the buffer opens up below the current buffer. If I change the value back to 100 everything works again as expected. I cannot for the life of me bisect my config file for the bazillionth time. Just drives me insane. When I do C-x 3 it opens up the buffer correctly in a vertical frame.

Minimalistic config:

(windmove-default-keybindings 'control)

;; prevent terminals in emacs to block  standard keybindings
(eval-after-load "term"
  '(progn
     (define-key term-raw-map (kbd "C-h") 'windmove-left)
     (define-key term-raw-map (kbd "C-l") 'windmove-right)
     ))

(add-to-list 'default-frame-alist '(fullscreen . maximized))

;;Save Interprogram paste
;;https://www.reddit.com/r/emacs/comments/30g5wo/the_kill_ring_and_the_clipboard/
(setq save-interprogram-paste-before-kill t)

;; enable clipboard
(setq select-enable-clipboard t)

;; Refresh buffer from filesystem periodically
(global-auto-revert-mode t)

(setq initial-scratch-message nil)

;; turn on highlight matching brackets when cursor is on one
(setq-default show-paren-delay 0)
(show-paren-mode t)
;; Overwrite region selected
(delete-selection-mode t)
;; Show column numbers by default
(setq column-number-mode t)
;; Prevent emacs from creating a bckup file filename~
(setq make-backup-files nil)
;; Disable the horrid auto-save
(setq auto-save-default nil)
;; Settings for searching
(setq-default case-fold-search t ;case insensitive searches by default
              search-highlight t) ;hilit matches when searching
;; Highlight the line we are currently on
; (when window-system (add-hook 'prog-mode-hook 'hl-line-mode))
(blink-cursor-mode 0)
;; Remove lame startup screen
(setq inhibit-startup-message t)
;; I don't care to see the splash screen
(setq inhibit-splash-screen t)
;; Remove trailing white space upon saving
(add-hook 'before-save-hook 'delete-trailing-whitespace)
;; Auto-wrap at 80 characters
(setq-default auto-fill-function 'do-auto-fill)
(setq-default fill-column 80)
(turn-on-auto-fill)
;; Disable auto-fill-mode in programming mode
(add-hook 'prog-mode-hook (lambda () (auto-fill-mode -1)))
;; We don't want to type yes and no all the time so, do y and n
(defalias 'yes-or-no-p 'y-or-n-p)
;; Disable the toolbar at the top since it's useless
(tool-bar-mode -1)
;; Disable the menu bar
(menu-bar-mode -1)
;; scrollbar ?
(scroll-bar-mode 1)
;; Don't ring the bell
(setq ring-bell-function 'ignore)
  • your problem could be in display-buffer function from window.el. – A_P Feb 28 at 13:45
  • how can I fix it? – Carsten D Feb 28 at 15:28
  • Please specify what you mean by "vertical buffer", "vertical frame", and "as expected". This is not Emacs terminology and is not clear. – Drew Feb 28 at 16:18
  • Do you mean that you want (and expected) the buffer to be shown to the right or left of the current window (splitting the window as C-x 3 does) instead of below it (splitting the window as C-x 2 does)? The default behavior is C-x 2 style splitting, so you must be doing something else (with font height 100) to get the C-x 3 behavior. Please provide a recipe starting with emacs -Q (no init file). Starting with no init file and doing (set-face-attribute 'default nil :height 100) then C-x 4 f I see the window split with C-x 2 style: window above and below. – Drew Feb 28 at 16:19
  • 1
    This is probably related to the proportions of your window. If I recall correctly, Emacs tries to be smart and split vertically on tall windows. – DoMiNeLa10 Feb 28 at 17:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.