Integrated repository, worktree, git stacker, and project manager
0

Configure Feed

Select the types of activity you want to include in your feed.

pm-agent.el: ghostel dispatch always opens a fresh buffer

`(ghostel)` with no prefix arg falls into the `get-buffer-create`
branch and reuses an existing buffer of the same name; the second
launch of the same agent/project would then paste the new argv
into a buffer with a live agent already running.

Pass a non-numeric, non-nil prefix arg so ghostel routes through
`generate-new-buffer' and appends `<2>`, `<3>`, ... when the base
name is taken.

Jordan Isaacs (May 5, 2026, 7:04 PM UTC) aa8cb672 16b14265

+9 -2
+9 -2
integrations/emacs/pm-agent.el
··· 177 177 when it contains spaces or quotes), then a Return key is sent to 178 178 execute it. Bracketed paste falls back to a raw write before the 179 179 shell has set DECSET 2004; either way the shell receives the 180 - argv as a single command line." 180 + argv as a single command line. 181 + 182 + A fresh ghostel buffer is always allocated (via `generate-new-buffer' 183 + under the hood); repeated launches of the same agent/project get 184 + `<2>', `<3>', ... suffixes rather than pasting into a live session." 181 185 (unless (require 'ghostel nil t) 182 186 (user-error "ghostel not installed; pick another `pm-agent-dispatch-function'")) 183 187 (let* ((argv (plist-get plist :argv)) ··· 186 190 (project (plist-get plist :project)) 187 191 (default-directory cwd) 188 192 (ghostel-buffer-name (format "*pm-agent: %s/%s*" project agent)) 189 - (buf (ghostel))) 193 + ;; Non-numeric, non-nil prefix arg → ghostel branches to 194 + ;; `generate-new-buffer', so we never paste into an existing 195 + ;; agent session by reusing its buffer name. 196 + (buf (ghostel t))) 190 197 (with-current-buffer buf 191 198 (ghostel-paste-string (mapconcat #'shell-quote-argument argv " ")) 192 199 (ghostel-send-key "return"))))