Subject: Re: bug#78658: 30.1; [PATCH] Dired feature suggestion: dired-on-marked-files-in-all-buffers

From: Eli Zaretskii <[email-masked]>
Date: Tue, 03 Jun 2025 15:24:15 +0300

> Cc: [email-masked], Juri Linkov <[email-masked]>
> Date: Tue, 03 Jun 2025 23:37:57 +1200
> From: Phil Sainty <[email-masked]>
> 
> Hi Drew,
> 
> Thank you for:
> 
> >     (let ((common  (try-completion "" files)))
> 
> My brain had failed to make the connection between "completion"
> and programmatically obtaining a common prefix from list of
> strings.  It makes perfect sense in hindsight, but I'd simply
> never thought about completion in non-interactive terms, and was
> surprised when I hadn't found a documented function for doing
> this (but I wasn't looking under Completion at all).
> 
> Eli, I reckon this is worth either documenting somewhere under
> (info "(elisp) Strings and Characters") or else creating a
> slightly more string-centric wrapper, something like:

Feel free to suggest patches for the documentation, but please
remember that results of calling completion functions can depend on
the completion styles in effect, so if we want to advertise this as a
way of producing the largest common prefix, we should probably bind
completion-styles to something specific around this call.