GNU bug report logs -
#49846
28.0.50; project-find-regexp results does not open target file
Previous Next
Reported by: Pankaj Jangid <pankaj <at> codeisgreat.org>
Date: Tue, 3 Aug 2021 17:14:02 UTC
Severity: normal
Found in version 28.0.50
Done: Dmitry Gutov <dgutov <at> yandex.ru>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 49846 in the body.
You can then email your comments to 49846 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#49846
; Package
emacs
.
(Tue, 03 Aug 2021 17:14:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Pankaj Jangid <pankaj <at> codeisgreat.org>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Tue, 03 Aug 2021 17:14:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
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.
In GNU Emacs 28.0.50 (build 1, x86_64-apple-darwin20.6.0, NS appkit-2022.60 Version 11.5 (Build 20G71))
of 2021-08-03 built on mb2.local
Repository revision: 09c362025338ff1597593a90f4be5eeac589a7b4
Repository branch: master
Windowing system distributor 'Apple', version 10.3.2022
System Description: macOS 11.5
Configured features:
ACL DBUS GIF GLIB GMP GNUTLS JPEG JSON LCMS2 LIBXML2 MODULES NOTIFY
KQUEUE NS PDUMPER PNG RSVG THREADS TIFF TOOLKIT_SCROLL_BARS XIM ZLIB
Important settings:
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8-unix
Major mode: Info
Minor modes in effect:
global-git-commit-mode: t
magit-auto-revert-mode: t
global-company-mode: t
company-mode: t
shell-dirtrack-mode: t
yas-global-mode: t
yas-minor-mode: t
savehist-mode: t
desktop-save-mode: t
show-paren-mode: t
tooltip-mode: t
global-eldoc-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
buffer-read-only: t
column-number-mode: t
line-number-mode: t
indent-tabs-mode: t
transient-mark-mode: t
Load-path shadows:
/Users/pankaj/.emacs.d/elpa/transient-20210723.1601/transient hides /Users/pankaj/Applications/Emacs.app/Contents/Resources/lisp/transient
Features:
(shadow flyspell emacsbug cl-print shr-color qp gnus-html sort smiley
gnus-cite flow-fill mail-extr gnus-async gnus-bcklg gnus-ml hl-line
disp-table help-fns mailalias tempo ispell git-rebase ediff ediff-merg
ediff-mult ediff-wind ediff-diff ediff-help ediff-init ediff-util
magit-bookmark bookmark ido benchmark pkg-info epl cus-edit cus-start
align cc-langs autoload radix-tree tar-mode arc-mode archive-mode
mm-archive url-http url-gw url-cache url-auth yaml-mode goto-addr
bug-reference magit-extras face-remap magit-submodule magit-obsolete
magit-blame magit-stash magit-reflog magit-bisect magit-push magit-pull
magit-fetch magit-clone magit-remote magit-commit magit-sequence
magit-notes magit-worktree magit-tag magit-merge magit-branch
magit-reset magit-files magit-refs magit-status magit magit-repos
magit-apply magit-wip magit-log which-func magit-diff smerge-mode diff
git-commit log-edit pcvs-util add-log magit-core magit-autorevert
magit-margin magit-transient magit-process with-editor magit-mode
transient magit-git magit-section magit-utils dash misearch
multi-isearch php-mode mode-local php-face php php-project cursor-sensor
nndraft nnmh utf-7 nnml nnfolder epa-file gnutls network-stream nsm
gnus-agent gnus-srvr gnus-score score-mode nnvirtual nntp gnus-cache
.gnus find-dired grep diary-lib diary-loaddefs dired-aux markdown-mode
color ol-eww eww xdg url-queue mm-url ol-rmail ol-mhe ol-irc ol-info
ol-gnus nnselect gnus-search ol-docview doc-view image-mode exif
ol-bibtex bibtex ol-bbdb ol-w3m autorevert hideshow vc-mtn vc-hg vc-bzr
vc-src vc-sccs vc-svn vc-cvs vc-rcs vc eglot array filenotify jsonrpc
ert pp ewoc debug backtrace imenu haskell-mode haskell-cabal
haskell-utils haskell-font-lock haskell-indentation haskell-string
haskell-sort-imports haskell-lexeme rx haskell-align-imports
haskell-complete-module haskell-ghc-support dabbrev haskell-customize
sh-script smie executable checkdoc lisp-mnt vc-git diff-mode
vc-dispatcher flymake-proc flymake compile warnings thingatpt elec-pair
jka-compr company-oddmuse company-keywords company-etags etags fileloop
xref project company-gtags company-dabbrev-code company-dabbrev
company-files company-clang company-capf company-cmake company-semantic
company-template company-bbdb company init my-init enet org-element
avl-tree generator org org-macro org-footnote org-pcomplete org-list
org-faces org-entities noutline outline easy-mmode org-version
ob-plantuml ob-sql ob-css ob-js ob-java ob-C cc-mode cc-fonts cc-guess
cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs ob-python
python tramp-sh tramp tramp-loaddefs trampver tramp-integration files-x
tramp-compat shell pcomplete ls-lisp ob-R ob ob-tangle org-src ob-ref
ob-lob ob-table ob-exp ob-comint comint ansi-color ring ob-emacs-lisp
ob-core ob-eval org-table ol org-keys org-compat advice org-macs
org-loaddefs format-spec server edmacro kmacro modus-operandi-theme
modus-themes exec-path-from-shell yasnippet-snippets yasnippet delight
ebdb-message sendmail ebdb-gnus gnus-msg gnus-art mm-uu mml2015 mm-view
mml-smime smime dig gnus-sum shr kinsoku svg dom gnus-group gnus-undo
gnus-start gnus-dbus dbus xml gnus-cloud nnimap nnmail mail-source utf7
netrc nnoo parse-time iso8601 gnus-spec gnus-int gnus-range message rmc
puny dired dired-loaddefs rfc822 mml mml-sec epa derived epg epg-config
mm-decode mm-bodies mm-encode mail-parse rfc2231 gmm-utils mailheader
gnus-win gnus nnheader gnus-util rmail rmail-loaddefs rfc2047 rfc2045
ietf-drums text-property-search time-date mail-utils mm-util mail-prsvr
wid-edit ebdb-mua ebdb-com crm ebdb-format ebdb mailabbrev eieio-opt
cl-extra help-mode speedbar ezimage dframe find-func eieio-base pcase
cal-menu calendar cal-loaddefs timezone savehist desktop frameset avoid
paren cus-load finder-inf tex-site info package browse-url url url-proxy
url-privacy url-expand url-methods url-history url-cookie url-domsuf
url-util mailcap url-handlers url-parse auth-source cl-seq eieio
eieio-core cl-macs eieio-loaddefs password-cache json subr-x map
url-vars seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib
early-init iso-transl tooltip eldoc electric uniquify ediff-hook
vc-hooks lisp-float-type mwheel term/ns-win ns-win ucs-normalize
mule-util term/common-win tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu
timer select scroll-bar mouse jit-lock font-lock syntax font-core
term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese composite charscript charprop case-table epa-hook
jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button
loaddefs faces cus-face macroexp files window text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote threads dbusbind kqueue cocoa ns
lcms2 multi-tty make-network-process emacs)
Memory information:
((conses 16 1980381 183384)
(symbols 48 53328 10)
(strings 32 332742 35011)
(string-bytes 1 11081919)
(vectors 16 118198)
(vector-slots 8 2274105 156789)
(floats 8 567 530)
(intervals 56 170560 6549)
(buffers 992 63))
--
Regards ~Pankaj
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#49846
; Package
emacs
.
(Wed, 04 Aug 2021 20:32:03 GMT)
Full text and
rfc822 format available.
Message #8 received at 49846 <at> debbugs.gnu.org (full text, mbox):
> 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.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#49846
; Package
emacs
.
(Thu, 05 Aug 2021 03:07:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 49846 <at> debbugs.gnu.org (full text, mbox):
On 03.08.2021 20:12, Pankaj Jangid wrote:
>
> 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.
To be clear: you position the point on a group name, press RET and see
this message? That is expected.
If we do end up changing this behavior, what would the "suitable place"
be? The first match in the group?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#49846
; Package
emacs
.
(Thu, 05 Aug 2021 03:12:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 49846 <at> debbugs.gnu.org (full text, mbox):
On 04.08.2021 23:10, Juri Linkov wrote:
> 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.
That sounds different. Could you file a separate report with exact
reproduction steps? Try to make sure you're using the latest master
first (I fixed bug ~like that a couple of months ago).
FWIW, I'm cannot reproduce.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#49846
; Package
emacs
.
(Thu, 05 Aug 2021 03:59:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 49846 <at> debbugs.gnu.org (full text, mbox):
Dmitry Gutov <dgutov <at> yandex.ru> writes:
> On 03.08.2021 20:12, Pankaj Jangid wrote:
>> 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.
>
> To be clear: you position the point on a group name, press RET and see
> this message? That is expected.
>
Okay. I didn’t know this. Has this change in recently? I remember
hitting on the group and opening the target file. But true, with
multiple results in the group that would be confusing.
> If we do end up changing this behavior, what would the "suitable
> place" be? The first match in the group?
There are two options here:
1. We just change the message. Something like: "select a match to open".
2. In addition to above, we may have a customization variable. Something
like - xref-open-first-match
For this bug, (1) should be sufficient.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#49846
; Package
emacs
.
(Thu, 05 Aug 2021 13:14:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 49846 <at> debbugs.gnu.org (full text, mbox):
On 05.08.2021 06:58, Pankaj Jangid wrote:
>> To be clear: you position the point on a group name, press RET and see
>> this message? That is expected.
>>
>
> Okay. I didn’t know this. Has this change in recently? I remember
> hitting on the group and opening the target file. But true, with
> multiple results in the group that would be confusing.
I don't think this ever was different.
>> If we do end up changing this behavior, what would the "suitable
>> place" be? The first match in the group?
>
> There are two options here:
>
> 1. We just change the message. Something like: "select a match to open".
>
> 2. In addition to above, we may have a customization variable. Something
> like - xref-open-first-match
>
> For this bug, (1) should be sufficient.
2. probably won't require a user option, there's no real danger in such
change.
But which of the (1, 2) do you want to happen?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#49846
; Package
emacs
.
(Thu, 05 Aug 2021 14:03:01 GMT)
Full text and
rfc822 format available.
Message #23 received at 49846 <at> debbugs.gnu.org (full text, mbox):
Dmitry Gutov <dgutov <at> yandex.ru> writes:
>> There are two options here:
>> 1. We just change the message. Something like: "select a match to
>> open".
>> 2. In addition to above, we may have a customization
>> variable. Something
>> like - xref-open-first-match
>> For this bug, (1) should be sufficient.
>
> 2. probably won't require a user option, there's no real danger in
> such change.
>
> But which of the (1, 2) do you want to happen?
This is tricky. I want (2). But suppose there is such a variable. Then,
If the value is ‘t’ then open the first link. But if it is ‘nil’ then
again there should be a message of sort “select a match to open”.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#49846
; Package
emacs
.
(Thu, 05 Aug 2021 14:04:02 GMT)
Full text and
rfc822 format available.
Message #26 received at 49846 <at> debbugs.gnu.org (full text, mbox):
On 05.08.2021 17:02, Pankaj Jangid wrote:
> But suppose there is such a variable
Suppose there isn't?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#49846
; Package
emacs
.
(Thu, 05 Aug 2021 14:29:02 GMT)
Full text and
rfc822 format available.
Message #29 received at 49846 <at> debbugs.gnu.org (full text, mbox):
Dmitry Gutov <dgutov <at> yandex.ru> writes:
>> But suppose there is such a variable
>
> Suppose there isn't?
Then I just want an appropriate message i.e. option-1 from my previous
post.
Reply sent
to
Dmitry Gutov <dgutov <at> yandex.ru>
:
You have taken responsibility.
(Thu, 05 Aug 2021 23:52:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Pankaj Jangid <pankaj <at> codeisgreat.org>
:
bug acknowledged by developer.
(Thu, 05 Aug 2021 23:52:02 GMT)
Full text and
rfc822 format available.
Message #34 received at 49846-done <at> debbugs.gnu.org (full text, mbox):
On 05.08.2021 17:27, Pankaj Jangid wrote:
> Then I just want an appropriate message i.e. option-1 from my previous
> post.
OK, I've changed the message in commit 232be9bf87. Hope you like the result.
A "match" is something specific in Xref terms, so the new message says
"reference", which should be more general.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#49846
; Package
emacs
.
(Fri, 06 Aug 2021 03:08:02 GMT)
Full text and
rfc822 format available.
Message #37 received at 49846-done <at> debbugs.gnu.org (full text, mbox):
Dmitry Gutov <dgutov <at> yandex.ru> writes:
>> Then I just want an appropriate message i.e. option-1 from my previous
>> post.
>
> OK, I've changed the message in commit 232be9bf87. Hope you like the result.
>
> A "match" is something specific in Xref terms, so the new message says
> "reference", which should be more general.
Thanks. I have tested it. I like the new message. :-)
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 03 Sep 2021 11:24:08 GMT)
Full text and
rfc822 format available.
This bug report was last modified 3 years and 288 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.