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#58447: [PATCH] In project-find-file, add absolute file name to history Date: Wed, 14 Dec 2022 20:45:13 +0200 Message-ID: <1d03758e-369a-c522-a91a-696243f1074f@yandex.ru> References: <8735budxiz.fsf@gmail.com> <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> <868rjbusog.fsf@mail.linkov.net> <87h6xylyox.fsf@gmail.com> 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="28677"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Cc: Eli Zaretskii , 58447@debbugs.gnu.org To: Augusto Stoffel , Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Dec 14 19:46:23 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 1p5Wlr-0007AN-7M for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 14 Dec 2022 19:46:23 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p5WlY-0004kF-MS; Wed, 14 Dec 2022 13:46:04 -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 1p5WlX-0004jx-8i for bug-gnu-emacs@gnu.org; Wed, 14 Dec 2022 13:46: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 1p5WlW-0007co-P1 for bug-gnu-emacs@gnu.org; Wed, 14 Dec 2022 13:46:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p5WlW-0006Qd-Du for bug-gnu-emacs@gnu.org; Wed, 14 Dec 2022 13:46: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, 14 Dec 2022 18:46: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.167104352524698 (code B ref 58447); Wed, 14 Dec 2022 18:46:02 +0000 Original-Received: (at 58447) by debbugs.gnu.org; 14 Dec 2022 18:45:25 +0000 Original-Received: from localhost ([127.0.0.1]:40919 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5Wku-0006QI-Ox for submit@debbugs.gnu.org; Wed, 14 Dec 2022 13:45:24 -0500 Original-Received: from mail-wm1-f44.google.com ([209.85.128.44]:53921) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5Wks-0006Q7-5a for 58447@debbugs.gnu.org; Wed, 14 Dec 2022 13:45:23 -0500 Original-Received: by mail-wm1-f44.google.com with SMTP id ja17so9148173wmb.3 for <58447@debbugs.gnu.org>; Wed, 14 Dec 2022 10:45:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=USn+wbtlF5sDMAEm9ZojkuDtYYNM6bJivF1AbgshRI0=; b=fZsfP8qIe4jJlnInScjLUkLPHyO5RqgwGT9xT08LsJ++zTdt60wAl9x0xl3qyXUISR PZuX9D5918VTs/PoxiP9/5dFkeBgFgEfbYiLi/N4ukkc8lV4azV+PArKl5Ca3ocZXY2m houED7TXIfrUCkBlsHWdefxx0AoUd3oFnqPBMBDdlZh+kL0aEHIpQOzmsIGJaxSc3URW HrdTQ58Hde22jzi/DrMbmOZlz/0HgCIUAZTl49pnlbaOZepHC4SyHGehnHYVEHPL1xRt qJSZGthzk7XULkYd/BFkjcvS+dQ8HTQkc84A8hA/zznSzfOtN8vW2FdcyMdHlKGbXPUO gaHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=USn+wbtlF5sDMAEm9ZojkuDtYYNM6bJivF1AbgshRI0=; b=Nmz2oQPYd1DCgqCEQzGmL2LUk7XZ2VRvZZx/zBmQhHknsVrF+3KT2Lhc7rD9OYY4Z9 2Sr7zOfEOB9ipk6Qi9Q3cD5uDWVIH3TF15fyzFFr6hnDQB/T+Hwz0JAL079OD1vf1CF8 xAmpOBMFIxRhexQFSuCPQSr++a+5rmcR77Cm+B/teI36JA66JVZVbb3eQoYDKqai9vNt x9iDOepAUw/mvLCFwU05mqg98Vc/mVBkO9OC0jcpqXY+1iRukxVZQp/lYqHyVTr6KRsb kw/+UA7qqg4J5hiQ9DgEP603lht9SwqiWV/t2CbzZy+AAf64pkoNUQI70B4tWS2e5cec 9mBQ== X-Gm-Message-State: ANoB5plqQYSln5jPHl2x+a0uQorz0VhKz9S8eHXAzbQ3TtpDpDzOkSM6 Lqh5TCfm+aK4rMFRXLRDYc0= X-Google-Smtp-Source: AA0mqf6J5I/1+5xHkSpfGzrOljjkUB8ZxBizI9+Ce2QIp0PFMvWnmdSgiJOPi/L+plgSlIvVl0lMig== X-Received: by 2002:a05:600c:1e03:b0:3d2:5e4e:701 with SMTP id ay3-20020a05600c1e0300b003d25e4e0701mr120935wmb.31.1671043516201; Wed, 14 Dec 2022 10:45:16 -0800 (PST) Original-Received: from [192.168.0.2] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id i6-20020a05600c290600b003cf894dbc4fsm3398684wmd.25.2022.12.14.10.45.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 14 Dec 2022 10:45:15 -0800 (PST) Content-Language: en-US In-Reply-To: <87h6xylyox.fsf@gmail.com> 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:250983 Archived-At: On 14/12/2022 18:47, Augusto Stoffel wrote: > On the other hand, your trick works by accident. If you switch between > unrelated projects, then 'C-x p f M-p' brings up a non-existing file. > One might say each project should have its own history, but then it's > not clear whether/when equally named projects in different locations > should count as "the same" project. Perhaps the first step to resolving all this is for project-find-file to use a different history variable than find-file. Which makes sense, given that one (usually) uses relative file names, and the other -- absolute ones. Maybe project--read-file-absolute could continue using the current variable, too. As a result, all projects will share history, for good and bad. Perhaps next we could do something about that, e.g. if the history iteration could allow pre-filtering, we could also filter out non-existing files.