From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#64656: 29.0.91; Doc of minibuffer histories and completing-read - automatic addition of completions to DEFAULT list Date: Fri, 10 Nov 2023 09:45:02 +0200 Organization: LINKOV.NET Message-ID: <86v8aakq69.fsf@mail.linkov.net> References: <83y1jga0nr.fsf@gnu.org> <83o7kb9a40.fsf@gnu.org> <86bkg84de3.fsf@mail.linkov.net> <86jzrhlrub.fsf_-_@mail.linkov.net> <867cmw83zb.fsf@mail.linkov.net> <867cmvcpco.fsf@mail.linkov.net> <86a5rmanrn.fsf@mail.linkov.net> <83edgyzxcx.fsf@gnu.org> <86jzqqj1u2.fsf@mail.linkov.net> <838r76zpsw.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14104"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) Cc: 64656@debbugs.gnu.org, drew.adams@oracle.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Nov 10 08:52:36 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1r1MJf-0003Xf-U4 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 10 Nov 2023 08:52:35 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r1MJY-0000jI-9U; Fri, 10 Nov 2023 02:52:28 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r1MJU-0000in-SC for bug-gnu-emacs@gnu.org; Fri, 10 Nov 2023 02:52:25 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r1MJT-0002Ny-Cj for bug-gnu-emacs@gnu.org; Fri, 10 Nov 2023 02:52:24 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r1MK6-0000Lu-UC for bug-gnu-emacs@gnu.org; Fri, 10 Nov 2023 02:53:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 10 Nov 2023 07:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64656 X-GNU-PR-Package: emacs Original-Received: via spool by 64656-submit@debbugs.gnu.org id=B64656.16996027251258 (code B ref 64656); Fri, 10 Nov 2023 07:53:02 +0000 Original-Received: (at 64656) by debbugs.gnu.org; 10 Nov 2023 07:52:05 +0000 Original-Received: from localhost ([127.0.0.1]:49456 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r1MJ4-0000JT-RA for submit@debbugs.gnu.org; Fri, 10 Nov 2023 02:52:04 -0500 Original-Received: from relay8-d.mail.gandi.net ([2001:4b98:dc4:8::228]:54149) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r1MJ1-0000Ip-Fw for 64656@debbugs.gnu.org; Fri, 10 Nov 2023 02:51:55 -0500 Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id 073E81BF20E; Fri, 10 Nov 2023 07:51:08 +0000 (UTC) In-Reply-To: <838r76zpsw.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 09 Nov 2023 21:31:43 +0200") X-GND-Sasl: juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:274095 Archived-At: >> A recipe is to customize `completions-sort' to nil ("No sorting"), >> then first call `M-& ls -U RET' and afterwards `C-x C-f TAB TAB' >> and compare the contents of two buffers *Async Shell Command* >> and *Completions*. The order of files is reversed. > > OK, I see it now, thanks. > > But IMO this raises several issues: > > . completions-sort affects all completions, not just completions of > file names, right? So why the change only for file names? I'm trying various completions after customizing completions-sort to nil, so currently noticed a problem in the completions of file names. > . who said that the order we get file names from readdir is the > "unsorted order", and not its reverse? 'readdir' returns the order of the file system, and 'file_name_completion' reverses it. > . in any case, I think we should reverse only when completions-sort > is nil, because otherwise we could adversely affect the sorting > performed on the results This means bringing 'Qcompletions_sort' to 'file_name_completion'? Probably not worth the trouble. Better to declare the value nil of `completions-sort' as unsupported. Anyway this was just an experiment to see how useful is the no sorting option for completions. And the conclusion is that it's useful only for part of completion types, and not useful for others. It's useless for obarray and file names.