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#67310: [PATCH] Include the project--list as history when prompting for a project Date: Wed, 22 Nov 2023 03:40:28 +0200 Message-ID: <81b6ed58-3fdc-3b5a-41a9-84d66475d5f1@gutov.dev> References: <421e3ea8-d150-566e-f645-cbf1ccbcba61@gutov.dev> 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="9165"; 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: 67310@debbugs.gnu.org, eliz@gnu.org, juri@linkov.net To: Spencer Baugh Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Nov 22 02:41:29 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 1r5cF6-00028D-Uo for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 22 Nov 2023 02:41:29 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r5cEf-0002Gz-Kr; Tue, 21 Nov 2023 20:41:01 -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 1r5cEe-0002Gn-Ef for bug-gnu-emacs@gnu.org; Tue, 21 Nov 2023 20:41: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 1r5cEd-0006bu-R7 for bug-gnu-emacs@gnu.org; Tue, 21 Nov 2023 20:40:59 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r5cEg-0005z9-Jh for bug-gnu-emacs@gnu.org; Tue, 21 Nov 2023 20:41:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 22 Nov 2023 01:41: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.170061724422970 (code B ref 67310); Wed, 22 Nov 2023 01:41:02 +0000 Original-Received: (at 67310) by debbugs.gnu.org; 22 Nov 2023 01:40:44 +0000 Original-Received: from localhost ([127.0.0.1]:57753 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r5cEN-0005yO-Ml for submit@debbugs.gnu.org; Tue, 21 Nov 2023 20:40:44 -0500 Original-Received: from out1-smtp.messagingengine.com ([66.111.4.25]:36327) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r5cEL-0005yB-Sk for 67310@debbugs.gnu.org; Tue, 21 Nov 2023 20:40:42 -0500 Original-Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id B2C925C09EF; Tue, 21 Nov 2023 20:40:33 -0500 (EST) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Tue, 21 Nov 2023 20:40:33 -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= 1700617233; x=1700703633; bh=7lh3r6PTqLdw8VWKxqmdVBEQFSMOtSspoWa 9X02aeLg=; b=FUe7CnjloFDJZNQ0HhCIdfJMVtNtP+DFxJjZQr62rFTyQ59/B+C QO+zaOsNGTzqGDglTf3H5La1XFOxTKrx09y1wKcCTvibSPRyOhcsfY/NzLk+Dpcs z4YwetVLtrXGVfKxmgI7Use50S6eCNO9CMa6NdfSiV6AB3Zu0Q9R0PRLkgGJSKYn FltdGILw+LytGQZn+RWHijgbBueU8T8JE6ME1wQvyYLFKFSlMLDnR4A5OdC0ZYpr FSbP4zz0Ag9YKNZG4BLMMyiMkfUAQPpUgh3/V10wv0E6XDYuEkrr+ylwTjkMWn7t 7TdmEkRfDriGyE0/AjGeuc/1J7zJpBqcugg== 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= 1700617233; x=1700703633; bh=7lh3r6PTqLdw8VWKxqmdVBEQFSMOtSspoWa 9X02aeLg=; b=hHWSq6oyU2hJihfaV6K3CSFXgqXjF4Y6U4bTWueS7+Y2S7LG4v+ x92LyWsp9NhCeaB15xUywLyn+OpgWM5/OScRNOgrth+6eQlegC4hCbvG0tCAmgNJ BT4slpwzIyr4uek269g3mm5E3bmq1G6dCEmDDEUCNF5Tnvhe/tsS71c7TiUe1+G3 sBjAMsQLR0Jj8M/lJj1ykcBFyEYBW93cjYI+P4AvU9fNfLgFGDXH5IO2eWuLQ7Bz FJRRC8fD8c29oPElM3Ptqj3M+OblQ78ucWNKnAqoIxTadmEhsZGXWeVfXFWpCQBY PLBmoS2uSX6+30/B9zc04jLIYYLmGSDLBmA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudehtddgfeeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhepiefgteevheevveffheeltdeukeeiieekueefgedugfefgefhudelgfefveel vdevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 21 Nov 2023 20:40:32 -0500 (EST) Content-Language: en-US In-Reply-To: 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:274746 Archived-At: On 21/11/2023 17:17, Spencer Baugh wrote: > (if (equal pr-dir dir-choice) > (read-directory-name "Select directory: " default-directory nil t) > + (project--add-dir pr-dir) > pr-dir))) > ... > (if (equal pr-name dir-choice) > (read-directory-name "Select directory: " default-directory nil t) > - (let ((proj (assoc pr-name choices))) > - (if (stringp proj) proj (project-root (cdr proj))))))) > + (let* ((proj (assoc pr-name choices)) > + (root (project-root (cdr proj)))) > + (project--add-dir root) > + root)))) I think in the (equal pr-dir dir-choice) case we want to add the directory name entered by the user into the "history" anyway, don't we? Though perhaps there's no need to do it here: 'project-current' calls 'project-remember-project' anyway when maybe-prompt is non-nil. So what happens if you drop both of the above 'project--add-dir' calls?