unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Matthew Leach <matthew@mattleach.net>
Cc: xah@xahlee.org, 1702@debbugs.gnu.org, cyd@stupidchicken.com
Subject: bug#1702: [PATCH]: feature request: correctly display single file zip	archive
Date: Thu, 13 Nov 2014 20:50:26 +0200	[thread overview]
Message-ID: <83ppcrj5ot.fsf@gnu.org> (raw)
In-Reply-To: <87wq6zj66o.fsf_-_@loki.home>

> From: Matthew Leach <matthew@mattleach.net>
> Date: Thu, 13 Nov 2014 18:39:43 +0000
> Cc: 1702@debbugs.gnu.org, Chong Yidong <cyd@stupidchicken.com>
> 
> xah lee <xah@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).





  reply	other threads:[~2014-11-13 18:50 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-28  2:47 bug#1702: feature request: correctly display single file zip archive Chong Yidong
2009-01-16 20:09 ` xah lee
2014-11-13 18:39   ` bug#1702: [PATCH]: " Matthew Leach
2014-11-13 18:50     ` Eli Zaretskii [this message]
2014-11-13 19:26       ` Matthew Leach
2014-11-13 19:39         ` Eli Zaretskii
2014-11-13 20:03           ` Matthew Leach
2014-11-13 20:25             ` Eli Zaretskii
2014-11-13 20:50               ` Matthew Leach
2014-11-14  5:27                 ` Eli Zaretskii
2014-11-14 11:06                   ` Matthew Leach
2014-11-14 11:31                     ` Matthew Leach
2014-11-18 13:04                       ` Daniel Colascione
2014-11-18 20:12                         ` Matthew Leach
2014-11-21 10:10                           ` Eli Zaretskii
2014-11-13 19:51         ` Lars Magne Ingebrigtsen
2008-12-25 18:30           ` bug#1702: " xah lee
2014-11-18 13:22             ` bug#1702: [PATCH]: " Rasmus
2014-11-13 19:58           ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83ppcrj5ot.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=1702@debbugs.gnu.org \
    --cc=cyd@stupidchicken.com \
    --cc=matthew@mattleach.net \
    --cc=xah@xahlee.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).