gunk-dev/the-valley
the-valley:bd-a2c633ebugclosed

review: q at the pager's edit warning opens the editor

State
done
Created
2026-11-09 by contributor
Changes
  • valley:the-valley/qwuwxsokovmnvsurklowtnwknxtznzuz

Body

`valley review` pages its buffer as `LESSOPEN="|<pager> < %s" less -R -- <buffer>` whenever the configured diff pager is not less itself (`page_file`, `bin/valley`). A diff pager such as delta is the common case.

On `v`, less prints `WARNING: This file was viewed via LESSOPEN (press RETURN)` for any file it read through LESSOPEN. It then runs LESSEDIT whatever key comes next. A key other than RETURN, such as `q`, is pushed back and acted on once the editor exits.

So a reviewer who presses `v`, sees the warning and presses `q` to leave lands in `$EDITOR`. Quitting the editor then quits the pager.

Reproduced with less 710 in a pseudo-terminal, with `core.pager = delta`:
- keys `v q`: the editor runs with `+10 <buffer>`, then less exits;
- `q` alone: less exits and no editor runs.

Done when `q` always quits the pager, `v` opens the editor at once with no warning, and notes written in the editor are still collected.

Comments

  1. contributor2026-11-09 18:54 UTC
    Change valley:the-valley/qwuwxsokovmnvsurklowtnwknxtznzuz landed: v2 as 171dbbb226c08279eb9280fc941bd8f97596bc86.
    
    Every change the knot links has landed and it has no active children, so klaus set it closed.