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: Thu, 14 Feb 2019 08:20:20 +0900 Organization: Emacsen advocacy group Message-ID: References: <87ef8igwdw.fsf@poincare.umons.ac.be> <87ftstea3o.fsf@poincare.umons.ac.be> <874l97bnvv.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="10100"; 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 Thu Feb 14 00:21:13 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 1gu3q4-0002Rv-B7 for geb-bug-gnu-emacs@m.gmane.org; Thu, 14 Feb 2019 00:21:12 +0100 Original-Received: from localhost ([127.0.0.1]:36526 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gu3q3-0001O7-6p for geb-bug-gnu-emacs@m.gmane.org; Wed, 13 Feb 2019 18:21:11 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:44922) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gu3pv-0001Nz-Bi for bug-gnu-emacs@gnu.org; Wed, 13 Feb 2019 18:21:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gu3pu-0002gB-Eg for bug-gnu-emacs@gnu.org; Wed, 13 Feb 2019 18:21:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48193) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gu3pu-0002fs-AC for bug-gnu-emacs@gnu.org; Wed, 13 Feb 2019 18:21:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gu3pu-0007X1-4p for bug-gnu-emacs@gnu.org; Wed, 13 Feb 2019 18:21: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 23:21: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.155010003328895 (code B ref 34387); Wed, 13 Feb 2019 23:21:02 +0000 Original-Received: (at 34387) by debbugs.gnu.org; 13 Feb 2019 23:20:33 +0000 Original-Received: from localhost ([127.0.0.1]:47474 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gu3pQ-0007Vy-T0 for submit@debbugs.gnu.org; Wed, 13 Feb 2019 18:20:33 -0500 Original-Received: from common.maple.relay.mailchannels.net ([23.83.214.38]:61844) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gu3pO-0007Vp-Bj for 34387@debbugs.gnu.org; Wed, 13 Feb 2019 18:20:31 -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 BFA3D44501; Wed, 13 Feb 2019 23:20:25 +0000 (UTC) Original-Received: from hampton.hostforweb.net (unknown [100.96.26.166]) (Authenticated sender: tih5qno0ow) by relay.mailchannels.net (Postfix) with ESMTPA id 48FB644397; Wed, 13 Feb 2019 23:20:25 +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 23:20:25 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: tih5qno0ow|x-authuser|yamaoka@hampton.hostforweb.net X-MailChannels-Auth-Id: tih5qno0ow X-Fumbling-Little: 41a0479d0668f7d6_1550100025623_1105479441 X-MC-Loop-Signature: 1550100025623:3895777344 X-MC-Ingress-Time: 1550100025623 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 1gu3pG-00G1r2-8K; Wed, 13 Feb 2019 17:20:23 -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:a1gK1Hj3QzXMP2/Piv1x2HU23Q0= 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:155405 Archived-At: On Wed, 13 Feb 2019 18:26:44 +0100, Christophe Troestler wrote: > Thanks for your analysis. I indeed had an advice executed after > mm-shr to remove trailing whitespace=E2=80=94these making sometimes the > rendered text hard to read. Deleting the advice makes the call > work. Bingo! :) > What approach would you recommend to remove trailing whitespace > after rendering HTML? The point would be to delete only whitespace that mm-shr inserts. How about this? (defadvice mm-shr (around delete-leading-and-trailing-whitespace activate) "Delete leading and trailing whitespace in Gnus article buffer." (when (derived-mode-p 'gnus-article-mode) (save-restriction (narrow-to-region (point) (point)) ad-do-it (goto-char (point-min)) (skip-chars-forward "\t\n ") (delete-region (point-min) (point)) (goto-char (point-max)) (skip-chars-backward "\t\n ") (delete-region (point) (point-max)) (insert "\n")))) I'll close this thread after fixing the other two related bugs. > 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. Regards,