GNU bug report logs - #54962
28.1; insert-directory-program should be ls-program

Previous Next

Package: emacs;

Reported by: Howard Melman <hmelman <at> gmail.com>

Date: Fri, 15 Apr 2022 19:25:02 UTC

Severity: wishlist

Found in version 28.1

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 54962 in the body.
You can then email your comments to 54962 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#54962; Package emacs. (Fri, 15 Apr 2022 19:25:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Howard Melman <hmelman <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 15 Apr 2022 19:25:02 GMT) Full text and rfc822 format available.

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

From: Howard Melman <hmelman <at> gmail.com>
To: GNU Emacs <bug-gnu-emacs <at> gnu.org>
Subject: 28.1; insert-directory-program should be ls-program
Date: Fri, 15 Apr 2022 15:24:41 -0400
This is minor, but I think insert-directory-program should
be called ls-program.  I'm sure it's for historical reasons
but a variable alias or other solution would be great.

On the mac I think it's common to install gnu ls as "gls"
and I had hard time finding the emacs variable to set to
have it use this.  There are several dozen such variables
and they all follow a similar more discoverable naming
pattern as this sample:

find-program
grep-program
xargs-program
dig-program
dired-chmod-program
dired-chown-program
dired-touch-program
ediff-cmp-program
ediff-diff-program
epg-gpg-program
mm-url-program
sendmail-program
tramp-adb-program
vc-bzr-program
vc-git-program
vc-hg-program
vc-mtn-program
vc-src-program
vc-svn-program


Howard

In GNU Emacs 28.1 (build 1, x86_64-apple-darwin20.6.0, Carbon Version 164 AppKit 2022.6)
of 2022-04-09 built on Mac-1649520554451.local
Repository revision: ee79b048bbb2fd4a962dfb2204cc7a2f0d5237d8
Repository branch: 28.1-mac-9.0-CI
Windowing system distributor 'Apple Inc.', version 11.6.5
System Description:  macOS 11.6.5

Configured using:
'configure --with-mac
--enable-locallisppath=/usr/local/share/emacs/site-lisp:/opt/homebrew/share/emacs/site-lisp
--enable-mac-app=/Users/runner/work/homebrew-emacsmacport/homebrew-emacsmacport/build-scripts/emacs-source/tmproot
--prefix=/Users/runner/work/homebrew-emacsmacport/homebrew-emacsmacport/build-scripts/emacs-source/tmproot
--enable-mac-self-contained --with-modules'





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#54962; Package emacs. (Fri, 15 Apr 2022 19:51:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Howard Melman <hmelman <at> gmail.com>
Cc: 54962 <at> debbugs.gnu.org
Subject: Re: bug#54962: 28.1; insert-directory-program should be ls-program
Date: Fri, 15 Apr 2022 22:50:38 +0300
> From: Howard Melman <hmelman <at> gmail.com>
> Date: Fri, 15 Apr 2022 15:24:41 -0400
> 
> This is minor, but I think insert-directory-program should
> be called ls-program.  I'm sure it's for historical reasons
> but a variable alias or other solution would be great.

No one said it has to be 'ls'.  It can be anything else, as long as it
produces the same output.

So I see no reason to change the name of that variable.

> On the mac I think it's common to install gnu ls as "gls"
> and I had hard time finding the emacs variable to set to
> have it use this.

That is not a reason to rename the variable, it is perhaps a reason to
improve our Help and Apropos facilities.

> There are several dozen such variables
> and they all follow a similar more discoverable naming
> pattern as this sample:

Those are much more specific.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#54962; Package emacs. (Fri, 15 Apr 2022 19:58:01 GMT) Full text and rfc822 format available.

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

From: Howard Melman <hmelman <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 54962 <at> debbugs.gnu.org
Subject: Re: bug#54962: 28.1; insert-directory-program should be ls-program
Date: Fri, 15 Apr 2022 15:56:58 -0400

> On Apr 15, 2022, at 3:50 PM, Eli Zaretskii <eliz <at> gnu.org> wrote:
> 
> No one said it has to be 'ls'.  It can be anything else, as long as it
> produces the same output.
> 
>> There are several dozen such variables
>> and they all follow a similar more discoverable naming
>> pattern as this sample:
> 
> Those are much more specific.

Could you explain how these are more specific than something else
"as long as it produces the same out"?  I don't follow the distinction
you're drawing.

