Stefan Sperling wrote: > On Tue, Feb 04, 2014 at 12:37:45PM +0000, Julian Foad wrote: >> A pager for all commands when producing more than a screenful of >> output -- fine. > > For this requirement, we need to count newlines and compare the > result to the terminal window's height, so we can make a decision > to launch a pager.
See below... > I've got this working for svn_cmdline_fputs(). The only issue is > that it also needs tweaks for other functions wrting to stdout, > such as svn_stream_for_stdout(). > > Another issue is that some people (e.g. Ben) want to use pagers > for more than just paging, e.g. colorization. In that case we > always want to use the pager right away. This could be made > configurable... (use-pager=[auto|always]) > >> Good behaviour, but don't implement it in Subversion, implement it in >> the pager! > > For this requirement, we must always launch the pager upfront, > so the pager can count the lines and decide whether to quit itself. > > I don't see a way to comply with both of these requirements of > yours at the same time. Otherwise I agree with the points you've made, > thanks! I meant, it's a fine idea that the user should *see* the pager only when there's more than a screenful of output. In order to *implement* this, the pager should take care of the one-screenful decision and we should always launch it, not count the lines ourself. - Julian