From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#66993: [PATCH] project.el: avoid asking user about project-list-file lock Date: Mon, 20 Nov 2023 04:05:58 +0200 Message-ID: <7d493257-04ab-8325-03af-d9c65236da7a@gutov.dev> References: <83sf5g1lko.fsf@gnu.org> <9d460f36-6035-da54-3abc-12171ac8977f@gutov.dev> <83h6lw19zw.fsf@gnu.org> <894f674f-76ea-90af-3acc-73ca6e7caf35@gutov.dev> <834jhv1lfw.fsf@gnu.org> <83ttpvyxn0.fsf@gnu.org> <42fe7d0e-024c-3e0d-3bc5-b0e6ec50f260@gutov.dev> <83r0kzyo93.fsf@gnu.org> <4b4a190a-ec88-6f50-1f94-900b3afdfc41@gutov.dev> <87sf53m59w.fsf@catern.com> <83a5rbm3j9.fsf@gnu.org> <3bad2052-286b-8532-b9ae-72e8278d5ff3@gutov.dev> <83jzqdkbrp.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40508"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Cc: sbaugh@catern.com, 66993@debbugs.gnu.org, sbaugh@janestreet.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Nov 20 03:07:25 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 1r4th6-000AN2-3P for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 20 Nov 2023 03:07:25 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r4tgk-0001eO-5T; Sun, 19 Nov 2023 21:07:02 -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 1r4tgi-0001eB-PN for bug-gnu-emacs@gnu.org; Sun, 19 Nov 2023 21:07:00 -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 1r4tgi-00054G-Gl for bug-gnu-emacs@gnu.org; Sun, 19 Nov 2023 21:07:00 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r4tgj-0006Qq-Od for bug-gnu-emacs@gnu.org; Sun, 19 Nov 2023 21:07:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 20 Nov 2023 02:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66993 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 66993-submit@debbugs.gnu.org id=B66993.170044597424653 (code B ref 66993); Mon, 20 Nov 2023 02:07:01 +0000 Original-Received: (at 66993) by debbugs.gnu.org; 20 Nov 2023 02:06:14 +0000 Original-Received: from localhost ([127.0.0.1]:52304 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r4tfx-0006PY-VT for submit@debbugs.gnu.org; Sun, 19 Nov 2023 21:06:14 -0500 Original-Received: from wout5-smtp.messagingengine.com ([64.147.123.21]:58109) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r4tfu-0006PB-F0 for 66993@debbugs.gnu.org; Sun, 19 Nov 2023 21:06:13 -0500 Original-Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id C412C320077A; Sun, 19 Nov 2023 21:06:01 -0500 (EST) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Sun, 19 Nov 2023 21:06:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm2; t= 1700445961; x=1700532361; bh=fVZbEw4xFUvIWgifXd9ITB5v/Y8WJ8+Or2x CpuF4xmo=; b=XAwB1wnb0QziC+wUIB+XDhi29S+1YQAOvjsIksa4tv/D5ld83oc IOy9A37uM/xGMxy2bTt3xuEvJioqLxaa4SuiL1g8rg4NSHhqJTnH8m48dRbYw8wA uytKNXBpDViDsLS09wXh5Lm4mu7k7fVMLsXu9ysvDv9wbTDes30/5BNtrPlcumyo Zk/pEbEIFfD17Sp44+xI3nwrA4pPkceVrbuVCsux5FkwV7dnbNRDZO8SqsuZthuc i9gfUMZJioW/G8IY4LeTUhWdugSFL09aWVHWxpKQK6ZNtCY2Q6qvojW5dFV4waDy Iow2IaXNck9vBkv8Kb8EHZ7YAVdNEXbt0Aw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1700445961; x=1700532361; bh=fVZbEw4xFUvIWgifXd9ITB5v/Y8WJ8+Or2x CpuF4xmo=; b=0G8cwHFMNoHhbUvLEeHNRm5vU6mBt7mtt8WgLTEy1spzcsCsriS CHm1qTtfKOtLCsrlmgVRmEZ84MCkG47dnAs+6Ds9B4uF5bhPGNqgNuGeLePIGAS2 kvaFp1kOMnCYedryMV8oafFUcmRglIqM02kRU/sR/YfnvPn28ACgH4PXgNhYxugq LBHPSfbdzgkBcULKcO3c1OzQf+DoxbN9J6EeXWREnjfmwE18j7MkAK2qpDhYhb5H CHD5LDXBKVcJ/Nl0PdWYnSZQrJZmeABskHp8LLKtl9VCMKcDSkzFudnJdODc0kvw 2tw8r+2Rsdbl81boQY1SoT7ATL3KRgTTzpQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudeghedggedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhepiefgteevheevveffheeltdeukeeiieekueefgedugfefgefhudelgfefveel vdevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 19 Nov 2023 21:05:59 -0500 (EST) Content-Language: en-US In-Reply-To: <83jzqdkbrp.fsf@gnu.org> 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:274645 Archived-At: On 19/11/2023 17:23, Eli Zaretskii wrote: >> Date: Sun, 19 Nov 2023 16:31:22 +0200 >> Cc:sbaugh@janestreet.com,66993@debbugs.gnu.org >> From: Dmitry Gutov >> >> On 18/11/2023 18:26, Eli Zaretskii wrote: >>> Even if we decide to do that (and I'm not at all sure we should), how >>> would that solve the difficulty pointed out by Dmitry? Even if >>> savehist is ON by default, the user could turn it OFF, right? >> I think the working hypothesis is that they are the same feature: if >> project--list is used for saving the previous inputs, it can be covered >> by savehist-mode. > Then maybe I'm missing something: savehist is AFAIU a feature that > saves minibuffer history, not just_any_ history. Perhaps it would be accurate to say that it saves minibuffer histories by default, but it can also save other history variables when 'savehist-additional-variables' is customized. > Are we talking > about minibuffer history here? I didn't think so. Let me try to list the similarities and differences. Similar: - The contents of project--list come from interactions with the user. They're always a result of the user invoking a command. Sometimes the user will input the project's directory manually in the minibuffer, though in many/most cases that addition will be determined automatically by our code (and yet would still be added to the "project history" in project--list, because that looks like the most helpful approach for this list). - The contents of project--list are, like file-name-history, used during completion when the user is asked to choose the project (when it couldn't be or wouldn't be selected automatically). Different: - When writing project--list to disk, we eliminate duplicate entries, both consecutive and distant ones. Again, seems more useful here. - When file-name-history is used, something else is used as the completion table. Whereas project--list *is* the completion table. Whether it should be (in certain order) also used in the input history, is perhaps a potential future improvement. So I don't know if project--list is a "minibuffer history", but depending on the POV one might decide it's close enough.