Ingo Schwarze wrote (2023-09-04 16:27 IST):
> Hi,
> 
> Stuart Henderson wrote on Mon, Sep 04, 2023 at 11:07:52AM +0100:
> > On 2023/09/04 11:05, Stefan Hagen wrote:
> 
> >> $ man 1 autoconf
> >>  There is more than one version of this manpage available (show with -w).
> 
> > oh that's a decent alternative.
> 
> Indeed, in particular in combination with the other idea of only giving
> the heads-up for clashes *with the same section number*.
> 
> That reduces the waste of screen real estate to a single line,
> even that is only printed when it really matters, and there are
> only a handful of cases in the base system:
> 
>   genuine clashes in base:
>   ld(1)        - ld.1 and ld.bfd.1
>   perldelta(1) - perldelta.1 and perl5361delta.1
> 
>   documentation bugs in base, same function documented twice:
>   CRYPTO_EX_dup(3), pem_password_cb(3), tls_reset(3)
> 
> See below for an improved patch, resulting in:
> 
>    $ man FvwmPager
>   Multiple versions of FvwmPager(1) are available; list them with -w.
> 
>   FvwmPager(1)           General Commands Manual          FvwmPager(1)
> 
>   NAME
>        FvwmPager - the FVWM Pager module
>   [...]
> 
>    $ man autoconf
>   AUTOCONF(4)         Device Drivers Manual (amd64)        AUTOCONF(4)
> 
>   NAME
>      autoconf - diagnostics from the autoconfiguration code
>   [...]
> 
>    $ man 1 autoconf
>   Multiple versions of autoconf(1) are available; list them with -w.
> 
>   AUTOCONF(1)                      FSF                     AUTOCONF(1)
> 
>   NAME
>        autoconf - Generate configuration scripts
>   [...]
> 
>    $ man CRYPTO_EX_dup
>   Multiple versions of CRYPTO_EX_dup(3) are available; list them with -w.
> 
>   CRYPTO_SET_EX_DATA(3) Library Functions Manual CRYPTO_SET_EX_DATA(3)
> 
>   NAME
>      CRYPTO_EX_new, CRYPTO_EX_free, CRYPTO_EX_dup, CRYPTO_get_ex_new_index,
>      CRYPTO_set_ex_data, CRYPTO_get_ex_data, CRYPTO_free_ex_data,
>      CRYPTO_new_ex_data - functions supporting application-specific data
>   [...]
> 
> Lightly tested so far.

Works as intended here. I'd be happy with this. I'm already finding new 
manpages.

> >> Then you could stop after the second match in the same section.
> 
> Actually, i think that's not even worth bothering.

On a relatively fast laptop it's not noticeable.

Without your patch:

Benchmark 1: man -c FvwmButtons
  Time (mean ± σ):       8.9 ms ±   0.5 ms    [User: 4.3 ms, System: 3.6 ms]
  Range (min … max):     7.6 ms …  11.5 ms    800 runs

With your patch:

Benchmark 1: man -c FvwmButtons
  Time (mean ± σ):       9.8 ms ±   0.6 ms    [User: 5.2 ms, System: 3.8 ms]
  Range (min … max):     8.4 ms …  14.8 ms    800 runs

Do you want to loop tech@ in on this? Or collect more feedback?

I'm keeping this in my tree for now and will let you know if something
unexpected happens.

Best regards,
Stefan


Reply via email to