My daily workflow uses multiple frames, and I have a frame that I want to dedicate to ERC buffers. I've used set-frame-parameter to give the frame the name *ERC*.

I want display-buffer to always display ERC buffers (identified by the regex \`#) in this frame named *ERC*.

I've tried the following:

(add-to-list 'display-buffer-alist
       (reusable-frames . "*ERC*")))

But buffers still appear all over the place. I've also tried replacing *ERC* with \\*ERC\\*. Help?

  • 2
    I have answered this topic in a related thread entitled "How to intercept a file before it opens and decide which frame" stackoverflow.com/questions/18346785/… Because I update the answer from time to time with various improvements, I will not be posting a duplicate answer in emacs.stackexchange.com It works for both non-file-visiting buffers and file-visiting buffers. The answer utilizes a couple of core functions written by Drew Adams -- i.e., get-frame-name and get-a-frame.
    – lawlist
    Feb 26, 2016 at 22:41
  • The first element should be a string, not a symbol, i.e. "\\`#".
    – Stefan
    Aug 4, 2016 at 22:37
  • It doesn't look like Stefan will be posting his comment as an answer. If you feel it provides the answer then please post the code as an answer. (You can accept your own answer.)
    – Drew
    Aug 15, 2016 at 0:53
  • I made the change that Stefan recommended, but unfortunately that didn't make the buffers appear in the named frame. After spending some time today looking at this again, I'm getting the sense that custom display action functions must be a part of the solution, if not the whole thing. If I write one up I'll post it (in the meantime i just stopped using ERC) Sep 25, 2016 at 6:47


Your Answer

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

Browse other questions tagged or ask your own question.