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: Tue, 13 Dec 2022 19:28:10 +0200 Organization: LINKOV.NET Message-ID: <868rjbusog.fsf@mail.linkov.net> References: <8735budxiz.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> <86fsdpjasd.fsf@mail.linkov.net> <86k02zjiwj.fsf@mail.linkov.net> <864ju1lt5k.fsf@mail.linkov.net> <403e8284-e32c-f547-748e-371d26eedace@yandex.ru> <86cz8or02n.fsf@mail.linkov.net> <87sfhko3tf.fsf@gmail.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="26816"; 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 Tue Dec 13 18:30:32 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 1p596t-0006qL-7C for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 13 Dec 2022 18:30:31 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p596T-0002lD-0v; Tue, 13 Dec 2022 12:30: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 1p596S-0002kp-1p for bug-gnu-emacs@gnu.org; Tue, 13 Dec 2022 12:30:04 -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 1p596R-0007R7-Ov for bug-gnu-emacs@gnu.org; Tue, 13 Dec 2022 12:30:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p596R-0006gx-5N for bug-gnu-emacs@gnu.org; Tue, 13 Dec 2022 12:30: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: Tue, 13 Dec 2022 17:30:03 +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.167095256225689 (code B ref 58447); Tue, 13 Dec 2022 17:30:03 +0000 Original-Received: (at 58447) by debbugs.gnu.org; 13 Dec 2022 17:29:22 +0000 Original-Received: from localhost ([127.0.0.1]:33496 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p595m-0006gH-JK for submit@debbugs.gnu.org; Tue, 13 Dec 2022 12:29:22 -0500 Original-Received: from relay8-d.mail.gandi.net ([217.70.183.201]:50605) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p595l-0006fs-Hc for 58447@debbugs.gnu.org; Tue, 13 Dec 2022 12:29:21 -0500 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 2B1E41BF204; Tue, 13 Dec 2022 17:29:13 +0000 (UTC) In-Reply-To: <87sfhko3tf.fsf@gmail.com> (Augusto Stoffel's message of "Mon, 12 Dec 2022 19:49:16 +0100") 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:250861 Archived-At: >>> Would you say the new behavior is worse than what we had before? >> >> Unfortunately, yes. It turned out that it interferes too much >> in normal workflows of using 'C-x p f'. I suggest to keep >> the history of 'C-x p f' with relative filenames intact, >> and add absolute filenames to 'file-name-history' that already >> contains absolute filenames. > > Until now, `C-x p f' and `C-x C-f' have always shared the same history > variable, `file-name-history'. Reverting this change to go back to the > even more broken (IMO) behavior of adding relative file names to the > history of `C-x C-f' et al. I agree that the old behavior was broken, and the new fixes it, but only for `C-x C-f', at the expense of `C-x p f'. > How about computing the history of `C-x p f' dynamically by filtering > the elements of `file-name-history' which belong to the current project? > This is simpler than the other viable solution, to introduce > project-dependent histories. This makes sense. OTOH, sometimes such a need arises to revisit the same project-relative file in another directory tree with a similar file structure. For example, in the directory with the Emacs master branch visit 'C-x p f lisp/progmodes/project.el'. Then revisit the same file in the directory with the emacs-29 branch with 'C-x p f M-p'.