GNU bug report logs - #34387
26.1; Gnus: handle empty message parts

Previous Next

Package: emacs;

Reported by: Christophe Troestler <Christophe.Troestler <at> umons.ac.be>

Date: Fri, 8 Feb 2019 15:00:02 UTC

Severity: normal

Found in version 26.1

Done: Katsumi Yamaoka <yamaoka <at> jpl.org>

Bug is archived. No further changes may be made.

Full log


Message #23 received at 34387 <at> debbugs.gnu.org (full text, mbox):

From: Katsumi Yamaoka <yamaoka <at> jpl.org>
To: Christophe.Troestler <at> umons.ac.be
Cc: 34387 <at> debbugs.gnu.org
Subject: Re: bug#34387: 26.1; Gnus: handle empty message parts
Date: Thu, 14 Feb 2019 08:20:20 +0900
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—these 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,




This bug report was last modified 6 years and 97 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.