From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#33133: 26.1.50; zlib-decompress-region too rigid Date: Sun, 28 Oct 2018 17:41:17 +0200 Message-ID: <837ei2m63m.fsf@gnu.org> References: <87a7n4mbos.fsf@gmail.com> <87efcbjc2d.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1540741214 16867 195.159.176.226 (28 Oct 2018 15:40:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 28 Oct 2018 15:40:14 +0000 (UTC) Cc: user42_kevin@yahoo.com.au, yamaoka@jpl.org, 33133@debbugs.gnu.org To: Noam Postavsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Oct 28 16:40:09 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gGnAf-0004Ik-4F for geb-bug-gnu-emacs@m.gmane.org; Sun, 28 Oct 2018 16:40:09 +0100 Original-Received: from localhost ([::1]:40515 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gGnCl-00067z-BH for geb-bug-gnu-emacs@m.gmane.org; Sun, 28 Oct 2018 11:42:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56986) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gGnCd-00067h-Va for bug-gnu-emacs@gnu.org; Sun, 28 Oct 2018 11:42:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gGnCW-0008QK-S6 for bug-gnu-emacs@gnu.org; Sun, 28 Oct 2018 11:42:10 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:44925) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gGnCV-0008Pp-Ml for bug-gnu-emacs@gnu.org; Sun, 28 Oct 2018 11:42:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gGnCU-0007uH-GH for bug-gnu-emacs@gnu.org; Sun, 28 Oct 2018 11:42:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 28 Oct 2018 15:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33133 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 33133-submit@debbugs.gnu.org id=B33133.154074128730346 (code B ref 33133); Sun, 28 Oct 2018 15:42:02 +0000 Original-Received: (at 33133) by debbugs.gnu.org; 28 Oct 2018 15:41:27 +0000 Original-Received: from localhost ([127.0.0.1]:49183 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gGnBv-0007tN-10 for submit@debbugs.gnu.org; Sun, 28 Oct 2018 11:41:27 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:47210) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gGnBs-0007tA-Qq for 33133@debbugs.gnu.org; Sun, 28 Oct 2018 11:41:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gGnBi-0007rZ-32 for 33133@debbugs.gnu.org; Sun, 28 Oct 2018 11:41:18 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:49005) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gGnBe-0007pk-MR; Sun, 28 Oct 2018 11:41:12 -0400 Original-Received: from [176.228.60.248] (port=3009 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gGnBe-00084l-8s; Sun, 28 Oct 2018 11:41:10 -0400 In-reply-to: <87efcbjc2d.fsf@gmail.com> (message from Noam Postavsky on Sat, 27 Oct 2018 17:48:26 -0400) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:151745 Archived-At: > From: Noam Postavsky > Date: Sat, 27 Oct 2018 17:48:26 -0400 > Cc: Kevin Ryde , 33133@debbugs.gnu.org > > Here's a proper patch. Thanks. I have a few comments: > +data. If @var{allow-partial} is @code{nil}, on failure, the function We usually say "nil or omitted" for optional arguments. Also, I'd say "then on failure, ...", otherwise this could be misinterpreted as if "on failure" qualifies the "is nil" part. Same comment regarding the doc string of the function. > +leaves the region unchanged and returns @code{nil}. Otherwise, it > +returns the number of bytes that were not decompressed and replaces > +the region text by whatever data was successfully decompressed. This > +function can be called only in unibyte buffers. Maybe it would make sense here to say that this emulates what 'gzip' does? > + Lisp_Object ret = Qt; > if (inflate_status != Z_STREAM_END) > - return unbind_to (count, Qnil); > + { > + if (!NILP (allow_partial)) > + ret = make_int (iend - pos_byte); > + else > + return unbind_to (count, Qnil); > + } Hmm... should we display a warning message, like gzip does?