Subject: bug#78859: 31.0.50; Viewing mime part in Rmail sets truncate-lines

From: Eli Zaretskii <[email-masked]>
Date: Sun, 29 Jun 2025 08:42:32 +0300

> From: Richard Stallman <[email-masked]>
> Cc: [email-masked]
> Date: Sat, 28 Jun 2025 22:44:09 -0400
> 
>   > In general, email messages with more than a single MIME part, not all
>   > of them HTML, are quite rare.  I don't remember the last time I've
>   > seen anything like that.
> 
> I received one a few days ago, and that is how I noticed this problem.
> I could not find it again the next day, because I get hundreds of
> emails per day and I don't know which day that one actually arrived.
> 
> In any case, I assure you it did happen.  And it is obvious why the code
> caused that result.

I'd like to have an example of such a message, if only to test the
proposed solutions.

>   > I think it sets truncate-lines because it uses functions that simulate
>   > display, and so that setting affects how HTML is laid out in the
>   > buffer by shr.el.  So maybe what you suggest above is the best fix we
>   > can easily make.
> 
> Are you saying that the value of truncate-lines that maters
> is the value it has while shr.el is running?

Yes.

> If so, maybe binding truncate-lines only around the execution of
> shr.el would give ideal results!

That's what I tend to think, yes.  But we need an example of such a
message to test these ideas.