I've bind a shell-command (via async-shell-command
) which I'm executing frequently.
- I really like
popper.el
putting the result buffer (fromasync-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