From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Augusto Stoffel Newsgroups: gmane.emacs.bugs Subject: bug#58447: [PATCH] In project-find-file, add absolute file name to history Date: Mon, 28 Nov 2022 23:58:32 +0100 Message-ID: <87k03eptyf.fsf@gmail.com> 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> <336bb987-39c4-d911-8b07-7dd5cbae19c2@yandex.ru> <875yfcw7l4.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29873"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: dgutov@yandex.ru To: 58447@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Nov 28 23:59:11 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 1ozn5i-0007dT-Dj for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 28 Nov 2022 23:59:10 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ozn5c-0002IK-EZ; Mon, 28 Nov 2022 17:59: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 1ozn5b-0002Hv-8M for bug-gnu-emacs@gnu.org; Mon, 28 Nov 2022 17:59: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 1ozn5a-0002dG-ER for bug-gnu-emacs@gnu.org; Mon, 28 Nov 2022 17:59:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ozn5a-00085t-BA for bug-gnu-emacs@gnu.org; Mon, 28 Nov 2022 17:59:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Augusto Stoffel Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 28 Nov 2022 22:59: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.166967632231106 (code B ref 58447); Mon, 28 Nov 2022 22:59:02 +0000 Original-Received: (at 58447) by debbugs.gnu.org; 28 Nov 2022 22:58:42 +0000 Original-Received: from localhost ([127.0.0.1]:51468 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ozn5F-00085e-SZ for submit@debbugs.gnu.org; Mon, 28 Nov 2022 17:58:42 -0500 Original-Received: from mail-ej1-f54.google.com ([209.85.218.54]:37424) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ozn5E-00085Y-OI for 58447@debbugs.gnu.org; Mon, 28 Nov 2022 17:58:41 -0500 Original-Received: by mail-ej1-f54.google.com with SMTP id ud5so29651079ejc.4 for <58447@debbugs.gnu.org>; Mon, 28 Nov 2022 14:58:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=ScStV8FbEFVQGdlljcaXWD+urFR4xwtCLgC6bYfOKkU=; b=cqvKJqNh3faEkYmnBBQzr2c5nq6VN4HtDCjwmJju6lwpvE4WKjlVFM2GRA45AkwJS0 +SEzZJ6EKyJ5W7CFVMUNP5mxbR2oyK8ceUJtpbIUJfg8ZY5asBQrMnk+TjBtZ/aJze9k VMF9wSBx5ncvfXQdu9Fpy0I//vX2ELYmtq2Ys8EAk0u4ripr7WSBKb+gcm/nYlxe9rwv X7XnspejLwGHcd3mrI4tiox6nmD19gywM7rs3xvBVgxW8oHIwqGxAj3zRoFwf1ppfEne wZR3/yzgy1uM02qJCgYpTlOpezsT2hdIdPdE5SnjWNQtA8ll0Dm282COVVy2mCpD0Yis KXHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=ScStV8FbEFVQGdlljcaXWD+urFR4xwtCLgC6bYfOKkU=; b=1bTI5qrBFmgcqxCQvtakpqIuao1ZJt144xd126vxJMGCmPaHIF2fR4CRujpiP+78c0 yHcygTFsDleY9ZupV08e9ujSIzXi5SZ+f0JRQRa6kuH+54tj27YjvqhlOTVYpo1SNVAu gey9Se+vEYB3PYy2TL4kiXxU+jHvPFeILHMm1gRXL8BSZBnVMjIDIT1AGv/zEtWfPAWW qulUkMQNpTjceHZPOgTjWEbX8C+FXxcM+QRsGRTXvpOKxOivsIPV5KWvMrmXXk1Eb46h 62ulExLyqultPl021kPuXJt+hZlwMX2LZjmh9zenk7BJX2WhJd58c6f8mDBoykl83k0T cvvQ== X-Gm-Message-State: ANoB5pmmOqA0nZ7r6L/zjLkAnJKNdcgFmEqzlZo0Q0OP2i4P4cPu8tH2 P0wriDzD/yn2mc5NwKaZt8Q= X-Google-Smtp-Source: AA0mqf5mLpfEqV65dqupfE1sxVrFkAgR0i9KDla1zXzbgTAvCltE50Drn/8Lsnvp5vnLtUDCKHETVQ== X-Received: by 2002:a17:906:4c4f:b0:7ad:a8c3:588f with SMTP id d15-20020a1709064c4f00b007ada8c3588fmr43647974ejw.687.1669676314898; Mon, 28 Nov 2022 14:58:34 -0800 (PST) Original-Received: from ars3 ([2a02:8109:8ac0:56d0::a4bf]) by smtp.gmail.com with ESMTPSA id b18-20020a1709063cb200b0078d22b0bcf2sm5422651ejh.168.2022.11.28.14.58.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Nov 2022 14:58:33 -0800 (PST) In-Reply-To: (Dmitry Gutov's message of "Sat, 26 Nov 2022 04:28:50 +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:249351 Archived-At: --=-=-= Content-Type: text/plain On Sat, 26 Nov 2022 at 04:28, Dmitry Gutov wrote: > Sorry, I figured you had commit access. > > Now pushed, thanks. It has been brought to my attention that I should have used `abbreviate-file-name' for file name history items. Unfortunately we need to push a small fix. Hopefully this can go in Emacs 29. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-In-project-find-file-add-abbreviated-file-names-to-h.patch >From 19957ae6b2db0c40de37c7c290a7113b0b33e6b7 Mon Sep 17 00:00:00 2001 From: Augusto Stoffel Date: Mon, 28 Nov 2022 23:50:41 +0100 Subject: [PATCH] In project-find-file, add abbreviated file names to history * lisp/progmodes/project.el (project--read-file-cpd-relative): Use 'abbreviate-file-name'. --- lisp/progmodes/project.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index 5b8648031f..3d567b42a0 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -954,7 +954,7 @@ project--read-file-cpd-relative hist mb-default))) (absname (expand-file-name relname common-parent-directory))) (when (and hist history-add-new-input) - (add-to-history hist absname)) + (add-to-history hist (abbreviate-file-name absname))) absname)) (defun project--read-file-absolute (prompt -- 2.38.1 --=-=-=--