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#67310: [PATCH] Include the project--list as history when prompting for a project Date: Tue, 19 Dec 2023 19:35:28 +0200 Organization: LINKOV.NET Message-ID: <86zfy6rt0v.fsf@mail.linkov.net> References: <421e3ea8-d150-566e-f645-cbf1ccbcba61@gutov.dev> <81b6ed58-3fdc-3b5a-41a9-84d66475d5f1@gutov.dev> <5c3eb6a1-38da-8af4-419a-e0567b163e3a@gutov.dev> <8634wr6s1t.fsf@mail.linkov.net> <861qbujehq.fsf@mail.linkov.net> <780dbb13-c0ca-9082-936b-3c2ab34084dc@gutov.dev> <861qbtq630.fsf@mail.linkov.net> <8c67f590-d31a-44be-1c33-c0c75e4da63c@gutov.dev> <87wmthtx5p.fsf@catern.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18226"; 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: 67310@debbugs.gnu.org, Dmitry Gutov , eliz@gnu.org, Spencer Baugh To: sbaugh@catern.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Dec 19 18:53:21 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 1rFeHR-0004cD-A8 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 19 Dec 2023 18:53:21 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rFeH9-0004f8-Sx; Tue, 19 Dec 2023 12:53:03 -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 1rFeH8-0004eq-Br for bug-gnu-emacs@gnu.org; Tue, 19 Dec 2023 12:53:02 -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 1rFeH6-0004R5-1p for bug-gnu-emacs@gnu.org; Tue, 19 Dec 2023 12:53:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rFeH8-0007ol-Nq for bug-gnu-emacs@gnu.org; Tue, 19 Dec 2023 12: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: Tue, 19 Dec 2023 17:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67310 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 67310-submit@debbugs.gnu.org id=B67310.170300835329967 (code B ref 67310); Tue, 19 Dec 2023 17:53:02 +0000 Original-Received: (at 67310) by debbugs.gnu.org; 19 Dec 2023 17:52:33 +0000 Original-Received: from localhost ([127.0.0.1]:37281 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rFeGe-0007nE-Tf for submit@debbugs.gnu.org; Tue, 19 Dec 2023 12:52:33 -0500 Original-Received: from relay3-d.mail.gandi.net ([217.70.183.195]:50719) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rFeGW-0007mH-62 for 67310@debbugs.gnu.org; Tue, 19 Dec 2023 12:52:24 -0500 Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id E0C6A60002; Tue, 19 Dec 2023 17:52:13 +0000 (UTC) In-Reply-To: <87wmthtx5p.fsf@catern.com> (sbaugh@catern.com's message of "Thu, 14 Dec 2023 01:02:58 +0000 (UTC)") 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:276532 Archived-At: >>>>>>> This change broke the order of 'C-x p p M-n M-n ...', >>>>>> Could you remind me which behavior in 'M-n M-n' the aforementioned change >>>>>> relates to? Is this supposed to be like input history as well, or the >>>>>> contents of the completions table in a certain order? >>>>> It's inappropriate to overwrite the history with the recently visited projects. >>>>> Only user input should be added to history variables because it's actually >>>>> the history of user input. Therefore, the remaining way to access a list >>>>> of recently visited projects is the future history with 'M-n M-n'. >>>> >>>> But... we do overwrite it now, manually constructing the value of input >>>> history from project--list every time. >>>> >>>> So it seems like both "past history" and "future history" show the same >>>> information now. If so, it might make sense to keep only one. >>> It's usually not good to overwrite past history. So it's better >>> to keep only future history. >> >> I'm not sure the actual input history is useful here: in most cases, >> it will be empty or almost empty. project history is different from >> all others because we almost always detect it automatically. And also >> because the total set of projects is relatively small, for each user. >> >> And "future history" is different for every command, including the >> logic of how it's formed. Most users are also unaware of its >> existence, so it wouldn't be a good idea to rely only on it. > > Yes, I think it's okay for project history to be treated as minibuffer > history even though it's not actual input history. It's not a huge > deal, especially since the history didn't exist before. To me the distinction between input history and project history is clear. Especially since I added a lot of define-advice that update the most recent project by any activity on a project: such as running 'vc-dir' adds the current vc project dir to the top of the project list, using Dired does the same, etc. So I always have the most recently used project on 'C-x p p M-n'. Whereas I expect that 'C-x p p M-p' will get the last project that was manually selected by the previous completion.