Subject: bug#73455: 30.0.91: find buffer pretty print columns don't line up on 1080p

From: Stefan Kangas <[email-masked]>
Date: Wed, 25 Sep 2024 10:24:32 -0700

Eli Zaretskii <[email-masked]> writes:

> If you set the value of find-program to "gfind", I think you should be
> able to add only /usr/pkg/bin to PATH, and that should not override
> the original "find", "make", etc.

Would it be worth considering doing the same as we did for
`insert-directory-program`, i.e. the below?  I'm not sure if this would
be considered too opinionated for people that are very used to a BSD
userland.

This still requires GNU find to be installed, of course (on macOS with
Homebrew, that would be `brew install findutils`).

diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el
index b453ac60ed2..97583c8afb8 100644
--- a/lisp/progmodes/grep.el
+++ b/lisp/progmodes/grep.el
@@ -550,7 +550,11 @@ grep-program
 This variable's value takes effect when `grep-compute-defaults' is called.")

 ;;;###autoload
-(defvar find-program (purecopy "find")
+(defvar find-program
+  (if (and (memq system-type '(berkeley-unix darwin))
+           (executable-find "gfind"))
+      (purecopy "gfind")
+    (purecopy "find"))
   "The default find program.
 This is used by commands like `grep-find-command', `find-dired'
 and others.")