[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#34387: 26.1; Gnus: handle empty message parts
From: |
Katsumi Yamaoka |
Subject: |
bug#34387: 26.1; Gnus: handle empty message parts |
Date: |
Thu, 14 Feb 2019 08:20:20 +0900 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-cygwin) |
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,
- bug#34387: 26.1; Gnus: handle empty message parts, Christophe Troestler, 2019/02/08
- bug#34387: 26.1; Gnus: handle empty message parts, Katsumi Yamaoka, 2019/02/11
- bug#34387: 26.1; Gnus: handle empty message parts, Christophe Troestler, 2019/02/12
- bug#34387: 26.1; Gnus: handle empty message parts, Katsumi Yamaoka, 2019/02/13
- bug#34387: 26.1; Gnus: handle empty message parts, Christophe Troestler, 2019/02/13
- bug#34387: 26.1; Gnus: handle empty message parts,
Katsumi Yamaoka <=
- bug#34387: 26.1; Gnus: handle empty message parts, Katsumi Yamaoka, 2019/02/13
- bug#34387: 26.1; Gnus: handle empty message parts, Christophe Troestler, 2019/02/14
- bug#34387: 26.1; Gnus: handle empty message parts, Katsumi Yamaoka, 2019/02/14
- bug#34387: 26.1; Gnus: handle empty message parts, Christophe Troestler, 2019/02/15