rejeep / prodigy.el

Manage external services from within Emacs
GNU General Public License v3.0
550 stars 39 forks source link

Make it possible to keep the process buffer if it is visible. #113

Closed Fuco1 closed 6 years ago

Fuco1 commented 6 years ago

Extend the setting of prodigy-kill-process-buffer-on-stop (and related service option) with 'unless-visible option to keep the buffer alive if it is visible.

The workflow that inspired the change is something like this: have a frame with all the log buffers visible... when we open the control panel and do a restart everything stays in place and I don't have to reopen all the buffers.

However, if some process runs in background and I stop it I would not want to have hanging buffers around so they get cleaned automatically.

I'll try to add tests once we decide this is how we want to do this.

Fuco1 commented 6 years ago

@rejeep I've added tests and also improved the prodigy-service-kill-process-buffer-on-stop accessor a bit to transparently fall back to the global setting (instead of us having to or this every time at the call site).

rejeep commented 6 years ago

Nice! 👍