Howard




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#54962; Package emacs. (Fri, 15 Apr 2022 20:10:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Howard Melman <hmelman <at> gmail.com>
Cc: 54962 <at> debbugs.gnu.org
Subject: Re: bug#54962: 28.1; insert-directory-program should be ls-program
Date: Fri, 15 Apr 2022 23:09:24 +0300
> From: Howard Melman <hmelman <at> gmail.com>
> Date: Fri, 15 Apr 2022 15:56:58 -0400
> Cc: 54962 <at> debbugs.gnu.org
> 
> 
> 
> > On Apr 15, 2022, at 3:50 PM, Eli Zaretskii <eliz <at> gnu.org> wrote:
> > 
> > No one said it has to be 'ls'.  It can be anything else, as long as it
> > produces the same output.
> > 
> >> There are several dozen such variables
> >> and they all follow a similar more discoverable naming
> >> pattern as this sample:
> > 
> > Those are much more specific.
> 
> Could you explain how these are more specific than something else
> "as long as it produces the same out"?  I don't follow the distinction
> you're drawing.

The distinction is that there's only one program that can be used in
the other examples of these variables, and the variable exists only to
support different installation directories for that program, and
sometimes popular renames like 'gfind' instead of 'find'.  That's not
the case with 'ls'.  Some systems call this 'dir', for example.
Besides, insert-directory-program is used not just by dired, it is
also used by a function names 'insert-directory'.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#54962; Package emacs. (Fri, 15 Apr 2022 20:17:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: hmelman <at> gmail.com
Cc: 54962 <at> debbugs.gnu.org
Subject: Re: bug#54962: 28.1; insert-directory-program should be ls-program
Date: Fri, 15 Apr 2022 23:16:47 +0300
> Date: Fri, 15 Apr 2022 22:50:38 +0300
> From: Eli Zaretskii <eliz <at> gnu.org>
> Cc: 54962 <at> debbugs.gnu.org
> 
> > On the mac I think it's common to install gnu ls as "gls"
> > and I had hard time finding the emacs variable to set to
> > have it use this.
> 
> That is not a reason to rename the variable, it is perhaps a reason to
> improve our Help and Apropos facilities.

I've now added a reference to insert-directory-program in the doc
string of Dired, and vice versa.  I think this addresses the problems
you had in finding the variable.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#54962; Package emacs. (Fri, 15 Apr 2022 21:36:02 GMT) Full text and rfc822 format available.

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

From: Howard Melman <hmelman <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 54962 <at> debbugs.gnu.org
Subject: Re: bug#54962: 28.1; insert-directory-program should be ls-program
Date: Fri, 15 Apr 2022 17:35:38 -0400
> On Apr 15, 2022, at 4:16 PM, Eli Zaretskii <eliz <at> gnu.org> wrote:
> 
> I've now added a reference to insert-directory-program in the doc
> string of Dired, and vice versa.  I think this addresses the problems
> you had in finding the variable.

Yes that helps.  

> The distinction is that there's only one program that can be used in
> the other examples of these variables, and the variable exists only to
> support different installation directories for that program, and
> sometimes popular renames like 'gfind' instead of 'find'.  

This is exactly my case.

> That's not the case with 'ls'.  Some systems call this 'dir', for example.

I don't see why that system couldn't just as easily do

    (setq ls-program "dir")

On the mac I configure locate-command to use mdfind, which seems
similar.

> Besides, insert-directory-program is used not just by dired, it is
> also used by a function names 'insert-directory'.

Which I think is just used by dired and list-directory the latter
of which says in the first line of its docstring:

    Display a list of files in or matching DIRNAME, a la ls.

And there's ls-lisp-use-insert-directory-program which is also very 
ls centric.

So I still don't get your distinction and think a variable alias would
break nothing and help findability.  

In my case I changed my system configuration and knew I had to
tell emacs about "gls" and knew about setting grep-program and
find-program and locate-command and thought this one would be
called ls-program in part because those others weren't called
something like search-files-for-regexp-program.

Howard




Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Sat, 16 Apr 2022 06:43:01 GMT) Full text and rfc822 format available.

Notification sent to Howard Melman <hmelman <at> gmail.com>:
bug acknowledged by developer. (Sat, 16 Apr 2022 06:43:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Howard Melman <hmelman <at> gmail.com>
Cc: 54962-done <at> debbugs.gnu.org
Subject: Re: bug#54962: 28.1; insert-directory-program should be ls-program
Date: Sat, 16 Apr 2022 09:42:17 +0300
> From: Howard Melman <hmelman <at> gmail.com>
> Date: Fri, 15 Apr 2022 17:35:38 -0400
> Cc: 54962 <at> debbugs.gnu.org
> 
> And there's ls-lisp-use-insert-directory-program which is also very 
> ls centric.

That's unrelated: it is used by the ls-lisp.el package, which emulates
'ls' in Emacs Lisp.

Anyway, I think your original problem is now adequately addressed, and
since I don't think we can rename that variable after so many years,
I'm closing this bug report.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 14 May 2022 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 87 days ago.

Previous Next


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