Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmake-build-never-split set to nil results in nil buffer window in cmake-build--compile #10

Closed
laurynas-biveinis opened this issue Jan 31, 2020 · 1 comment

Comments

@laurynas-biveinis
Copy link
Contributor

My frame geometry is two vertical windows. I set cmake-build-never-split to nil thinking that it will give me M-x compile behaviour. But what happens instead in cmake-build--compile is that split does not happen but the defun assumes the existence of the compilation window, which was never created. Then (let ((w (get-buffer-window buffer-name t)) results in w set to nil, which is invalid arg value for with-selected-window, throwing a Lisp error somewhere in it.

For me the easiest workaround to get fully-M-x-compile-like behaviour and never split windows appears to run (run-compile) without any window/buffer manipulation at all. Obviously this would need hiding behind some customisation:

      ;; compile saves buffers; rely on this now
      (let* ((compilation-buffer-name-function #'cmake-build--build-buffer-name))
        (cl-flet ((run-compile () (compile (concat "time " command) t)))
          (run-compile))
laurynas-biveinis added a commit to laurynas-biveinis/cmake-build.el that referenced this issue Jan 31, 2020
rpav added a commit that referenced this issue Jan 31, 2020
@rpav
Copy link
Owner

rpav commented Jan 31, 2020

I assume you mean set cmake-build-never-split to non-nil? Should be fixed now though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants