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: Tue, 12 Feb 2019 13:34:09 +0900 Organization: Emacsen advocacy group Message-ID: References: <87ef8igwdw.fsf@poincare.umons.ac.be> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="262932"; 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 Tue Feb 12 05:35:17 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 1gtPmv-0016FZ-3K for geb-bug-gnu-emacs@m.gmane.org; Tue, 12 Feb 2019 05:35:17 +0100 Original-Received: from localhost ([127.0.0.1]:32902 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gtPmu-0007If-42 for geb-bug-gnu-emacs@m.gmane.org; Mon, 11 Feb 2019 23:35:16 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:46448) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gtPmi-0007HE-Ag for bug-gnu-emacs@gnu.org; Mon, 11 Feb 2019 23:35:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gtPmg-0007nQ-LO for bug-gnu-emacs@gnu.org; Mon, 11 Feb 2019 23:35:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45039) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gtPmg-0007kt-6H for bug-gnu-emacs@gnu.org; Mon, 11 Feb 2019 23:35:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gtPmf-0002QW-NO for bug-gnu-emacs@gnu.org; Mon, 11 Feb 2019 23:35:01 -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: Tue, 12 Feb 2019 04:35:01 +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.15499460619268 (code B ref 34387); Tue, 12 Feb 2019 04:35:01 +0000 Original-Received: (at 34387) by debbugs.gnu.org; 12 Feb 2019 04:34:21 +0000 Original-Received: from localhost ([127.0.0.1]:44320 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gtPm0-0002PO-LX for submit@debbugs.gnu.org; Mon, 11 Feb 2019 23:34:20 -0500 Original-Received: from palegreen.birch.relay.mailchannels.net ([23.83.209.140]:27358) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gtPlx-0002PD-LS for 34387@debbugs.gnu.org; Mon, 11 Feb 2019 23:34:18 -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 DEF025C3E0B; Tue, 12 Feb 2019 04:34:15 +0000 (UTC) Original-Received: from hampton.hostforweb.net (unknown [100.96.36.160]) (Authenticated sender: tih5qno0ow) by relay.mailchannels.net (Postfix) with ESMTPA id 5DA495C2EAB; Tue, 12 Feb 2019 04:34:15 +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); Tue, 12 Feb 2019 04:34:15 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: tih5qno0ow|x-authuser|yamaoka@hampton.hostforweb.net X-MailChannels-Auth-Id: tih5qno0ow X-Grain-Occur: 24b60c6d770a7bef_1549946055699_3689105095 X-MC-Loop-Signature: 1549946055699:2814155687 X-MC-Ingress-Time: 1549946055699 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 1gtPlr-003zeD-6o; Mon, 11 Feb 2019 22:34:12 -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:GvnymBAibDoe/2FPhEvclKVppSs= 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:155369 Archived-At: On Fri, 08 Feb 2019 15:58:19 +0100, Christophe Troestler wrote: > Some messages only contain an attachment (no body) and > (gnus-article-prepare-display) choke on the empty part. > More specifically, `gnus-mime-display-single' does > (narrow-to-region beg (point)) which fails if the part is empty. Could you let me know how it fails? Otherwise, could you show me a sample email in question? Unfortunately I'm not successful in making such an email that causes the problem so far, and trying (narrow-to-region beg beg) and (narrow-to-region (point) (point)) cause nothing special. But I found at least two other kinds of problems in relation to an empty attachment: 1. In the article buffer, pressing the RET key on an empty text/plain attachment conceals the succeeding other attachments, does not toggle. `g' restores them of course, though. 2. Some kind of an empty mail isn't able to be edited using the `e' command (gnus-summary-edit-article), that is, a single part email whose body is an empty attachment. Gnus misunderstands that the header is its body. On Fri, 08 Feb 2019 16:39:47 +0100, Christophe Troestler wrote: > For those who encounter this problem, a fix that does not require to > modify the body of the function gnus-mime-display-single is: > (define-advice gnus-mime-display-single (:around (oldfn &rest handle) fix) > "Protect against bad handling of empty message parts." > (ignore-errors (apply oldfn handle))) I'd like to fix those problems in the Gnus code. :) Thanks. Regards,