From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#1702: [PATCH]: feature request: correctly display single file zip archive Date: Thu, 13 Nov 2014 20:50:26 +0200 Message-ID: <83ppcrj5ot.fsf@gnu.org> References: <87lju1hv7b.fsf@cyd.mit.edu> <13EFAAB6-C6B3-4F67-A39A-5266E91A0CD5@xahlee.org> <87wq6zj66o.fsf_-_@loki.home> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1415904686 3813 80.91.229.3 (13 Nov 2014 18:51:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 13 Nov 2014 18:51:26 +0000 (UTC) Cc: xah@xahlee.org, 1702@debbugs.gnu.org, cyd@stupidchicken.com To: Matthew Leach Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Nov 13 19:51:19 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XozUE-00037S-CH for geb-bug-gnu-emacs@m.gmane.org; Thu, 13 Nov 2014 19:51:18 +0100 Original-Received: from localhost ([::1]:33468 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XozUE-0005mq-0M for geb-bug-gnu-emacs@m.gmane.org; Thu, 13 Nov 2014 13:51:18 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34621) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XozU6-0005mi-KL for bug-gnu-emacs@gnu.org; Thu, 13 Nov 2014 13:51:15 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XozTy-00086Q-03 for bug-gnu-emacs@gnu.org; Thu, 13 Nov 2014 13:51:10 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:34253) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XozTx-00086M-SU for bug-gnu-emacs@gnu.org; Thu, 13 Nov 2014 13:51:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XozTx-0007cS-LL for bug-gnu-emacs@gnu.org; Thu, 13 Nov 2014 13:51:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 13 Nov 2014 18:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 1702 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 1702-submit@debbugs.gnu.org id=B1702.141590463229251 (code B ref 1702); Thu, 13 Nov 2014 18:51:01 +0000 Original-Received: (at 1702) by debbugs.gnu.org; 13 Nov 2014 18:50:32 +0000 Original-Received: from localhost ([127.0.0.1]:59699 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XozTT-0007bi-E0 for submit@debbugs.gnu.org; Thu, 13 Nov 2014 13:50:31 -0500 Original-Received: from mtaout25.012.net.il ([80.179.55.181]:48566) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XozTQ-0007bY-Sd for 1702@debbugs.gnu.org; Thu, 13 Nov 2014 13:50:30 -0500 Original-Received: from conversion-daemon.mtaout25.012.net.il by mtaout25.012.net.il (HyperSendmail v2007.08) id <0NEZ00F00QKNO500@mtaout25.012.net.il> for 1702@debbugs.gnu.org; Thu, 13 Nov 2014 20:46:03 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout25.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NEZ007GPQSQL280@mtaout25.012.net.il>; Thu, 13 Nov 2014 20:46:03 +0200 (IST) In-reply-to: <87wq6zj66o.fsf_-_@loki.home> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:95944 > From: Matthew Leach > Date: Thu, 13 Nov 2014 18:39:43 +0000 > Cc: 1702@debbugs.gnu.org, Chong Yidong > > xah lee 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).