unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#25076: 24.5; Enhancement request: Make `archive-mode' more Dired like (sorting etc.)
@ 2016-11-30 18:36 Drew Adams
  2016-12-01 19:57 ` Alan Third
  2016-12-04 18:43 ` bug#25076: One possible solution: dired-avfs Hong Xu
  0 siblings, 2 replies; 12+ messages in thread
From: Drew Adams @ 2016-11-30 18:36 UTC (permalink / raw)
  To: 25076

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'





^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#25076: 24.5; Enhancement request: Make `archive-mode' more Dired like (sorting etc.)
  2016-11-30 18:36 bug#25076: 24.5; Enhancement request: Make `archive-mode' more Dired like (sorting etc.) Drew Adams
@ 2016-12-01 19:57 ` Alan Third
  2016-12-01 20:14   ` Drew Adams
  2016-12-02  8:47   ` Michael Albinus
  2016-12-04 18:43 ` bug#25076: One possible solution: dired-avfs Hong Xu
  1 sibling, 2 replies; 12+ messages in thread
From: Alan Third @ 2016-12-01 19:57 UTC (permalink / raw)
  To: Drew Adams; +Cc: 25076

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





^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#25076: 24.5; Enhancement request: Make `archive-mode' more Dired like (sorting etc.)
  2016-12-01 19:57 ` Alan Third
@ 2016-12-01 20:14   ` Drew Adams
  2016-12-02  7:15     ` Eli Zaretskii
  2016-12-02  8:47   ` Michael Albinus
  1 sibling, 1 reply; 12+ messages in thread
From: Drew Adams @ 2016-12-01 20:14 UTC (permalink / raw)
  To: Alan Third; +Cc: 25076

> > 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.





^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#25076: 24.5; Enhancement request: Make `archive-mode' more Dired like (sorting etc.)
  2016-12-01 20:14   ` Drew Adams
@ 2016-12-02  7:15     ` Eli Zaretskii
  2016-12-02 16:13       ` Drew Adams
  0 siblings, 1 reply; 12+ messages in thread
From: Eli Zaretskii @ 2016-12-02  7:15 UTC (permalink / raw)
  To: Drew Adams; +Cc: alan, 25076

> Date: Thu, 1 Dec 2016 12:14:34 -0800 (PST)
> From: Drew Adams <drew.adams@oracle.com>
> Cc: 25076@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.





^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#25076: 24.5; Enhancement request: Make `archive-mode' more Dired like (sorting etc.)
  2016-12-01 19:57 ` Alan Third
  2016-12-01 20:14   ` Drew Adams
@ 2016-12-02  8:47   ` Michael Albinus
  2022-02-03 20:38     ` Lars Ingebrigtsen
  1 sibling, 1 reply; 12+ messages in thread
From: Michael Albinus @ 2016-12-02  8:47 UTC (permalink / raw)
  To: Alan Third; +Cc: 25076

Alan Third <alan@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.





^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#25076: 24.5; Enhancement request: Make `archive-mode' more Dired like (sorting etc.)
  2016-12-02  7:15     ` Eli Zaretskii
@ 2016-12-02 16:13       ` Drew Adams
  2016-12-02 16:19         ` Eli Zaretskii
  0 siblings, 1 reply; 12+ messages in thread
From: Drew Adams @ 2016-12-02 16:13 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: alan, 25076

> > > > 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.





^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#25076: 24.5; Enhancement request: Make `archive-mode' more Dired like (sorting etc.)
  2016-12-02 16:13       ` Drew Adams
@ 2016-12-02 16:19         ` Eli Zaretskii
  0 siblings, 0 replies; 12+ messages in thread
From: Eli Zaretskii @ 2016-12-02 16:19 UTC (permalink / raw)
  To: Drew Adams; +Cc: alan, 25076

> Date: Fri, 2 Dec 2016 08:13:00 -0800 (PST)
> From: Drew Adams <drew.adams@oracle.com>
> Cc: alan@idiocy.org, 25076@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.






^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#25076: One possible solution: dired-avfs
  2016-11-30 18:36 bug#25076: 24.5; Enhancement request: Make `archive-mode' more Dired like (sorting etc.) Drew Adams
  2016-12-01 19:57 ` Alan Third
@ 2016-12-04 18:43 ` Hong Xu
  1 sibling, 0 replies; 12+ messages in thread
From: Hong Xu @ 2016-12-04 18:43 UTC (permalink / raw)
  To:  25076@debbugs.gnu.org

[-- Attachment #1: Type: text/plain, Size: 142 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 331 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#25076: 24.5; Enhancement request: Make `archive-mode' more Dired like (sorting etc.)
  2016-12-02  8:47   ` Michael Albinus
@ 2022-02-03 20:38     ` Lars Ingebrigtsen
  2022-02-03 23:14       ` Kévin Le Gouguec
  0 siblings, 1 reply; 12+ messages in thread
From: Lars Ingebrigtsen @ 2022-02-03 20:38 UTC (permalink / raw)
  To: Michael Albinus; +Cc: Alan Third, 25076

Michael Albinus <michael.albinus@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





^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#25076: 24.5; Enhancement request: Make `archive-mode' more Dired like (sorting etc.)
  2022-02-03 20:38     ` Lars Ingebrigtsen
@ 2022-02-03 23:14       ` Kévin Le Gouguec
  2022-02-05  6:27         ` Lars Ingebrigtsen
  0 siblings, 1 reply; 12+ messages in thread
From: Kévin Le Gouguec @ 2022-02-03 23:14 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: Alan Third, Michael Albinus, 25076

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Michael Albinus <michael.albinus@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)





^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#25076: 24.5; Enhancement request: Make `archive-mode' more Dired like (sorting etc.)
  2022-02-03 23:14       ` Kévin Le Gouguec
@ 2022-02-05  6:27         ` Lars Ingebrigtsen
  2022-02-05 16:02           ` bug#25076: [External] : " Drew Adams
  0 siblings, 1 reply; 12+ messages in thread
From: Lars Ingebrigtsen @ 2022-02-05  6:27 UTC (permalink / raw)
  To: Kévin Le Gouguec; +Cc: Alan Third, Michael Albinus, 25076

Kévin Le Gouguec <kevin.legouguec@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





^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#25076: [External] : bug#25076: 24.5; Enhancement request: Make `archive-mode' more Dired like (sorting etc.)
  2022-02-05  6:27         ` Lars Ingebrigtsen
@ 2022-02-05 16:02           ` Drew Adams
  0 siblings, 0 replies; 12+ messages in thread
From: Drew Adams @ 2022-02-05 16:02 UTC (permalink / raw)
  To: Lars Ingebrigtsen, Kévin Le Gouguec
  Cc: Alan Third, Michael Albinus, 25076@debbugs.gnu.org

> > 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".


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2022-02-05 16:02 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-30 18:36 bug#25076: 24.5; Enhancement request: Make `archive-mode' more Dired like (sorting etc.) Drew Adams
2016-12-01 19:57 ` Alan Third
2016-12-01 20:14   ` Drew Adams
2016-12-02  7:15     ` Eli Zaretskii
2016-12-02 16:13       ` Drew Adams
2016-12-02 16:19         ` Eli Zaretskii
2016-12-02  8:47   ` Michael Albinus
2022-02-03 20:38     ` Lars Ingebrigtsen
2022-02-03 23:14       ` Kévin Le Gouguec
2022-02-05  6:27         ` Lars Ingebrigtsen
2022-02-05 16:02           ` bug#25076: [External] : " Drew Adams
2016-12-04 18:43 ` bug#25076: One possible solution: dired-avfs Hong Xu

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).