GNU bug report logs - #1702
feature request: correctly display single file zip archive

Previous Next

Package: emacs;

Reported by: xah lee <xah <at> xahlee.org>

Date: Thu, 25 Dec 2008 18:40:04 UTC

Severity: wishlist

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Matthew Leach <matthew <at> mattleach.net>
Cc: xah <at> xahlee.org, 1702 <at> debbugs.gnu.org, cyd <at> stupidchicken.com
Subject: bug#1702: [PATCH]: feature request: correctly display single file zip	archive
Date: Thu, 13 Nov 2014 20:50:26 +0200
> From: Matthew Leach <matthew <at> mattleach.net>
> Date: Thu, 13 Nov 2014 18:39:43 +0000
> Cc: 1702 <at> debbugs.gnu.org, Chong Yidong <cyd <at> stupidchicken.com>
> 
> xah lee <xah <at> xahlee.org> writes:
> 
> > When opening a zip archive of a single file, emacs displays the zip
> > archive's index (which is just a single file), as opposed to the
> > decompressed file content.
> >
> > I think when the zip file is a single file, it is more useful to
> > display file content and allow transparent editing.
> 
> Please see the attached patch to implement this.

Thanks.

> Any comments welcome!

A comment: if the default is indeed going to be to automatically visit
such a compressed file (and I personally am not convinced it should),
then this is a user-visible change in behavior, so it should be
mentioned in NEWS, and the entry should describe how to get the old
behavior back.

> +(defcustom singular-file-archive-action 'visit-file
> +  "When opening an archive that contains a single file choose
> +whether to open the file or display the archive summary."

We use a certain style in doc strings of options: the first line
should be a complete sentence.  In addition, option names should begin
with the name of the package.

Also, this is just a boolean yes/no option, so no need to use a symbol
as its value.  Therefor, I suggest:

  (defcustom archive-visit-single-files t
    "If non-nil, opening an archive with a single file visits that file.

  If this option's value is nil, visiting such archives will display
  the archive summary."

(and the corresponding change in the code).




This bug report was last modified 10 years and 264 days ago.

Previous Next


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