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#49846: 28.0.50; project-find-regexp results does not open target file Date: Wed, 04 Aug 2021 23:10:10 +0300 Organization: LINKOV.NET Message-ID: <87sfzp8mgg.fsf@mail.linkov.net> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9996"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) To: 49846@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Aug 04 22:33:10 2021 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 1mBNZd-0002SY-RO for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 04 Aug 2021 22:33:09 +0200 Original-Received: from localhost ([::1]:34774 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mBNZc-0003g3-Su for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 04 Aug 2021 16:33:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51922) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mBNYZ-0001sE-Md for bug-gnu-emacs@gnu.org; Wed, 04 Aug 2021 16:32:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33706) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mBNYZ-00049p-Ec for bug-gnu-emacs@gnu.org; Wed, 04 Aug 2021 16:32:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mBNYZ-0001Ja-Bl for bug-gnu-emacs@gnu.org; Wed, 04 Aug 2021 16:32:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 04 Aug 2021 20:32:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49846 X-GNU-PR-Package: emacs Original-Received: via spool by 49846-submit@debbugs.gnu.org id=B49846.16281090764961 (code B ref 49846); Wed, 04 Aug 2021 20:32:03 +0000 Original-Received: (at 49846) by debbugs.gnu.org; 4 Aug 2021 20:31:16 +0000 Original-Received: from localhost ([127.0.0.1]:45244 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBNXo-0001Hx-7B for submit@debbugs.gnu.org; Wed, 04 Aug 2021 16:31:16 -0400 Original-Received: from relay11.mail.gandi.net ([217.70.178.231]:35423) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBNXm-0001Hi-E0 for 49846@debbugs.gnu.org; Wed, 04 Aug 2021 16:31:14 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by relay11.mail.gandi.net (Postfix) with ESMTPSA id 8DFA5100005 for <49846@debbugs.gnu.org>; Wed, 4 Aug 2021 20:31:06 +0000 (UTC) In-Reply-To: (Pankaj Jangid's message of "Tue, 03 Aug 2021 22:42:59 +0530") 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" Xref: news.gmane.io gmane.emacs.bugs:211186 Archived-At: > Steps to reproduce: > 1. emacs -Q > 2. C-x p p (project-switch-project) > 3. select project > 4. press g (Find Regexp) and search for a term then RET > 5. In the results select any file > > Result: No reference at point > > Expectation: step-5 should open the file-at-point and point should be > placed at a suitable place in the opened file. I have the same problem. When calling xref-find-references from a subdirectory, not from the project root, it creates an *xref* buffer where file names are relative to the project root (when xref-file-name-display is 'project-relative'), but the default directory is not the project root. So using file-at-point fails to find the relative file. But I don't see the same problem with project-find-regexp, it correctly changes the directory to the project root, and opens the file-at-point.