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#63829: 29.0.90; project-find-file's future history breaks with common-parent-directory Date: Sat, 19 Aug 2023 05:14:06 +0300 Message-ID: <74c1bb5c-be77-feb6-0c54-9a2d600707a0@gutov.dev> References: <16b64d95-35e9-ef94-2c54-17b670111f0f@gutov.dev> <86h6rnw7gm.fsf@mail.linkov.net> <3e404df1-b3a9-f9e3-4270-f42df8b704c7@gutov.dev> <87a5uti6mo.fsf@catern.com> <73a695f3-7c6a-0e50-41dd-61f8269f6ecf@gutov.dev> <875y5fitiq.fsf@catern.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="37968"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Cc: sbaugh@catern.com, 63829@debbugs.gnu.org, monnier@iro.umontreal.ca, Juri Linkov To: Spencer Baugh Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Aug 19 04:15:21 2023 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 1qXBUm-0009gf-2u for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 19 Aug 2023 04:15:21 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qXBUV-0000yQ-IB; Fri, 18 Aug 2023 22:15:03 -0400 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 1qXBUU-0000yD-Du for bug-gnu-emacs@gnu.org; Fri, 18 Aug 2023 22:15:02 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qXBUT-0005kR-Kr for bug-gnu-emacs@gnu.org; Fri, 18 Aug 2023 22:15:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qXBUU-0002Le-Be for bug-gnu-emacs@gnu.org; Fri, 18 Aug 2023 22:15:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 19 Aug 2023 02:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63829 X-GNU-PR-Package: emacs Original-Received: via spool by 63829-submit@debbugs.gnu.org id=B63829.16924112598940 (code B ref 63829); Sat, 19 Aug 2023 02:15:02 +0000 Original-Received: (at 63829) by debbugs.gnu.org; 19 Aug 2023 02:14:19 +0000 Original-Received: from localhost ([127.0.0.1]:49111 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qXBTm-0002K8-Gs for submit@debbugs.gnu.org; Fri, 18 Aug 2023 22:14:18 -0400 Original-Received: from wout5-smtp.messagingengine.com ([64.147.123.21]:48481) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qXBTk-0002Jl-KN for 63829@debbugs.gnu.org; Fri, 18 Aug 2023 22:14:17 -0400 Original-Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id DDB153200925; Fri, 18 Aug 2023 22:14:09 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Fri, 18 Aug 2023 22:14:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm2; t= 1692411249; x=1692497649; bh=sHI8XIDceSh/+qBGXP0n+hQNyjVP78vPTR7 SflYkHCo=; b=Ywz1cgZbOfMn0WlXMbosV32SM/QXCoG5/1zDGiBB4vYI+5odYgq 8B8MqmvsJit/J4d605G4zoU2I0iVQaAjX/yhab7ixltfhWu5tdxfmHIQ4bxeC89H 7sRm++53cp9TMTALYQssGISk7w0gA4B9XbX1IX7hu6wSCOCapUwHf4phXPMljxaM xV0jf3bYLohXEPmU5nZnQb1v/nQXaEyrlqj5CUGDz55BWH0XBI0WSTkPwhgZXqkn V8rhqYYu1JikI0cIYqqx1QNR2HqC+bkzONhzB2PEc+wYQ9kYQN9Wryvk3mFXfC5I UY44Kg5z/qYkTSp9d2nlhq3uUHhyfcr4euw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1692411249; x=1692497649; bh=sHI8XIDceSh/+qBGXP0n+hQNyjVP78vPTR7 SflYkHCo=; b=Ett9dugs8WLIp1i7l+EUgUh7TGBm1qkdlc4r7eoDaURgCzjC/rw PfLccsrk8/DN7d3bUxfHsCzRDXfreYNpCtHDxsR1Icly4RCWAFlBIBBsqzKqpLO/ C03kq6hOMQh9OSj3W/N4zNBouV5tYE1LqPtUZ0Sh8TtTf7dwfsYvgbZpbzH8c0dr So2iW0c4y3rkmEfZYhqYzvUS54cBbZskuixuLk5rbsCA6nc94ZjLCwuHInzz/f65 XHEtAIttTXeyGaVgt1usLCNk/dP8onHkay0yVg6vHBefjX34je8vL7P4l7yz+PqO +jmTI7qh/OVjfjwOmYRkFM7FS2hVnKnj7ew== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedruddugedgheefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhepiefgteevheevveffheeltdeukeeiieekueefgedugfefgefhudelgfefveel vdevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 18 Aug 2023 22:14:07 -0400 (EDT) Content-Language: en-US In-Reply-To: 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:267805 Archived-At: On 18/08/2023 23:57, Spencer Baugh wrote: > > BTW, one more feature in this vein (stealing this idea from Stefan) > would be if we automatically moved point to the same location in the > other file. That might be a little too magical. But it would be very > cool... > > I guess the ideal thing we'd want is to move point to the same function, > which is a bit trickier... could be done with imenu perhaps. Not > sure... We don't know how much these files could be different. One could be empty (a newly-created one), or having totally different contents. There is a way to detect a useful offset if the files are similar enough (using 'diff -u''s output), I think we have that in diff-hl. But calling 'diff' when any file is visited seems like it will be minority preference... I think. > Maybe the right call would be to have a keybinding in C-x p p like j or > something, which would just instantly jump you to the same file in the > other project. So you'd just run C-x p p j and that would open the same > file in the other project, with point inside the same function (using > imenu), at the same offset in that function. Sure, why not. As a part of your personal (or company-wise) settings? > That could be helpful for other reasons too: I've often wanted "just put > me anywhere in this other project, I don't care where", and this could > be that command. Although I suppose mostly I want that because C-x p p > isn't currently a generic prefix for any command, and if we convert it > to be that (with next-default-directory or something), I won't need > that. Just in case you were not aware: project-switch-commands can also be set to a single symbol, then just that command will be invoked. > Alternatively, maybe C-x p j could be an alternative to C-x p p, and > when it prompts for a project, it could prompt only for "sibling > projects" which have the same file structure. And we could have a > built-in way to detect sibling projects: Any other worktree of the > current git repository is a sibling project. (And we would make this > extensible too of course; maybe have both project-siblings and > vc-list-worktrees as extension points) I'm not convinced yet by the idea of 'project-siblings' generic (need more uses/users), but the rest sounds good and very doable anyway.