Skip to content

Instantly share code, notes, and snippets.

@Khady Khady/Makefile
Last active Oct 23, 2017

Embed
What would you like to do?
Reproduction for problem with compilation buffer in emacs

How to trigger the problem:

  • put mybuffer.el and Makefile in one directory (/tmp/emacs_problem for example)
  • open file mybuffer.el
  • go to end of the create-my-buffers function and execute the code (C-x C-e)
  • execute the create-my-buffers function with M-x create-my-buffers
  • execute M-x compile RET RET

How to see the expected behavior:

  • open file mybuffer.el
  • execute M-x compile RET RET
default:
ls -1 /bin
(defun create-my-buffers ()
(interactive)
(delete-other-windows)
(setq total-window-size (window-width (frame-selected-window)))
(setq total-window-height (window-height (frame-selected-window)))
(split-window-vertically)
(other-window 1)
(switch-to-buffer (get-buffer-create "*compilation*"))
(setq second-window-height (window-height (frame-selected-window)))
(setq expected-window-height (* 0.10 total-window-height))
(setq expand-window-height (- expected-window-height second-window-height))
(enlarge-window (round expand-window-height))
(other-window 1)
)
@Khady

This comment has been minimized.

Copy link
Owner Author

commented Oct 23, 2017

Final result
emacs-compilation-1

Final result if don't create the *compilation* buffer by hand:
emacs-compilation-2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.