From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" 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 14:51:54 -0500 Message-ID: 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> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34469"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 64656@debbugs.gnu.org, drew.adams@oracle.com, Juri Linkov To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Nov 10 20:52:40 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 1r1XYV-0008gN-Mi for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 10 Nov 2023 20:52:39 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r1XYG-0006aX-TM; Fri, 10 Nov 2023 14:52:24 -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 1r1XYE-0006OE-J1 for bug-gnu-emacs@gnu.org; Fri, 10 Nov 2023 14:52:22 -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 1r1XYD-0002Yx-OI for bug-gnu-emacs@gnu.org; Fri, 10 Nov 2023 14:52:22 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r1XYr-0005zF-JS for bug-gnu-emacs@gnu.org; Fri, 10 Nov 2023 14:53:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 10 Nov 2023 19:53:01 +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.169964596622987 (code B ref 64656); Fri, 10 Nov 2023 19:53:01 +0000 Original-Received: (at 64656) by debbugs.gnu.org; 10 Nov 2023 19:52:46 +0000 Original-Received: from localhost ([127.0.0.1]:50902 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r1XYc-0005yg-Db for submit@debbugs.gnu.org; Fri, 10 Nov 2023 14:52:46 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:16914) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r1XYX-0005yP-DX for 64656@debbugs.gnu.org; Fri, 10 Nov 2023 14:52:45 -0500 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id E6F73807A4; Fri, 10 Nov 2023 14:51:55 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1699645914; bh=VXGhctSUT3Krm9RAnCMTVjidcL2mTRy3azMa29GbsEI=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=Bpj8vuT436cS3y1lkNxYC34kimGpAqogBr84I8FdAhSEJXXIbyANRoJ6gTSQokGoE 5aOkmDi1QoEXm+y/Tjc5xfPYINoHip5vad/i49G8QRDpKlh4tygm/Kdc2oEUd/WMW2 hnd7yscSOPnd64c51dSAuKCc/AKSmzDuUjF1SuzD4bvzsauHcuikgIywkQ4ooUPDeu +t5c1DJOmbjWZaQHu+2LcOcPV2+xSlY3Gozc/AZWSpM/87zaddpxgYMnXptD6MGiaG u2ekDA308aDTrVZFpMZ8BiMMYa6xfwYs6olitAwfGWCaW4uBhlHbP3yrm+2q5QhZvs 3QhEi9FI2uO+g== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id E2B728028B; Fri, 10 Nov 2023 14:51:54 -0500 (EST) Original-Received: from pastel (unknown [45.72.227.120]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id ACEF612031F; Fri, 10 Nov 2023 14:51:54 -0500 (EST) In-Reply-To: <838r76zpsw.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 09 Nov 2023 21:31:43 +0200") 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:274116 Archived-At: > . completions-sort affects all completions, not just completions of > file names, right? So why the change only for file names? AFAICT many completion tables completely disregard the order in their output, presuming that it will be reordered later if/when needed. Clearly `file-name-all-completions` is among them, which is what the patch proposes to fix. > . who said that the order we get file names from readdir is the > "unsorted order", and not its reverse? Nobody, indeed. Under GNU/Linux with an `ext4` filesystem, the `ls -U` order is basically random (ext4's htrees use some a hash-based directory structure), so reversing it doesn't make much difference (unless you explicitly compare it with `ls -U`). But for those filesystems that use a directory structure where files are naturally sorted in a meaningful way (like alphabetical), returning the directory's order or the reverse is a lot more noticeable. > . 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 I don't see how/why. Stefan