GNU bug report logs -
#77500
project-find-sibling-file
Previous Next
Reported by: Juri Linkov <juri <at> linkov.net>
Date: Thu, 3 Apr 2025 17:49:02 UTC
Severity: normal
Fixed in version 31.0.50
Done: Juri Linkov <juri <at> linkov.net>
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 77500 in the body.
You can then email your comments to 77500 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
dmitry <at> gutov.dev, bug-gnu-emacs <at> gnu.org
:
bug#77500
; Package
emacs
.
(Thu, 03 Apr 2025 17:49:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Juri Linkov <juri <at> linkov.net>
:
New bug report received and forwarded. Copy sent to
dmitry <at> gutov.dev, bug-gnu-emacs <at> gnu.org
.
(Thu, 03 Apr 2025 17:49:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
There are many project commands that represent their global counterparts
with the prefix 'project-' added to their command names like
'project-find-file' and 'find-file'.
However, there is one new command that doesn't correspond to its global sibling:
'project-find-matching-file' has no binding, so every time I have to manually
type its name, and after unsuccessfully trying 'M-x project-find-sibling-file'
I need to spend time reading project.el to find the name of the new command,
because it has a name different from the global command 'find-sibling-file'.
Therefore, I propose to rename 'project-find-matching-file' to 'project-find-sibling-file'.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#77500
; Package
emacs
.
(Thu, 03 Apr 2025 23:30:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 77500 <at> debbugs.gnu.org (full text, mbox):
Hi!
On 03/04/2025 20:45, Juri Linkov wrote:
> There are many project commands that represent their global counterparts
> with the prefix 'project-' added to their command names like
> 'project-find-file' and 'find-file'.
>
> However, there is one new command that doesn't correspond to its global sibling:
> 'project-find-matching-file' has no binding, so every time I have to manually
Not sure if the current name is ideal, certainly.
> type its name, and after unsuccessfully trying 'M-x project-find-sibling-file'
> I need to spend time reading project.el to find the name of the new command,
> because it has a name different from the global command 'find-sibling-file'.
>
> Therefore, I propose to rename 'project-find-matching-file' to 'project-find-sibling-file'.
But is 'find-sibling-name' its proper counterpart? That one looks for
files named similarly but not exactly same, residing in the same
directory, or nearby directories. Often with different contents.
Whereas the current project-find-matching-file looks for files with
equal relative names (and usually similar contents) that reside in two
distinct directory trees. In a sense, this might be the opposite from
'find-sibling-name'.
FWIW, originally I was thinking to call it 'project-find-same-file'.
Anyway, opinions welcome.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#77500
; Package
emacs
.
(Fri, 04 Apr 2025 06:18:03 GMT)
Full text and
rfc822 format available.
Message #11 received at 77500 <at> debbugs.gnu.org (full text, mbox):
>> I need to spend time reading project.el to find the name of the new command,
>> because it has a name different from the global command 'find-sibling-file'.
>> Therefore, I propose to rename 'project-find-matching-file' to
>> 'project-find-sibling-file'.
>
> But is 'find-sibling-name' its proper counterpart? That one looks for files
> named similarly but not exactly same, residing in the same directory, or
> nearby directories. Often with different contents.
>
> Whereas the current project-find-matching-file looks for files with equal
> relative names (and usually similar contents) that reside in two distinct
> directory trees. In a sense, this might be the opposite from
> 'find-sibling-name'.
From the docstring of 'find-sibling-rules':
In this example, if you’re in "src/emacs/emacs-27/lisp/abbrev.el",
and a "src/emacs/emacs-28/lisp/abbrev.el" file exists, it’s now
defined as a sibling.
Looks very similar to the project command.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#77500
; Package
emacs
.
(Fri, 04 Apr 2025 09:05:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 77500 <at> debbugs.gnu.org (full text, mbox):
[வெள்ளி ஏப்ரல் 04, 2025] Juri Linkov wrote:
>>> I need to spend time reading project.el to find the name of the new command,
>>> because it has a name different from the global command 'find-sibling-file'.
>>> Therefore, I propose to rename 'project-find-matching-file' to
>>> 'project-find-sibling-file'.
>>
>> But is 'find-sibling-name' its proper counterpart? That one looks for files
>> named similarly but not exactly same, residing in the same directory, or
>> nearby directories. Often with different contents.
>>
>> Whereas the current project-find-matching-file looks for files with equal
>> relative names (and usually similar contents) that reside in two distinct
>> directory trees. In a sense, this might be the opposite from
>> 'find-sibling-name'.
>
> From the docstring of 'find-sibling-rules':
>
> In this example, if you’re in "src/emacs/emacs-27/lisp/abbrev.el",
> and a "src/emacs/emacs-28/lisp/abbrev.el" file exists, it’s now
> defined as a sibling.
>
> Looks very similar to the project command.
It doesn't always have to be something like that though. My sibling
rule maps
XXX/something.com
to
XXX/log/something.log, and XXX/something.log.
If I found a project-find-sibling-file command, I would expect it to
return the siblings of XXX/something.com that reside in the same project
as XXX/something.com, whereas project-find-matching-file does something
else entirely.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#77500
; Package
emacs
.
(Fri, 04 Apr 2025 16:16:03 GMT)
Full text and
rfc822 format available.
Message #17 received at 77500 <at> debbugs.gnu.org (full text, mbox):
close 77500 31.0.50
thanks
>>>> I need to spend time reading project.el to find the name of the new command,
>>>> because it has a name different from the global command 'find-sibling-file'.
>>>> Therefore, I propose to rename 'project-find-matching-file' to
>>>> 'project-find-sibling-file'.
>>>
>>> But is 'find-sibling-name' its proper counterpart? That one looks for files
>>> named similarly but not exactly same, residing in the same directory, or
>>> nearby directories. Often with different contents.
>>>
>>> Whereas the current project-find-matching-file looks for files with equal
>>> relative names (and usually similar contents) that reside in two distinct
>>> directory trees. In a sense, this might be the opposite from
>>> 'find-sibling-name'.
>>
>> From the docstring of 'find-sibling-rules':
>>
>> In this example, if you’re in "src/emacs/emacs-27/lisp/abbrev.el",
>> and a "src/emacs/emacs-28/lisp/abbrev.el" file exists, it’s now
>> defined as a sibling.
>>
>> Looks very similar to the project command.
>
> It doesn't always have to be something like that though. My sibling
> rule maps
>
> XXX/something.com
>
> to
> XXX/log/something.log, and XXX/something.log.
>
> If I found a project-find-sibling-file command, I would expect it to
> return the siblings of XXX/something.com that reside in the same project
> as XXX/something.com, whereas project-find-matching-file does something
> else entirely.
I agree that the sibling rules might differ significantly.
In case when the rule matches its sibling in another project,
it's like the project command, in other cases not.
Ok, I can add an alias in the init file.
So now closing this.
bug marked as fixed in version 31.0.50, send any further explanations to
77500 <at> debbugs.gnu.org and Juri Linkov <juri <at> linkov.net>
Request was from
Juri Linkov <juri <at> linkov.net>
to
control <at> debbugs.gnu.org
.
(Fri, 04 Apr 2025 16:16:04 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 03 May 2025 11:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 47 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.