From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.bugs Subject: bug#34387: 26.1; Gnus: handle empty message parts Date: Wed, 13 Feb 2019 13:53:34 +0900 Organization: Emacsen advocacy group Message-ID: References: <87ef8igwdw.fsf@poincare.umons.ac.be> <87ftstea3o.fsf@poincare.umons.ac.be> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="131939"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-cygwin) Cc: 34387@debbugs.gnu.org To: Christophe.Troestler@umons.ac.be Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Feb 13 06:03:10 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gtmhR-000YCX-VI for geb-bug-gnu-emacs@m.gmane.org; Wed, 13 Feb 2019 06:03:10 +0100 Original-Received: from localhost ([127.0.0.1]:50900 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gtmhQ-0004jN-Ji for geb-bug-gnu-emacs@m.gmane.org; Wed, 13 Feb 2019 00:03:08 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:41207) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gtmhF-0004dl-JQ for bug-gnu-emacs@gnu.org; Wed, 13 Feb 2019 00:02:58 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gtmYc-0000Dm-DC for bug-gnu-emacs@gnu.org; Tue, 12 Feb 2019 23:54:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46428) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gtmYc-0000De-8N for bug-gnu-emacs@gnu.org; Tue, 12 Feb 2019 23:54:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gtmYc-0007ai-3E for bug-gnu-emacs@gnu.org; Tue, 12 Feb 2019 23:54:02 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: <87ef8igwdw.fsf@poincare.umons.ac.be> Resent-From: Katsumi Yamaoka Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 13 Feb 2019 04:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34387 X-GNU-PR-Package: emacs Original-Received: via spool by 34387-submit@debbugs.gnu.org id=B34387.155003362629152 (code B ref 34387); Wed, 13 Feb 2019 04:54:02 +0000 Original-Received: (at 34387) by debbugs.gnu.org; 13 Feb 2019 04:53:46 +0000 Original-Received: from localhost ([127.0.0.1]:45709 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gtmYL-0007a7-Pg for submit@debbugs.gnu.org; Tue, 12 Feb 2019 23:53:46 -0500 Original-Received: from otter.birch.relay.mailchannels.net ([23.83.209.139]:20399) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gtmYJ-0007Zw-FB for 34387@debbugs.gnu.org; Tue, 12 Feb 2019 23:53:44 -0500 X-Sender-Id: tih5qno0ow|x-authuser|yamaoka@hampton.hostforweb.net Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id AC6425C3A7E; Wed, 13 Feb 2019 04:53:40 +0000 (UTC) Original-Received: from hampton.hostforweb.net (unknown [100.96.19.74]) (Authenticated sender: tih5qno0ow) by relay.mailchannels.net (Postfix) with ESMTPA id 0B4365C3566; Wed, 13 Feb 2019 04:53:39 +0000 (UTC) X-Sender-Id: tih5qno0ow|x-authuser|yamaoka@hampton.hostforweb.net Original-Received: from hampton.hostforweb.net (hampton.hostforweb.net [172.245.115.217]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.16.2); Wed, 13 Feb 2019 04:53:40 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: tih5qno0ow|x-authuser|yamaoka@hampton.hostforweb.net X-MailChannels-Auth-Id: tih5qno0ow X-Relation-Shade: 4248eb501782e154_1550033620484_445004500 X-MC-Loop-Signature: 1550033620484:147377380 X-MC-Ingress-Time: 1550033620484 Original-Received: from s70.gtokyofl21.vectant.ne.jp ([202.215.75.70]:60000 helo=localhost) by hampton.hostforweb.net with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89_1) (envelope-from ) id 1gtmYB-00BAYm-9a; Tue, 12 Feb 2019 22:53:36 -0600 X-Face: #kKnN,xUnmKia.'[pp`; Omh}odZK)?7wQSl"4o04=EixTF+V[""w~iNbM9ZL+.b*_CxUmFk B#Fu[*?MZZH@IkN:!"\w%I_zt>[$nm7nQosZ<3eu; B:$Q_:p!',P.c0-_Cy[dz4oIpw0ESA^D*1Lw= L&i*6&( Cancel-Lock: sha1:DBXMr9Lv2en0YlvUuuz99eugRf0= X-OutGoing-Spam-Status: No, score=-0.2 X-AuthUser: yamaoka@hampton.hostforweb.net 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: 209.51.188.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:155392 Archived-At: On Tue, 12 Feb 2019 08:31:39 +0100, Christophe Troestler wrote: > Here is the debugger trace (message attached) : > Debugger entered--Lisp error: (args-out-of-range 4409 4410) > #f(compiled-function...)(PART1) > apply(#f(compiled-function...) PART1) > gnus-mime-display-single@fix(#f(compiled-function...) PART1) > apply(gnus-mime-display-single@fix #f(compiled-function...) PART1) > gnus-mime-display-single(PART1) > gnus-mime-display-part(PART1) > mapcar(gnus-mime-display-part (PART1 PART2)) > gnus-mime-display-mixed((PART1 PART2)) > gnus-mime-display-part((...PART1 PART2)) > gnus-display-mime() > gnus-article-prepare-display() ;; Where PART1 is the html part and PART2 is the pdf part. If it is (narrow-to-region beg (point)) in gnus-mime-display-single to issue (args-out-of-range 4409 4410), I guess an html rendering function deletes buffer's contents so that the buffer's end point may be 4409. Here is a model to reproduce the same error: (with-temp-buffer ;; article buffer (insert-char ?x 4409) (let ((beg (point))) ;; buffer's end point =3D=3D 4410 (delete-char -1) ;; html function does this (narrow-to-region beg (point)))) =3D> (args-out-of-range 4409 4410) The default html function is mm-shr, that gnus-mime-display-single calls by way of mm-display-part, mm-display-inline, and mm-inline-text-html. At that time, the point is positioned at the end of the article buffer, where the header lines and a single empty line are there. >> Otherwise, could you show me a sample email in question? [=E2=80=A6] > Attached. Thanks. However, I couldn't reproduce the error with the mail that I copied to my nnml group. I tried it using Emacs 26.1 with no ~/.emacs, no ~/.gnus.el, but ~/.newsrc.eld, (setq gnus-select-method '(nnnil)), and every candidate for mm-text-html-renderer. The only thing that reproduces it is: (defadvice mm-shr (before delete-ceiling-newlines activate) "Delete newlines before the point." (skip-chars-backward "\n") (delete-region (point) (point-max))) Well, if you have time for analyzing the problem, don't you try edebug on the functions listed above? Regards, ;; I'm going to fix the other 2 issues anyway.