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#58447: [PATCH] In project-find-file, add absolute file name to history Date: Fri, 09 Dec 2022 09:38:34 +0200 Organization: LINKOV.NET Message-ID: <86fsdpjasd.fsf@mail.linkov.net> References: <8735budxiz.fsf@gmail.com> <83a662dvgo.fsf@gnu.org> <871qqvj6qb.fsf@gmail.com> <42bb91a0-60ff-2e51-dcdc-c1e1f80e31ec@yandex.ru> <837d0lmmpi.fsf@gnu.org> <1cce089a-546e-7f13-0907-3d36452aef10@yandex.ru> <83v8o5l0wa.fsf@gnu.org> <5c1cc828-5fcd-667f-41d4-f19923b2958e@yandex.ru> <87k04li5nw.fsf@gmail.com> <864jvphx4r.fsf@mail.linkov.net> <86tu3mftm0.fsf@mail.linkov.net> <875yg0to11.fsf@gmail.com> <86zgdalj0h.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32480"; 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: Eli Zaretskii , 58447@debbugs.gnu.org, Dmitry Gutov To: Augusto Stoffel Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Dec 09 08:44:50 2022 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 1p3Y3u-0008JO-DK for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 09 Dec 2022 08:44:50 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p3Y3B-0002T4-Ji; Fri, 09 Dec 2022 02:44:05 -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 1p3Y39-0002R2-LM for bug-gnu-emacs@gnu.org; Fri, 09 Dec 2022 02:44:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p3Y39-0004pp-85 for bug-gnu-emacs@gnu.org; Fri, 09 Dec 2022 02:44:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p3Y39-0004Af-0u for bug-gnu-emacs@gnu.org; Fri, 09 Dec 2022 02:44:03 -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, 09 Dec 2022 07:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58447 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 58447-submit@debbugs.gnu.org id=B58447.167057182615986 (code B ref 58447); Fri, 09 Dec 2022 07:44:02 +0000 Original-Received: (at 58447) by debbugs.gnu.org; 9 Dec 2022 07:43:46 +0000 Original-Received: from localhost ([127.0.0.1]:34358 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p3Y2r-00049m-V0 for submit@debbugs.gnu.org; Fri, 09 Dec 2022 02:43:46 -0500 Original-Received: from relay6-d.mail.gandi.net ([217.70.183.198]:58237) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p3Y2q-00049U-LB for 58447@debbugs.gnu.org; Fri, 09 Dec 2022 02:43:45 -0500 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 690C5C0002; Fri, 9 Dec 2022 07:43:35 +0000 (UTC) In-Reply-To: <86zgdalj0h.fsf@mail.linkov.net> (Juri Linkov's message of "Tue, 01 Nov 2022 19:30:54 +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:250362 Archived-At: >> I'm not quite sure what Juri meant here. If from some project I do >> >> C-x p f /tmp RET RET >> >> then Emacs opens the /tmp dired buffer (RET twice because REQUIRE-MATCH >> is 'confirm), as I think it should. > > Actually, that [Confirm] part is not quite a hassle, so your patch > already handles that in both ways, thanks for this. After stumbling on this confirmation snag every time while using 'C-x p f M-p', I have to admit this is still a hassle that needs to be avoided in some way. One solution would be to write a confirmation function instead of using the symbol 'confirm' for completing-read in project--completing-read-strict. Such a function could check if the filename is absolute and not require confirmation in this case. Another solution would be to add absolute filenames to the history 'file-name-history' used by 'C-x C-f'. Then add relative filenames to another history e.g. 'project-file-name-history' that will be used only by 'C-x p f'.