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

Previous Next

Package: emacs;

Reported by: Phil Sainty <psainty <at> orcon.net.nz>

Date: Sun, 1 Jun 2025 03:20:06 UTC

Severity: normal

Tags: patch

Found in version 30.1

Full log


View this message in rfc822 format

From: Daniel Mendler <mail <at> daniel-mendler.de>
To: 78658 <at> debbugs.gnu.org
Cc: psainty <at> orcon.net.nz, eliz <at> gnu.org, drew.adams <at> oracle.com, juri <at> linkov.net
Subject: bug#78658: 30.1; [PATCH] Dired feature suggestion: dired-on-marked-files-in-all-buffers
Date: Tue, 03 Jun 2025 22:09:27 +0200
Drew Adams via "Bug reports for GNU Emacs, the Swiss army knife of text
editors" <bug-gnu-emacs <at> gnu.org> writes:

>> > >     (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.
>
> That may be a good point.  In a way it's too bad that
> `completion-styles' affects `try-completion'.

Note that the `completion-styles' only affect
`completion-try-completion' and `completion-all-completions', but not
the primitive `try-completion', which always computes the common prefix.




This bug report was last modified 5 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.