From: Katsumi Yamaoka <yamaoka@jpl.org>
To: Christophe.Troestler@umons.ac.be
Cc: 34387@debbugs.gnu.org
Subject: bug#34387: 26.1; Gnus: handle empty message parts
Date: Fri, 15 Feb 2019 07:50:14 +0900 [thread overview]
Message-ID: <b4mpnrux9w9.fsf@jpl.org> (raw)
In-Reply-To: <87ef8igwdw.fsf@poincare.umons.ac.be>
On Thu, 14 Feb 2019 13:30:34 +0100, Christophe Troestler wrote:
> The point is to delete all trailing whitespace coming from the
> conversion of HTML to text. Without this, some emails (such as the
> one attached) are hard to read because the lines end with so many
> whitespaces that they take several lines on the screen (filled with
> spaces). The following does what I want (and does not trigger the
> bug, thanks to the narrowing).
> (define-advice mm-shr (:around (oldfn &rest handle) delete-trailing-whitespace)
> "Delete leading and trailing whitespace in Gnus article buffer."
> (when (derived-mode-p 'gnus-article-mode)
> (save-restriction
> (narrow-to-region (point) (point))
> (apply oldfn handle)
> (delete-trailing-whitespace))))
I see. But, sorry, I meant to do first was:
(define-advice mm-shr (:around (oldfn &rest handle) delete-trailing-whitespace)
"Delete leading and trailing whitespace in Gnus article buffer."
(if (derived-mode-p 'gnus-article-mode)
(save-restriction
(narrow-to-region (point) (point))
(apply oldfn handle)
(delete-trailing-whitespace))
(apply oldfn handle)))
That is, not to do the whitespace deletion when mm-shr is used
in other than Gnus as it might require whitespace. Anyway the
(when ...) way makes mm-shr work only in the Gnus article buffer.
:-p
Regards,
next prev parent reply other threads:[~2019-02-14 22:50 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-08 14:58 bug#34387: 26.1; Gnus: handle empty message parts Christophe Troestler
[not found] ` <handler.34387.B.154963794230369.ack@debbugs.gnu.org>
2019-02-08 15:39 ` bug#34387: Acknowledgement (26.1; Gnus: handle empty message parts) Christophe Troestler
2019-02-12 4:34 ` bug#34387: 26.1; Gnus: handle empty message parts Katsumi Yamaoka
2019-02-12 7:31 ` Christophe Troestler
2019-02-13 4:53 ` Katsumi Yamaoka
2019-02-13 17:26 ` Christophe Troestler
2019-02-13 23:20 ` Katsumi Yamaoka
2019-02-14 2:16 ` Katsumi Yamaoka
2019-02-14 12:30 ` Christophe Troestler
2019-02-14 22:50 ` Katsumi Yamaoka [this message]
2019-02-15 8:28 ` Christophe Troestler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b4mpnrux9w9.fsf@jpl.org \
--to=yamaoka@jpl.org \
--cc=34387@debbugs.gnu.org \
--cc=Christophe.Troestler@umons.ac.be \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.