1

When I open a buffer, sometimes the window is getting split and another buffer opens up at side with a warning or message inside it.

This is new behaviour. I am not been able to track consistently where this behaviour comes from because the warnigns seems to be random, given when I destroy the buffer with code, and re-open it agin, the warnings doesn't come up anymore.

enter image description here

Perhaps it's not clear, but left is the first buffer that I open and at right is the another buffer that pop ups with a warning, or compile log or error or something like that. How could I track it and prevent the warnings to open in a new splitted view/buffer/window?

1 Answer 1

2

You can suppress the warning using byte-compile-warnings value,(steal from https://emacs-china.org/t/warning-docstring-has-wrong-usage-of-unescaped-single-quotes/23182\

(setq byte-compile-warnings
  '(not docstrings))

don't know what type are the other warning.

You can change the buffer display action, like this (steal from https://emacs.stackexchange.com/a/75534/26920)

(add-to-list 'display-buffer-alist
         (cons (rx string-start "*Compile-Log*" string-end)
               (cons 'display-buffer-reuse-window
                     '((reusable-frames . visible)
                       (inhibit-switch-frames . nil)))))

or like this (steal from https://www.reddit.com/r/emacs/comments/vdnaxk/strategies_for_warnings_buffer/)

(add-to-list 'display-buffer-alist '("\\*\\(Compile-Log\\)\\*"
                                 (display-buffer-reuse-window display-buffer-reuse-mode-window display-buffer-in-previous-window display-buffer-in-side-window)
                                 (window-height . 0.25)
                                 (side . bottom)
                                 (slot . 1)))
2
  • Sean, I appreciate your answer. It's not only providing an answer but also different approaches with sources. I couldn't find them by myself, so I'm bit amazed that you managed to find a lot of possible answers. I applied your snippets in my configuration and these annoying warnings and docstrings are not popping new windows anymore. You made me happy, thanks for your effort, that will help our community too ☺️. Commented Nov 5, 2023 at 11:37
  • The other warning is of type suspicious. BTW, docstrings also suppresses docstrings-non-ascii-quotes, docstrings-wide, docstrings-control-chars - but AFAICT, there is no way to disable just the warning shown any other way. Commented Oct 9, 2024 at 4:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.