GNU bug report logs - #75591
30.0.92; Inconsistency in Function Naming: *-open-file vs. *-find-file

Previous Next

Package: emacs;

Reported by: Anush V <j <at> gnu.org>

Date: Wed, 15 Jan 2025 18:32:01 UTC

Severity: wishlist

Found in version 30.0.92

Done: Eli Zaretskii <eliz <at> gnu.org>

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 75591 in the body.
You can then email your comments to 75591 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#75591; Package emacs. (Wed, 15 Jan 2025 18:32:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Anush V <j <at> gnu.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 15 Jan 2025 18:32:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Anush V <j <at> gnu.org>
To: bug-gnu-emacs <at> gnu.org
Subject: 30.0.92; Inconsistency in Function Naming: *-open-file vs. *-find-file
Date: Wed, 15 Jan 2025 13:29:44 -0500
Hello Emacs Maintainers,

I noticed an inconsistency in the naming conventions of certain Emacs
functions that I find confusing.  Specifically, some functions use
*-open-file(s), while others use *-find-file.

Functions such as eww-open-file and recentf-open-files use 'open-file'
or 'open-files' in their naming.  In contrast, many other functions,
including dired-find-file, find-file, project-find-file, and
ido-find-file, use the 'find-file' format.

I am curious about the rationale behind this difference.  Is there
a specific reason that some functions prefer 'open-file' over
'find-file' even though they seem to perform similar actions?

Thank you for your time!

* * *
In GNU Emacs 30.0.92 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.24.41, cairo version 1.18.0)
Windowing system distributor 'The X.Org Foundation', version 11.0.12101014
System Description: Guix System

Configured using:
 'configure
 CONFIG_SHELL=/gnu/store/6nqyia3ra10sgd1ppzk2047ncbzjwhff-bash-minimal-5.1.16/bin/bash
 SHELL=/gnu/store/6nqyia3ra10sgd1ppzk2047ncbzjwhff-bash-minimal-5.1.16/bin/bash --prefix=/gnu/store/ml6xyl3py6hqfdps2sypdi7s212y7k02-emacs-next-30.0.92-0.881d593 --enable-fast-install --with-cairo --with-modules --with-native-compilation=aot --disable-build-details'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ
JPEG LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES
NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3
THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER X11 XDBE XIM XINPUT2 XPM
GTK3 ZLIB

--
Regards,
Anush




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75591; Package emacs. (Wed, 15 Jan 2025 20:17:01 GMT) Full text and rfc822 format available.

Message #8 received at 75591 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Anush V <j <at> gnu.org>
Cc: 75591 <at> debbugs.gnu.org
Subject: Re: bug#75591: 30.0.92;
 Inconsistency in Function Naming: *-open-file vs. *-find-file
Date: Wed, 15 Jan 2025 22:16:03 +0200
> From: Anush V <j <at> gnu.org>
> Date: Wed, 15 Jan 2025 13:29:44 -0500
> 
> I noticed an inconsistency in the naming conventions of certain Emacs
> functions that I find confusing.  Specifically, some functions use
> *-open-file(s), while others use *-find-file.
> 
> Functions such as eww-open-file and recentf-open-files use 'open-file'
> or 'open-files' in their naming.  In contrast, many other functions,
> including dired-find-file, find-file, project-find-file, and
> ido-find-file, use the 'find-file' format.
> 
> I am curious about the rationale behind this difference.  Is there
> a specific reason that some functions prefer 'open-file' over
> 'find-file' even though they seem to perform similar actions?

I think just personal preferences of whoever implemented these
functions, and the many years that passed between the "find" names
were introduced and the time the "open" names weer introduced.
Nothing more.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75591; Package emacs. (Thu, 16 Jan 2025 13:21:02 GMT) Full text and rfc822 format available.

Message #11 received at 75591 <at> debbugs.gnu.org (full text, mbox):

