GNU bug report logs -
#73455
30.0.91: find buffer pretty print columns don't line up on 1080p
Previous Next
Reported by: Van Ly <van.ly <at> sdf.org>
Date: Tue, 24 Sep 2024 16:41:02 UTC
Severity: normal
Found in version 30.0.91
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 73455 in the body.
You can then email your comments to 73455 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#73455
; Package
emacs
.
(Tue, 24 Sep 2024 16:41:03 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Van Ly <van.ly <at> sdf.org>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Tue, 24 Sep 2024 16:41:03 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hello,
The pretty print in the find buffer doesn't line up the columns, see
=> https://sdf.org/~van.ly/img/emacs-30-0-91-pretest-find-buffer.jpeg
To reproduce on 1080p display, do
1. emacs -Q
2. apply, M-x find-name-dired RET
3. target at a srcdir like NetBSD-10 and toggle fullscreen
Expect to see columns line up in pretty print.
[x (application/octet-stream, attachment)]
[Message part 3 (text/plain, inline)]
--
vl
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#73455
; Package
emacs
.
(Tue, 24 Sep 2024 18:41:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 73455 <at> debbugs.gnu.org (full text, mbox):
> Date: Tue, 24 Sep 2024 15:27:55 +0000
> From: Van Ly via "Bug reports for GNU Emacs,
> the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
>
> The pretty print in the find buffer doesn't line up the columns, see
>
> => https://sdf.org/~van.ly/img/emacs-30-0-91-pretest-find-buffer.jpeg
>
> To reproduce on 1080p display, do
>
> 1. emacs -Q
> 2. apply, M-x find-name-dired RET
> 3. target at a srcdir like NetBSD-10 and toggle fullscreen
>
> Expect to see columns line up in pretty print.
If you run the 'find' command shown at the beginning of the buffer
from the shell prompt, after you chdir to the NetBSD-10 directory, do
the columns align in the output, or do you see the same misalignment
as in the screenshot you posted?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#73455
; Package
emacs
.
(Wed, 25 Sep 2024 09:41:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 73455 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
>>
>> Expect to see columns line up in pretty print.
>
> If you run the 'find' command shown at the beginning of the buffer
> from the shell prompt, after you chdir to the NetBSD-10 directory, do
> the columns align in the output, or do you see the same misalignment
> as in the screenshot you posted?
>
That command at the shell prompt inside Emacs and outside on the Xterm
$ find . \( -name \*file.c \) -ls
generates misaligned columns as seen in the screenshot. Here is a
clip of three lines taken from the Xterm and this is also misaligned inside
Emacs at the shell prompt output
799508 16 -rw-r--r-- 1 van wheel 6006 May 22 2021 ./sys/lib/libsa/loadfile.c
12794193 16 -rw-r--r-- 1 van wheel 4161 Jul 15 2020 ./sys/stand/efiboot/efifile.c
807438 8 -rw-r--r-- 1 van wheel 3571 Jan 14 2017 ./tests/kernel/kqueue/read/t_file.c
--
vl
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#73455
; Package
emacs
.
(Wed, 25 Sep 2024 12:29:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 73455 <at> debbugs.gnu.org (full text, mbox):
> From: Van Ly <van.ly <at> sdf.org>
> Cc: 73455 <at> debbugs.gnu.org
> Date: Wed, 25 Sep 2024 09:39:38 +0000
>
>
> Eli Zaretskii <eliz <at> gnu.org> writes:
>
> >>
> >> Expect to see columns line up in pretty print.
> >
> > If you run the 'find' command shown at the beginning of the buffer
> > from the shell prompt, after you chdir to the NetBSD-10 directory, do
> > the columns align in the output, or do you see the same misalignment
> > as in the screenshot you posted?
> >
>
> That command at the shell prompt inside Emacs and outside on the Xterm
>
> $ find . \( -name \*file.c \) -ls
>
> generates misaligned columns as seen in the screenshot. Here is a
> clip of three lines taken from the Xterm and this is also misaligned inside
> Emacs at the shell prompt output
>
> 799508 16 -rw-r--r-- 1 van wheel 6006 May 22 2021 ./sys/lib/libsa/loadfile.c
> 12794193 16 -rw-r--r-- 1 van wheel 4161 Jul 15 2020 ./sys/stand/efiboot/efifile.c
> 807438 8 -rw-r--r-- 1 van wheel 3571 Jan 14 2017 ./tests/kernel/kqueue/read/t_file.c
Then I think this is the reason. Emacs does not realign the columns
in the output of the Find command, it uses the output as-is. Since
you are on NetBSD, I'm guessing that your Find command is not GNU
Find, and it probably doesn't guarantee that the columns are aligned.
I think I see in the GNU Find code which tries to handle this case, so
maybe you could install GNU Find and try with that.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#73455
; Package
emacs
.
(Wed, 25 Sep 2024 15:38:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 73455 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
>
> Emacs does not realign the columns
> in the output of the Find command, it uses the output as-is. Since
> you are on NetBSD, I'm guessing that your Find command is not GNU
> Find, and it probably doesn't guarantee that the columns are aligned.
> I think I see in the GNU Find code which tries to handle this case, so
> maybe you could install GNU Find and try with that.
>
The GNU findutils package offers pkg/gnu/bin/find and pkg/bin/gfind as
follows, and the column alignment is correct in the GNU find. Emacs
doesn't seem to have a configuration option to override the system's
find with gfind from GNU.
Placing in PATH /usr/pkg/gnu/bin:/usr/pkg/bin:/usr/bin has the potential
to knock-on unwanted side-effects where tools prefer the base system
commands. An example would be make and gmake.
1 $ pkgin pkg-content findutils
2 Information for https://cdn.netbsd.org/pub/pkgsrc/packages/NetBSD/x86_64/10.0_2024Q2/All/findutils-4.9.0.tgz:
3 Files:
4 /usr/pkg/bin/gfind
5 /usr/pkg/bin/glocate
6 /usr/pkg/bin/gupdatedb
7 /usr/pkg/bin/gxargs
8 /usr/pkg/gnu/bin/find
9 /usr/pkg/gnu/bin/locate
10 /usr/pkg/gnu/bin/updatedb
11 /usr/pkg/gnu/bin/xargs
--
vl
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#73455
; Package
emacs
.
(Wed, 25 Sep 2024 16:17:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 73455 <at> debbugs.gnu.org (full text, mbox):
> From: Van Ly <van.ly <at> sdf.org>
> Cc: 73455 <at> debbugs.gnu.org
> Date: Wed, 25 Sep 2024 15:36:58 +0000
>
>
> Eli Zaretskii <eliz <at> gnu.org> writes:
>
> >
> > Emacs does not realign the columns
> > in the output of the Find command, it uses the output as-is. Since
> > you are on NetBSD, I'm guessing that your Find command is not GNU
> > Find, and it probably doesn't guarantee that the columns are aligned.
> > I think I see in the GNU Find code which tries to handle this case, so
> > maybe you could install GNU Find and try with that.
> >
>
> The GNU findutils package offers pkg/gnu/bin/find and pkg/bin/gfind as
> follows, and the column alignment is correct in the GNU find. Emacs
> doesn't seem to have a configuration option to override the system's
> find with gfind from GNU.
You should be able to accomplish that by setting the value of the
variable find-program to "gfind".
> Placing in PATH /usr/pkg/gnu/bin:/usr/pkg/bin:/usr/bin has the potential
> to knock-on unwanted side-effects where tools prefer the base system
> commands. An example would be make and gmake.
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.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#73455
; Package
emacs
.
(Wed, 25 Sep 2024 17:50:09 GMT)
Full text and
rfc822 format available.
Message #23 received at 73455 <at> debbugs.gnu.org (full text, mbox):
> From: Stefan Kangas <stefankangas <at> gmail.com>
> Date: Wed, 25 Sep 2024 10:24:32 -0700
> Cc: 73455 <at> debbugs.gnu.org
>
> Eli Zaretskii <eliz <at> gnu.org> 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.
I'm not sure. find-program is used in many places, most of them
unrelated to alignment in "find ... -ls", so we are basically skewing
everything for a single not very frequent case. Why not leave that to
users instead?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#73455
; Package
emacs
.
(Wed, 25 Sep 2024 17:56:09 GMT)
Full text and
rfc822 format available.
Message #26 received at 73455 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> 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.")
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#73455
; Package
emacs
.
(Thu, 26 Sep 2024 13:22:01 GMT)
Full text and
rfc822 format available.
Message #29 received at 73455 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
>> From: Stefan Kangas <stefankangas <at> gmail.com>
>> Date: Wed, 25 Sep 2024 10:24:32 -0700
>> Cc: 73455 <at> debbugs.gnu.org
>>
>> Eli Zaretskii <eliz <at> gnu.org> 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.
>
> I'm not sure. find-program is used in many places, most of them
> unrelated to alignment in "find ... -ls", so we are basically skewing
> everything for a single not very frequent case. Why not leave that to
> users instead?
>
Perhaps BSD userland package maintainers will roll in and configure the
GNU Findutils option. Maybe FAQ documentation to help the maintainer or
BSD user is enough. Dired mode hints when the ls command doesn't handle
the dired switch option. If the apropos-command could have a way to
find the find-program variable that will help the end-user. The
describe-variable command will auto-complete "find" or "program" to
"find-program", could describe-variable dump a listing like
apropos-command?
Thanks.
--
vl
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#73455
; Package
emacs
.
(Thu, 26 Sep 2024 14:30:02 GMT)
Full text and
rfc822 format available.
Message #32 received at 73455 <at> debbugs.gnu.org (full text, mbox):
> From: Van Ly <van.ly <at> sdf.org>
> Cc: stefankangas <at> gmail.com, 73455 <at> debbugs.gnu.org
> Date: Thu, 26 Sep 2024 13:20:31 +0000
>
>
> Eli Zaretskii <eliz <at> gnu.org> writes:
>
> >> From: Stefan Kangas <stefankangas <at> gmail.com>
> >> Date: Wed, 25 Sep 2024 10:24:32 -0700
> >> Cc: 73455 <at> debbugs.gnu.org
> >>
> >> Eli Zaretskii <eliz <at> gnu.org> 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.
> >
> > I'm not sure. find-program is used in many places, most of them
> > unrelated to alignment in "find ... -ls", so we are basically skewing
> > everything for a single not very frequent case. Why not leave that to
> > users instead?
> >
>
> Perhaps BSD userland package maintainers will roll in and configure the
> GNU Findutils option. Maybe FAQ documentation to help the maintainer or
> BSD user is enough. Dired mode hints when the ls command doesn't handle
> the dired switch option. If the apropos-command could have a way to
> find the find-program variable that will help the end-user. The
> describe-variable command will auto-complete "find" or "program" to
> "find-program", could describe-variable dump a listing like
> apropos-command?
I already added to the doc string of find-dired a recommendation to
install GNU Find and the reference to `find-program'.
Reply sent
to
Eli Zaretskii <eliz <at> gnu.org>
:
You have taken responsibility.
(Sat, 05 Oct 2024 10:18:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Van Ly <van.ly <at> sdf.org>
:
bug acknowledged by developer.
(Sat, 05 Oct 2024 10:18:01 GMT)
Full text and
rfc822 format available.
Message #37 received at 73455-done <at> debbugs.gnu.org (full text, mbox):
> Cc: stefankangas <at> gmail.com, 73455 <at> debbugs.gnu.org
> Date: Thu, 26 Sep 2024 17:11:18 +0300
> From: Eli Zaretskii <eliz <at> gnu.org>
>
> > From: Van Ly <van.ly <at> sdf.org>
> > Cc: stefankangas <at> gmail.com, 73455 <at> debbugs.gnu.org
> > Date: Thu, 26 Sep 2024 13:20:31 +0000
> >
> >
> > Eli Zaretskii <eliz <at> gnu.org> writes:
> >
> > >> From: Stefan Kangas <stefankangas <at> gmail.com>
> > >> Date: Wed, 25 Sep 2024 10:24:32 -0700
> > >> Cc: 73455 <at> debbugs.gnu.org
> > >>
> > >> Eli Zaretskii <eliz <at> gnu.org> 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.
> > >
> > > I'm not sure. find-program is used in many places, most of them
> > > unrelated to alignment in "find ... -ls", so we are basically skewing
> > > everything for a single not very frequent case. Why not leave that to
> > > users instead?
> > >
> >
> > Perhaps BSD userland package maintainers will roll in and configure the
> > GNU Findutils option. Maybe FAQ documentation to help the maintainer or
> > BSD user is enough. Dired mode hints when the ls command doesn't handle
> > the dired switch option. If the apropos-command could have a way to
> > find the find-program variable that will help the end-user. The
> > describe-variable command will auto-complete "find" or "program" to
> > "find-program", could describe-variable dump a listing like
> > apropos-command?
>
> I already added to the doc string of find-dired a recommendation to
> install GNU Find and the reference to `find-program'.
No further comments, 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, 02 Nov 2024 11:24:13 GMT)
Full text and
rfc822 format available.
This bug report was last modified 228 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.