next : send filename to stdout

This commit is contained in:
bth 2026-08-13 09:37:03 -07:00
commit b4b05e7994

View file

@ -88,13 +88,12 @@ func emacsNext(f string, tags string) error {
quotedargs = fmt.Sprintf(`%s "%s"`, quotedargs, tags) quotedargs = fmt.Sprintf(`%s "%s"`, quotedargs, tags)
} }
fn := fmt.Sprintf(`(um-next %s)`, quotedargs) fn := fmt.Sprintf(`(um-next %s)`, quotedargs)
out, err := exec.Command("emacsclient", "--eval", fn).CombinedOutput() // NOTE: no longer get any string back from the lisp function:
if err != nil { if err := exec.Command("emacsclient", "--eval", fn).Run(); err != nil {
return err return err
} }
// NOTE: sends to stderr : is this what we want? // NOTE: sends filename to stdout for piping
// if we decide to pipe the filename out, yes. fmt.Println(f)
log.Print(string(out))
return nil return nil
} }