From: Anush V <j <at> gnu.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 75591 <at> debbugs.gnu.org
Subject: Re: bug#75591: 30.0.92; Inconsistency in Function Naming:
 *-open-file vs. *-find-file
Date: Thu, 16 Jan 2025 08:20:19 -0500
> From: Eli Zaretskii <eliz <at> gnu.org>
> Date: Wed, 15 Jan 2025 22:16:03 +0200
>
>> From: Anush V <j <at> gnu.org>
>> Date: Wed, 15 Jan 2025 13:29:44 -0500
>>
>> I noticed an inconsistency in the naming conventions of certain Emacs
>> functions that I find confusing.  Specifically, some functions use
>> *-open-file(s), while others use *-find-file.
>>
>> Functions such as eww-open-file and recentf-open-files use 'open-file'
>> or 'open-files' in their naming.  In contrast, many other functions,
>> including dired-find-file, find-file, project-find-file, and
>> ido-find-file, use the 'find-file' format.
>>
>> I am curious about the rationale behind this difference.  Is there
>> a specific reason that some functions prefer 'open-file' over
>> 'find-file' even though they seem to perform similar actions?
>
> I think just personal preferences of whoever implemented these
> functions, and the many years that passed between the "find" names
> were introduced and the time the "open" names weer introduced.
> Nothing more.

Thank you for clarifying. I had wrongly assumed that "find-file" might
be the standard, as those seemed to have been introduced first.

Regards,
Anush




Severity set to 'wishlist' from 'normal' Request was from Stefan Kangas <stefankangas <at> gmail.com> to control <at> debbugs.gnu.org. (Tue, 21 Jan 2025 02:27:06 GMT) Full text and rfc822 format available.

Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Sat, 25 Jan 2025 09:30:02 GMT) Full text and rfc822 format available.

Notification sent to Anush V <j <at> gnu.org>:
bug acknowledged by developer. (Sat, 25 Jan 2025 09:30:02 GMT) Full text and rfc822 format available.

Message #18 received at 75591-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Anush V <j <at> gnu.org>
Cc: 75591-done <at> debbugs.gnu.org
Subject: Re: bug#75591: 30.0.92; Inconsistency in Function Naming:
 *-open-file vs. *-find-file
Date: Sat, 25 Jan 2025 11:29:00 +0200
> From: Anush V <j <at> gnu.org>
> Cc: 75591 <at> debbugs.gnu.org
> Date: Thu, 16 Jan 2025 08:20:19 -0500
> 
> > From: Eli Zaretskii <eliz <at> gnu.org>
> > Date: Wed, 15 Jan 2025 22:16:03 +0200
> >
> >> From: Anush V <j <at> gnu.org>
> >> Date: Wed, 15 Jan 2025 13:29:44 -0500
> >>
> >> I noticed an inconsistency in the naming conventions of certain Emacs
> >> functions that I find confusing.  Specifically, some functions use
> >> *-open-file(s), while others use *-find-file.
> >>
> >> Functions such as eww-open-file and recentf-open-files use 'open-file'
> >> or 'open-files' in their naming.  In contrast, many other functions,
> >> including dired-find-file, find-file, project-find-file, and
> >> ido-find-file, use the 'find-file' format.
> >>
> >> I am curious about the rationale behind this difference.  Is there
> >> a specific reason that some functions prefer 'open-file' over
> >> 'find-file' even though they seem to perform similar actions?
> >
> > I think just personal preferences of whoever implemented these
> > functions, and the many years that passed between the "find" names
> > were introduced and the time the "open" names weer introduced.
> > Nothing more.
> 
> Thank you for clarifying. I had wrongly assumed that "find-file" might
> be the standard, as those seemed to have been introduced first.

It's true that find-* where introduced first, but we nowadays use
both.

So I'm now closing this bug.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 22 Feb 2025 12:24:34 GMT) Full text and rfc822 format available.

This bug report was last modified 19 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.