Skip to content

Instantly share code, notes, and snippets.

@Khady Khady/Makefile
Last active Oct 23, 2017

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
ls -1 /bin
(defun create-my-buffers ()
(setq total-window-size (window-width (frame-selected-window)))
(setq total-window-height (window-height (frame-selected-window)))
(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)

This comment has been minimized.

Copy link
Owner Author

commented Oct 23, 2017

Final result

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

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.