0

Summary: How can I control in which window are open the error links in a compile buffer? That is, if I have already 2 windows, I want that the error jumps to the other open window and reuses it for displaying that buffer. It kinda does this but with 2 windows or 4 depending on whether I'm on an external monitor display or the laptop screen.

Long explanation:

I'm trying to configure Emacs to maintain the following setup consistently:

  • Keep two windows (I split the frame in two vertically).
  • Every time I run compilation it opens it on the other window (the one I'm not active in).

That's it. I'm using Shackle and it sort of helps, but not completely: it works only when I'm using my laptop, but not when using the external monitor. Interestingly, the resolutions are pretty similar:

  • Laptop: 3840x2400
  • External monitor: 3840x2160

When I'm using the monitor (without extending the laptop, just the monitor), emacs does a similar behavior but instead of respecting the 2-window setup, it always "converges" to a 4-window setup (two on top, two below), no matter where I start. That is, every time I use a message error to go to the corresponding line (in a different file not already open), it will open a buffer (or reuse if there's already 4).

How can I control this? Shackle doesn't let me control things like where do these error links open, which is the main issue.

2
  • What's the value of shackle-rules? What is the major mode and name of the file that you are trying to compile?
    – NickD
    Jan 26 at 17:49
  • ("\*rustic.*" :regexp t :other t :select nil :align 'right) I'm using Rustic mode. The name of the file ends with *.rs, does that have anything to do?
    – alvatar
    Jan 26 at 23:08

1 Answer 1

0
+100

Maybe the window-purpose package found on Melpa may help...

"Purpose is a package that introduces the concept of a "purpose" for windows and buffers, and then helps you maintain a robust window layout easily."

I'm not used to it enough to give good advices.

1
  • This didn't respond my question directly, but actually helped me solve it in a different way. Having purposed windows does the trick. Thanks!
    – alvatar
    Feb 10 at 11:38

Your Answer

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

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