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

From: Richard Stallman <[email-masked]>
Date: Tue, 24 Jun 2025 22:20:01 -0400

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

I need to point out that the problem is not limited to confusing dispay
of _other_ messages in the same buffer.  It also confuses display
of other mime parts in the same message, that are visible at the same time
as the decoded HTML part.

  > I see no reason to fix shr.el, I have no reasons to believe it doesn't
  > DTRT in this case.  I think it should be enough to reset
  > truncate-lines back to its original value in rmail-show-message-1,

Maybe it can be fixed by resetting truncate-lines.   But that will only fix
the simplest case. in which the only part of this message is that one
HTML mime part.  To avoid obscuring other plain text mime parts,
it would be necesary to reset truncate-lines in rmail-mime-render-html-shr,
immediately after calling shr-insert-document.

If it does that, then shr-insert-document might as well not set truncate-lines,
as that wouldn't affect any redisplsy.  I would be happy with that result,
but if there is a good reason to set truncate-lines, some more complex
fix would be required.

Basically, it looks like shr.el is assuming that what it isprocessing
will be the whole contents of the buffer, and that isn't so in cases
like this.

-- 
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)