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