* bug#60896: dired-view-file vs. .7z
@ 2023-01-18 0:52 Dan Jacobson
2023-01-18 13:28 ` Eli Zaretskii
0 siblings, 1 reply; 9+ messages in thread
From: Dan Jacobson @ 2023-01-18 0:52 UTC (permalink / raw)
To: 60896
dired-view-file knows how to deal with .gz,
but not .7z.
$ apropos 7z
7z (1) - A file archiver with high compression ratio format
7za (1) - A file archiver with high compression ratio format
7zr (1) - A file archiver with high compression ratio format
p7zip (1) - Wrapper on 7-Zip file archiver with high compression ratio
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#60896: dired-view-file vs. .7z
2023-01-18 0:52 bug#60896: dired-view-file vs. .7z Dan Jacobson
@ 2023-01-18 13:28 ` Eli Zaretskii
2023-01-25 2:51 ` Dan Jacobson
0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2023-01-18 13:28 UTC (permalink / raw)
To: Dan Jacobson; +Cc: 60896
> From: Dan Jacobson <jidanni@jidanni.org>
> Date: Wed, 18 Jan 2023 08:52:06 +0800
>
> dired-view-file knows how to deal with .gz,
> but not .7z.
It does here, at least with Emacs 27 and later.
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#60896: dired-view-file vs. .7z
2023-01-18 13:28 ` Eli Zaretskii
@ 2023-01-25 2:51 ` Dan Jacobson
2023-01-25 12:21 ` Eli Zaretskii
0 siblings, 1 reply; 9+ messages in thread
From: Dan Jacobson @ 2023-01-25 2:51 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 60896, control
rename 60896 make error if not in 7z format
thanks
I see.
OK.
Well, if the file is not in 7z format,
then I hope dired-view-file would make an error message,
like it does if a file is not in .gz format:
---
Error while executing "gzip -c -q -d < /tmp/x.gz"
gzip: stdin: not in gzip format
---
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#60896: dired-view-file vs. .7z
2023-01-25 2:51 ` Dan Jacobson
@ 2023-01-25 12:21 ` Eli Zaretskii
2023-01-25 13:13 ` Ruijie Yu via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2023-01-25 12:21 UTC (permalink / raw)
To: Dan Jacobson; +Cc: 60896
> From: Dan Jacobson <jidanni@jidanni.org>
> Cc: 60896@debbugs.gnu.org,control@debbugs.gnu.org
> Date: Wed, 25 Jan 2023 10:51:43 +0800
>
> Well, if the file is not in 7z format,
> then I hope dired-view-file would make an error message,
> like it does if a file is not in .gz format:
> ---
> Error while executing "gzip -c -q -d < /tmp/x.gz"
>
>
> gzip: stdin: not in gzip format
That gzip error message comes from the gzip program, not from Emacs.
What does 7z say in a similar case? That's what dired-view-file
should show.
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#60896: dired-view-file vs. .7z
2023-01-25 12:21 ` Eli Zaretskii
@ 2023-01-25 13:13 ` Ruijie Yu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-25 13:23 ` Eli Zaretskii
2023-01-26 7:13 ` Dan Jacobson
0 siblings, 2 replies; 9+ messages in thread
From: Ruijie Yu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-01-25 13:13 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 60896, Dan Jacobson
[-- Attachment #1: Type: text/plain, Size: 794 bytes --]
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Dan Jacobson <jidanni@jidanni.org>
>> Cc: 60896@debbugs.gnu.org,control@debbugs.gnu.org
>> Date: Wed, 25 Jan 2023 10:51:43 +0800
>>
>> Well, if the file is not in 7z format,
>> then I hope dired-view-file would make an error message,
>> like it does if a file is not in .gz format:
>> ---
>> Error while executing "gzip -c -q -d < /tmp/x.gz"
>>
>>
>> gzip: stdin: not in gzip format
>
> That gzip error message comes from the gzip program, not from Emacs.
> What does 7z say in a similar case? That's what dired-view-file
> should show.
See the attachments for example outputs. #1 is a malformed 7z archive
(in my case just an empty file created by `touch`), and #2 contains an
actual 7z archive created by `7z a 2.7z memsize.c`.
Best,
RY
[-- Attachment #2: 1-out.txt --]
[-- Type: text/plain, Size: 286 bytes --]
7-Zip [64] 17.04 : Copyright (c) 1999-2021 Igor Pavlov : 2017-08-28
p7zip Version 17.04 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,64 bits,8 CPUs x64)
Scanning the drive for archives:
1 file, 0 bytes
Listing archive: 1.7z
ERROR: 1.7z : Can not open the file as archive
Errors: 1
[-- Attachment #3: 2-out.txt --]
[-- Type: text/plain, Size: 677 bytes --]
7-Zip [64] 17.04 : Copyright (c) 1999-2021 Igor Pavlov : 2017-08-28
p7zip Version 17.04 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,64 bits,8 CPUs x64)
Scanning the drive for archives:
1 file, 831 bytes (1 KiB)
Listing archive: 2.7z
--
Path = 2.7z
Type = 7z
Physical Size = 831
Headers Size = 122
Method = LZMA2:12
Solid = -
Blocks = 1
Date Time Attr Size Compressed Name
------------------- ----- ------------ ------------ ------------------------
2022-11-12 10:06:36 ....A 1495 709 memsize.c
------------------- ----- ------------ ------------ ------------------------
2022-11-12 10:06:36 1495 709 1 files
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#60896: dired-view-file vs. .7z
2023-01-25 13:13 ` Ruijie Yu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-01-25 13:23 ` Eli Zaretskii
2023-01-26 7:13 ` Dan Jacobson
1 sibling, 0 replies; 9+ messages in thread
From: Eli Zaretskii @ 2023-01-25 13:23 UTC (permalink / raw)
To: Ruijie Yu; +Cc: 60896, jidanni
> From: Ruijie Yu <ruijie@netyu.xyz>
> Cc: Dan Jacobson <jidanni@jidanni.org>, 60896@debbugs.gnu.org
> Date: Wed, 25 Jan 2023 21:13:15 +0800
>
> >> gzip: stdin: not in gzip format
> >
> > That gzip error message comes from the gzip program, not from Emacs.
> > What does 7z say in a similar case? That's what dired-view-file
> > should show.
>
> See the attachments for example outputs. #1 is a malformed 7z archive
> (in my case just an empty file created by `touch`), and #2 contains an
> actual 7z archive created by `7z a 2.7z memsize.c`.
Thanks, but I'm not sure I follow. My point is that dired-view-file
should show what the archiver program says, no more, no less. If
that's what happens, then we are good.
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#60896: dired-view-file vs. .7z
2023-01-25 13:13 ` Ruijie Yu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-25 13:23 ` Eli Zaretskii
@ 2023-01-26 7:13 ` Dan Jacobson
2023-01-26 8:08 ` Eli Zaretskii
1 sibling, 1 reply; 9+ messages in thread
From: Dan Jacobson @ 2023-01-26 7:13 UTC (permalink / raw)
To: Ruijie Yu; +Cc: 60896, Eli Zaretskii
Also maybe some message should be printed if no .gz or .7z handler is
found. Same for the rest: .jpg etc.
Currently emacs just opens the file in fundamental mode.
Emacs should print a message that it looked for a handler but didn't
find one.
That way the user would know emacs already can deal with such files,
and all he needs to do is install a handler.
Else he thinks emacs is just acting like it is 1980 an has never heard
of such files.
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#60896: dired-view-file vs. .7z
2023-01-26 7:13 ` Dan Jacobson
@ 2023-01-26 8:08 ` Eli Zaretskii
2023-09-03 9:42 ` bug#60896: make error if not in 7z format Stefan Kangas
0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2023-01-26 8:08 UTC (permalink / raw)
To: Dan Jacobson; +Cc: ruijie, 60896
> From: Dan Jacobson <jidanni@jidanni.org>
> Cc: Eli Zaretskii <eliz@gnu.org>, 60896@debbugs.gnu.org
> Date: Thu, 26 Jan 2023 15:13:48 +0800
>
> Also maybe some message should be printed if no .gz or .7z handler is
> found. Same for the rest: .jpg etc.
>
> Currently emacs just opens the file in fundamental mode.
>
> Emacs should print a message that it looked for a handler but didn't
> find one.
Sorry, no. That way lies madness: most of the files Emacs users visit
have no handlers. Announcing we didn't find a handler will be a
terrible annoyance.
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#60896: make error if not in 7z format
2023-01-26 8:08 ` Eli Zaretskii
@ 2023-09-03 9:42 ` Stefan Kangas
0 siblings, 0 replies; 9+ messages in thread
From: Stefan Kangas @ 2023-09-03 9:42 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: ruijie, 60896-done, Dan Jacobson
tags 60896
close 60896
thanks
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Dan Jacobson <jidanni@jidanni.org>
>> Cc: Eli Zaretskii <eliz@gnu.org>, 60896@debbugs.gnu.org
>> Date: Thu, 26 Jan 2023 15:13:48 +0800
>>
>> Also maybe some message should be printed if no .gz or .7z handler is
>> found. Same for the rest: .jpg etc.
>>
>> Currently emacs just opens the file in fundamental mode.
>>
>> Emacs should print a message that it looked for a handler but didn't
>> find one.
>
> Sorry, no. That way lies madness: most of the files Emacs users visit
> have no handlers. Announcing we didn't find a handler will be a
> terrible annoyance.
Having read this bug report, I see no bug in Emacs. We print the
message from the external archiver, as we should, and suggestions for
other changes were rejected.
I'm therefore closing this bug report.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2023-09-03 9:42 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-18 0:52 bug#60896: dired-view-file vs. .7z Dan Jacobson
2023-01-18 13:28 ` Eli Zaretskii
2023-01-25 2:51 ` Dan Jacobson
2023-01-25 12:21 ` Eli Zaretskii
2023-01-25 13:13 ` Ruijie Yu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-25 13:23 ` Eli Zaretskii
2023-01-26 7:13 ` Dan Jacobson
2023-01-26 8:08 ` Eli Zaretskii
2023-09-03 9:42 ` bug#60896: make error if not in 7z format Stefan Kangas
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.