2

alchemist.el has functions for running tests. These functions use display_buffer to show test results. Is there a way to ensure that all Alchemist test results open in a window that is the bottom-most window? In other words, if I have two windows, split vertically, one is the test file, when I run the test, it should create a 3rd window beneath the two that are split.

3

You can use the popwin.el or shackle.el emacs package or the emacs native display-buffer https://gist.github.com/tonini/0d3f9433b214044a870e

;; Display alchemist buffers always at the right side
;; Just change (side . right) with the position you would like 'bottom, 'top, 'right or 'left
;; Source: http://www.lunaryorn.com/2015/04/29/the-power-of-display-buffer-alist.html
(add-to-list 'display-buffer-alist
             `(,(rx bos (or "*alchemist test report*"
                            "*alchemist mix*"
                            "*alchemist help*"))
                    (display-buffer-reuse-window
                     display-buffer-in-side-window)
               (reusable-frames . visible)
               (side            . right)
               (window-width   . 0.5)))

If you need additional help call me on the #emacs-elixir channel on freenode irc. (Nick: tonini)

1

Here is how to do it with popwin:

(push '("*alchemist test report*" :position bottom :noselect t)
    popwin:special-display-config)
(push '("*alchemist mix*" :position bottom :noselect t)
    popwin:special-display-config)
(push '("*alchemist help*" :position bottom :noselect t)
    popwin:special-display-config)

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.