GNU bug report logs - #25076
24.5; Enhancement request: Make `archive-mode' more Dired like (sorting etc.)

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Wed, 30 Nov 2016 18:37:02 UTC

Severity: wishlist

Found in version 24.5

Done: Lars Ingebrigtsen <larsi <at> gnus.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 25076 in the body.
You can then email your comments to 25076 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#25076; Package emacs. (Wed, 30 Nov 2016 18:37:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Drew Adams <drew.adams <at> oracle.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 30 Nov 2016 18:37:02 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.5; Enhancement request: Make `archive-mode' more Dired like
 (sorting etc.)
Date: Wed, 30 Nov 2016 10:36:08 -0800 (PST)
Subject line says it all.  `archive-mode' still seems pretty
rudimentary.  It would be good to at least be able to sort the lines by
file name etc.


In GNU Emacs 24.5.1 (i686-pc-mingw32)
 of 2015-04-11 on LEG570
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --prefix=/c/usr --host=i686-pc-mingw32'




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25076; Package emacs. (Thu, 01 Dec 2016 19:58:01 GMT) Full text and rfc822 format available.

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

From: Alan Third <alan <at> idiocy.org>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 25076 <at> debbugs.gnu.org
Subject: Re: bug#25076: 24.5; Enhancement request: Make `archive-mode' more
 Dired like (sorting etc.)
Date: Thu, 1 Dec 2016 19:57:07 +0000
On Wed, Nov 30, 2016 at 10:36:08AM -0800, Drew Adams wrote:
> Subject line says it all.  `archive-mode' still seems pretty
> rudimentary.  It would be good to at least be able to sort the lines by
> file name etc.

I’m wondering if it wouldn’t be smarter to actually use dired to
access archives, like how we can use dired to access remote
directories through tramp.

I expect this is probably a much bigger/harder job than I imagine, but
what would be required? Just a function that could produce ls style
output for archives?
-- 
Alan Third




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25076; Package emacs. (Thu, 01 Dec 2016 20:15:01 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: Alan Third <alan <at> idiocy.org>
Cc: 25076 <at> debbugs.gnu.org
Subject: RE: bug#25076: 24.5; Enhancement request: Make `archive-mode' more
 Dired like (sorting etc.)
Date: Thu, 1 Dec 2016 12:14:34 -0800 (PST)
> > Subject line says it all.  `archive-mode' still seems pretty
> > rudimentary.  It would be good to at least be able to sort the
> > lines by file name etc.
> 
> I’m wondering if it wouldn’t be smarter to actually use dired to
> access archives, like how we can use dired to access remote
> directories through tramp.
> 
> I expect this is probably a much bigger/harder job than I imagine,
> but what would be required? Just a function that could produce ls style
> output for archives?

I can't speak to that question.  I suggest that you file a separate
enhancement request for it.  If it turns out that it is trivial then
the two bugs can be merged - I don't have any objection to being
able to use Dired (completely) for archives.

But no, it is not just a question of producing an ls-style listing.
The various Dired operations available currently expect a file as
target.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25076; Package emacs. (Fri, 02 Dec 2016 07:16:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: alan <at> idiocy.org, 25076 <at> debbugs.gnu.org
Subject: Re: bug#25076: 24.5;
 Enhancement request: Make `archive-mode' more Dired like (sorting
 etc.)
