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: Thu, 15 Dec 2022 12:07:57 +0100 Message-ID: <871qp0ncvm.fsf@gmail.com> References: <8735budxiz.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> <1d03758e-369a-c522-a91a-696243f1074f@yandex.ru> <87cz8ln5lt.fsf@gmail.com> <86o7s5i1ec.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="31644"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , 58447@debbugs.gnu.org, Dmitry Gutov To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Dec 15 12:09:17 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 1p5m73-00080S-Lg for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 15 Dec 2022 12:09:17 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p5m6q-0004Iu-0y; Thu, 15 Dec 2022 06:09: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 1p5m6o-0004IM-PU for bug-gnu-emacs@gnu.org; Thu, 15 Dec 2022 06:09:02 -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 1p5m6o-0006Cp-HN for bug-gnu-emacs@gnu.org; Thu, 15 Dec 2022 06:09:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p5m6o-0001vO-34 for bug-gnu-emacs@gnu.org; Thu, 15 Dec 2022 06:09: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: Thu, 15 Dec 2022 11:09: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.16711024877381 (code B ref 58447); Thu, 15 Dec 2022 11:09:02 +0000 Original-Received: (at 58447) by debbugs.gnu.org; 15 Dec 2022 11:08:07 +0000 Original-Received: from localhost ([127.0.0.1]:42820 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5m5v-0001uz-EA for submit@debbugs.gnu.org; Thu, 15 Dec 2022 06:08:07 -0500 Original-Received: from mail-ej1-f42.google.com ([209.85.218.42]:43520) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5m5t-0001uV-Lb for 58447@debbugs.gnu.org; Thu, 15 Dec 2022 06:08:06 -0500 Original-Received: by mail-ej1-f42.google.com with SMTP id kw15so51385284ejc.10 for <58447@debbugs.gnu.org>; Thu, 15 Dec 2022 03:08:05 -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=dwe+1TonoBdG38EBlsgpPIjQOlEGV7FeztNmFF9614g=; b=TPcJ0Eo8BLksdvOVs1eRIekhefPn/f+v+qqnSiWINK6QoxbTF+bem9WR2mlx6vZrzj OWV1e7AwMi53xHAeWoCHLIXBkXkwSqnyyjsQ9L7NWciCsY50y8AE94btXpp0p1C7J4AY mVLgserAwkh0uE9yn66oJh/zXjtdDZEJnSIR1uDKqt031DL2DPgVOnJhl2hQAxZQMHc5 hpeX4PoCjxUAF2JpKPCHW+TyKkkP/hK8VRvCf2OA5nLrD61AFoQU7cwdaaO5N67EjP3G AYCGj27CaxVfgb6aaaWcEasg0LO0cYR/qTGorFjhvCT10DXUYiZsbOwj4ebtW/Rzgrep yztQ== 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=dwe+1TonoBdG38EBlsgpPIjQOlEGV7FeztNmFF9614g=; b=xz4TLOw0s0lL77zOK/hgfyM5ZGifR0zJWlnts0LhhaYzUSDM6cAOfkKf3rl44/vlTj TOmMdW1t0htsnyKxc+bkuqWwKPDB02Dp/kQnPSVrpJ91h8N9SXr2dVd83if8YnOvMpgT VC4aYHRECcLPkW4D0aGOO2Pdtnt7pN69BsLPIc/5hxvDcd8qBGB69BbtmuvAnAtGGfvT l3urA0OoOeOi8Wo3sycK5bn2LGuM9TXsj/eGNny9i7TfEDmjM1AYwrU4rVsNECfML0wz RTYW9NZldDWeCaNZMHj74DCXcOf7bo0fM3LYHeSUIZXNOAvXrHEsf4va1pB4sXhY2oTY 3dVg== X-Gm-Message-State: ANoB5pltdeJGcNnVuS6PWOPEnufLyKl7a0thyBuXi+0k3J2Gbf8LkSNR Tu447Q7Ku+SmOq+eG3XM2AFxopeqv6A5oA== X-Google-Smtp-Source: AA0mqf7VIAY9pldCu8wqD1T7QkXPWrY37QiiGfJQIPVWO7FQPCOWOu26woGIZas33tA1tJcG+SHX4g== X-Received: by 2002:a17:906:4a56:b0:7c1:4a3:10b6 with SMTP id a22-20020a1709064a5600b007c104a310b6mr22608260ejv.53.1671102479552; Thu, 15 Dec 2022 03:07:59 -0800 (PST) Original-Received: from ars3 ([2a02:8109:8ac0:56d0::ea0f]) by smtp.gmail.com with ESMTPSA id qu27-20020a170907111b00b007c0d41736c0sm6959215ejb.39.2022.12.15.03.07.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Dec 2022 03:07:58 -0800 (PST) In-Reply-To: <86o7s5i1ec.fsf@mail.linkov.net> (Juri Linkov's message of "Thu, 15 Dec 2022 09:24:51 +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:251072 Archived-At: On Thu, 15 Dec 2022 at 09:24, Juri Linkov wrote: >> The patches could be combined, but v1 seems to be too invasive for >> emacs-29, yet v2 could be just small enough to be considered "bugfix-only". >> >> So, what does everyone think about the latter? >> >> If people agree that the v2 patch is an improvement, we can check it in and >> leave project-local histories until later. > > Does the second patch allow such workflows as re-visiting > the same relative filenames in another directory? I don't think this should be the default behavior at all. To me it seems much more likely that a user _does not_ want to see files from other projects when doing `C-x p f M-p'. Your workflow seems more of a job the "find related file" feature that has been discussed recently in the list. > IMHO, the safest fix for emacs-29 would be to add relative filenames > to the separate history. If someone might want to use > 'file-name-history', then a new variable could be added like > 'query-replace-from-history-variable'. Then this variable > could be customized to 'file-name-history', or nil. Then let's do the opposite. We define 'project-file-history-variable' and let it be nil by default. In this case, we get the behavior of Dmitry's patch v2. If it's not nil, then we assume it's to be used as-is, with no filtering or removal of project root prefix. The user can set it whatever way they please and take care it makes sense.