From d4c73c3469faf6ad1cfd5dca05cce2df1f70fa5d Mon Sep 17 00:00:00 2001 From: Steve Yegge Date: Wed, 5 Nov 2025 14:36:52 -0800 Subject: [PATCH] Fix GH #227: Force bd edit to always use direct mode - bd edit now bypasses daemon to prevent broken pipe errors - Editing in /usr/local/bin/emacsclient can take minutes, causing daemon timeout - Added check in PersistentPreRun to set noDaemon=true for edit command - Human-only interactive command doesn't benefit from daemon anyway Fixes #227 --- cmd/bd/main.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmd/bd/main.go b/cmd/bd/main.go index 0beef33df..1a40303a8 100644 --- a/cmd/bd/main.go +++ b/cmd/bd/main.go @@ -141,6 +141,12 @@ var rootCmd = &cobra.Command{ noAutoImport = true } + // Force direct mode for human-only interactive commands + // edit: can take minutes in $EDITOR, daemon connection times out (GH #227) + if cmd.Name() == "edit" { + noDaemon = true + } + // Set auto-flush based on flag (invert no-auto-flush) autoFlushEnabled = !noAutoFlush