Date: Fri, 02 Dec 2016 09:15:30 +0200
> Date: Thu, 1 Dec 2016 12:14:34 -0800 (PST)
> From: Drew Adams <drew.adams <at> oracle.com>
> Cc: 25076 <at> debbugs.gnu.org
> 
> > > Subject line says it all.  `archive-mode' still seems pretty
> > > rudimentary.  It would be good to at least be able to sort the
> > > lines by file name etc.
> > 
> > I’m wondering if it wouldn’t be smarter to actually use dired to
> > access archives, like how we can use dired to access remote
> > directories through tramp.
> > 
> > I expect this is probably a much bigger/harder job than I imagine,
> > but what would be required? Just a function that could produce ls style
> > output for archives?
> 
> I can't speak to that question.  I suggest that you file a separate
> enhancement request for it.  If it turns out that it is trivial then
> the two bugs can be merged - I don't have any objection to being
> able to use Dired (completely) for archives.
> 
> But no, it is not just a question of producing an ls-style listing.
> The various Dired operations available currently expect a file as
> target.

Then one almost obvious solution is to unpack the archive under
temporary-file-directory, and invoke Dired on that.

In any case, IMO adding such a feature (which I agree should be nice)
is out of scope of archive-mode, as it is designed.  Its basic design
is to show you the archive as it is on disk, with no changes.  The
file listing you are looking at in archive-mode is in most cases a
specially-formatted TOC that is recorded in the archive.  Changing its
order means changing the archive itself, which is not what the request
wants, AFAIU.

So if Dired on a temporary copy is not a good solution for some
reason, I guess we need a new mode, which will reuse some basic
capabilities of archive-mode, but otherwise be designed similarly to
Dired.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25076; Package emacs. (Fri, 02 Dec 2016 08:48:01 GMT) Full text and rfc822 format available.

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

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Alan Third <alan <at> idiocy.org>
Cc: 25076 <at> debbugs.gnu.org, Drew Adams <drew.adams <at> oracle.com>
Subject: Re: bug#25076: 24.5;
 Enhancement request: Make `archive-mode' more Dired like (sorting
 etc.)
Date: Fri, 02 Dec 2016 09:47:00 +0100
Alan Third <alan <at> idiocy.org> writes:

> On Wed, Nov 30, 2016 at 10:36:08AM -0800, Drew Adams wrote:
>> Subject line says it all.  `archive-mode' still seems pretty
>> rudimentary.  It would be good to at least be able to sort the lines by
>> file name etc.
>
> I’m wondering if it wouldn’t be smarter to actually use dired to
> access archives, like how we can use dired to access remote
> directories through tramp.
>
> I expect this is probably a much bigger/harder job than I imagine, but
> what would be required? Just a function that could produce ls style
> output for archives?

The clean solution would be to add a file name handler for
archives. Several primitive functions need to be implemented; one of
them would be `insert-directory’.

See (info "(elisp) Magic File Names") for the complete list of
functions. Not all of them would require an own implementation, 'tho.

