0

I've bind a shell-command (via async-shell-command) which I'm executing frequently.

  • I really like popper.el putting the result buffer (from async-shell-command) in nice position.
  • However, (only this specific command) I don't like popper.el moving my cursor to "popped" result buffer.
  • Reason is that I'm frequently running this command, and moving cursor is taking me out of my brain-processing flow.

Question: How to modifty my config such that my cursor won't jump to new popped (popper) buffer?

;;;;;;; config ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(setq package-archives
      '(("elpa"    . "https://elpa.gnu.org/packages/"  )
        )))
(package-initialize)

(use-package popper
  :ensure t ; or :straight t
  :bind (("C-`"   . popper-toggle)
         ("M-`"   . popper-cycle)
         ("C-M-`" . popper-toggle-type))
  :init
  (setq popper-reference-buffers
        '("\\*Messages\\*"
          "Output\\*$"
          "\\*Async Shell Command\\*"
          help-mode
          compilation-mode))
  (popper-mode +1)
  (popper-echo-mode +1))                ; For echo area hints
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(popper-mode -1)
(async-shell-command "ls /tmp/")  ;; cursor doesn't result buffer

(popper-mode +1)
(async-shell-command "ls /tmp/") ;; cursor jumps to result buffer


enter image description here

1 Answer 1

0

I suggest use shackle https://depp.brause.cc/shackle/ to control buffer display and (setq popper-display-control nil) as https://github.com/karthink/popper?tab=readme-ov-file#popup-placement-controlled-using-display-buffer-alist-or-shackleel.

Your Answer

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

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