My (always erroneous) memories tell me, that Stefan did propose
something like this years ago. Nobody took the ball.

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25076; Package emacs. (Fri, 02 Dec 2016 16:14:01 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: alan <at> idiocy.org, 25076 <at> debbugs.gnu.org
Subject: RE: bug#25076: 24.5; Enhancement request: Make `archive-mode' more
 Dired like (sorting etc.)
Date: Fri, 2 Dec 2016 08:13:00 -0800 (PST)
> > > > Subject line says it all.  `archive-mode' still seems pretty
> > > > rudimentary.  It would be good to at least be able to sort the
> > > > lines by file name etc.
> > >
> > > I’m wondering if it wouldn’t be smarter to actually use dired to
> > > access archives, like how we can use dired to access remote
> > > directories through tramp.
> > >
> > > I expect this is probably a much bigger/harder job than I
> > > imagine, but what would be required? Just a function that
> > > could produce ls style output for archives?
> >
> > I can't speak to that question.  I suggest that you file a
> > separate enhancement request for it.  If it turns out that
> > it is trivial then the two bugs can be merged - I don't have
> > any objection to being able to use Dired (completely) for archives.
> >
> > But no, it is not just a question of producing an ls-style
> > listing. The various Dired operations available currently
> > expect a file as target.
> 
> Then one almost obvious solution is to unpack the archive under
> temporary-file-directory, and invoke Dired on that.

Yes.  And that is what I've done, manually.  I think wrapping
that up so that it happens transparently is probably the best
solution.

> In any case, IMO adding such a feature (which I agree should be
> nice) is out of scope of archive-mode, as it is designed.  Its
> basic design is to show you the archive as it is on disk, with
> no changes.  The file listing you are looking at in archive-mode
> is in most cases a specially-formatted TOC that is recorded in
> the archive.  Changing its order means changing the archive itself,
> which is not what the request wants, AFAIU.

I think you're right.

> So if Dired on a temporary copy is not a good solution for some
> reason, I guess we need a new mode, which will reuse some basic
> capabilities of archive-mode, but otherwise be designed similarly
> to Dired.

I think opening Dired on a temporary extraction is probably the
way to go.  Do you want to rename this enhancement request to that
effect, or do you want a new request for that?

Once that is available, a question will be whether, by default,
`dired-find-file' and `find-file' should open an archive file in
archive mode or should open Dired on (a temporary extraction of) it.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25076; Package emacs. (Fri, 02 Dec 2016 16:20:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: alan <at> idiocy.org, 25076 <at> debbugs.gnu.org
Subject: Re: bug#25076: 24.5; Enhancement request: Make `archive-mode' more
 Dired like (sorting etc.)
Date: Fri, 02 Dec 2016 18:19:47 +0200
> Date: Fri, 2 Dec 2016 08:13:00 -0800 (PST)
> From: Drew Adams <drew.adams <at> oracle.com>
> Cc: alan <at> idiocy.org, 25076 <at> debbugs.gnu.org
> 
> I think opening Dired on a temporary extraction is probably the
> way to go.  Do you want to rename this enhancement request to that
> effect, or do you want a new request for that?

No, I think the current request is fine.  Especially since Michael
suggested a different solution, using file handlers.

> Once that is available, a question will be whether, by default,
> `dired-find-file' and `find-file' should open an archive file in
> archive mode or should open Dired on (a temporary extraction of) it.

Not sure.  Probably should be a user option.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25076; Package emacs. (Fri, 02 Dec 2016 16:25:01 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: Eli Zaretskii <eliz <at> gnu.org>, Drew Adams <drew.adams <at> oracle.com>
Cc: alan <at> idiocy.org, 25076 <at> debbugs.gnu.org
Subject: RE: bug#25076: 24.5; Enhancement request: Make `archive-mode' more
 Dired like (sorting etc.)
Date: Fri, 2 Dec 2016 08:24:07 -0800 (PST)
> > I think opening Dired on a temporary extraction is probably the
> > way to go.  Do you want to rename this enhancement request to that
> > effect, or do you want a new request for that?
> 
> No, I think the current request is fine.  Especially since Michael
> suggested a different solution, using file handlers.

OK.

> > Once that is available, a question will be whether, by default,
> > `dired-find-file' and `find-file' should open an archive file in
> > archive mode or should open Dired on (a temporary extraction of)
> > it.
> 
> Not sure.  Probably should be a user option.

We already have `auto-mode-alist', for customization.  I was talking
about the default behavior.

This is what I see in currently `auto-mode-alist' (in my setup, at
least) for `archive-mode':

("\\.\\(arc\\|zip\\|lzh\\|lha\\|zoo\\|[jew]ar\\|xpi\\|rar\\|7z\\|
ARC\\|ZIP\\|LZH\\|LHA\\|ZOO\\|[JEW]AR\\|XPI\\|RAR\\|7Z\\)\\'"
 . archive-mode)
("\\.oxt\\'" . archive-mode)
("\\.\\(deb\\|[oi]pk\\)\\'" . archive-mode)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25076; Package emacs. (Sun, 04 Dec 2016 18:44:02 GMT) Full text and rfc822 format available.

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

From: Hong Xu <hong <at> topbug.net>
To: " 25076 <at> debbugs.gnu.org" <25076 <at> debbugs.gnu.org>
Subject: One possible solution: dired-avfs
Date: Sun, 04 Dec 2016 10:43:50 -0800
[Message part 1 (text/plain, inline)]
dired-avfs [1] may be one possible solution to avoid full extraction. HTH

[1]: https://github.com/Fuco1/dired-hacks/blob/master/dired-avfs.el
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25076; Package emacs. (Thu, 03 Feb 2022 20:39:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: Alan Third <alan <at> idiocy.org>, 25076 <at> debbugs.gnu.org,
 Drew Adams <drew.adams <at> oracle.com>
Subject: Re: bug#25076: 24.5; Enhancement request: Make `archive-mode' more
 Dired like (sorting etc.)
Date: Thu, 03 Feb 2022 21:38:00 +0100
Michael Albinus <michael.albinus <at> gmx.de> writes:

> The clean solution would be to add a file name handler for
> archives. Several primitive functions need to be implemented; one of
> them would be `insert-directory’.

I see that Tramp has support for archives on systems with GVFS (Gnome
stuff).  I'm running on a Gnome system, so I expected this to just work,
but...  opening a zip file opens it in archive-mode.  I read the manual
section on this, but it doesn't seem to say what's needed for this to
work?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25076; Package emacs. (Thu, 03 Feb 2022 23:15:02 GMT) Full text and rfc822 format available.

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

From: Kévin Le Gouguec <kevin.legouguec <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Alan Third <alan <at> idiocy.org>, Michael Albinus <michael.albinus <at> gmx.de>,
 25076 <at> debbugs.gnu.org
Subject: Re: bug#25076: 24.5; Enhancement request: Make `archive-mode' more
 Dired like (sorting etc.)
Date: Fri, 04 Feb 2022 00:14:34 +0100
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Michael Albinus <michael.albinus <at> gmx.de> writes:
>
>> The clean solution would be to add a file name handler for
>> archives. Several primitive functions need to be implemented; one of
>> them would be `insert-directory’.
>
> I see that Tramp has support for archives on systems with GVFS (Gnome
> stuff).  I'm running on a Gnome system, so I expected this to just work,
> but...  opening a zip file opens it in archive-mode.  I read the manual
> section on this, but it doesn't seem to say what's needed for this to
> work?

The trick is to add a trailing '/' to the filename before visiting it, I
think?  (The mnemonic being "open this as if it were a folder", IIUC)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25076; Package emacs. (Sat, 05 Feb 2022 06:28:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Kévin Le Gouguec <kevin.legouguec <at> gmail.com>
Cc: Alan Third <alan <at> idiocy.org>, Michael Albinus <michael.albinus <at> gmx.de>,
 25076 <at> debbugs.gnu.org
Subject: Re: bug#25076: 24.5; Enhancement request: Make `archive-mode' more
 Dired like (sorting etc.)
Date: Sat, 05 Feb 2022 07:27:45 +0100
Kévin Le Gouguec <kevin.legouguec <at> gmail.com> writes:

> The trick is to add a trailing '/' to the filename before visiting it, I
> think?  (The mnemonic being "open this as if it were a folder", IIUC)

Ah, thanks.  I've now added this to the Archive file names section in
the tramp manual.

As for the request in this bug report (which is basically "make
archive-mode better"), I don't think that's actionable enough for the
bug tracker, so I'm closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug closed, send any further explanations to 25076 <at> debbugs.gnu.org and Drew Adams <drew.adams <at> oracle.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 05 Feb 2022 06:29:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25076; Package emacs. (Sat, 05 Feb 2022 16:03:02 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>, Kévin Le Gouguec
 <kevin.legouguec <at> gmail.com>
Cc: Alan Third <alan <at> idiocy.org>, Michael Albinus <michael.albinus <at> gmx.de>,
 "25076 <at> debbugs.gnu.org" <25076 <at> debbugs.gnu.org>
Subject: RE: [External] : bug#25076: 24.5; Enhancement request: Make
 `archive-mode' more Dired like (sorting etc.)
Date: Sat, 5 Feb 2022 16:02:17 +0000
> > The trick is to add a trailing '/' to the filename before visiting it, I
> > think?  (The mnemonic being "open this as if it were a folder", IIUC)
> 
> Ah, thanks.  I've now added this to the Archive file names section in
> the tramp manual.
> 
> As for the request in this bug report (which is basically "make
> archive-mode better"),

That's not true.

More than one concrete proposal was discussed,
And the initial bug report lists being able to
sort as one concrete improvement needed.

> I don't think that's actionable enough for the
> bug tracker, so I'm closing this bug report.

Too bad.  Please mark this bug honestly then,
as "won't fix".  What was requested is not at
all "done".


bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 06 Mar 2022 12:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 52 days ago.

Previous Next


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