bug#81441: [PATCH] Have 'toggle-rot13-mode' behave buffer locally
Philip Kaludercic <[email protected]>
| Newsgroups | gmane.emacs.bugs |
|---|---|
| Message-ID | <[email protected]> |
Eli Zaretskii <[email protected]> writes: > Ping! How should we make further progress in this matter? I would suggest adding a new minor mode that changes the display table of the buffer, and not the frame. >> Cc: [email protected] >> Date: Tue, 21 Jul 2026 14:01:20 +0300 >> From: Eli Zaretskii <[email protected]> >> >> > From: Philip Kaludercic <[email protected]> >> > Cc: [email protected] >> > Date: Mon, 20 Jul 2026 19:10:29 +0000 >> > >> > Eli Zaretskii <[email protected]> writes: >> > >> > >> From: Philip Kaludercic <[email protected]> >> > >> Date: Sun, 19 Jul 2026 21:23:25 +0000 >> > >> >> > >> I was recently surprised that this command changes the display table of >> > >> the window, which if confusing if you switch between buffers or move >> > >> them around between windows. I would suggest just changing the >> > >> behavior outright, without a replacement as the function remains simple >> > >> enough to write oneself if a per-window workflow is that important >> > >> (which is doubtful considering that we are talking about rot13 here). >> > > >> > > This has a clear downside: using a buffer display table means you >> > > cannot have this buffer shown in another window as human-readable >> > > text. >> > >> > Do you think/know that that is a common use-case? >> >> I don't know for sure, but that's my strong impression both from the >> documentation and from what the command does. >> >> Also note that this is email-related feature, and it is unusual to >> have the email reading buffer be displayed in more than a single >> window. At least when using Rmail, there's usually just one window >> which shows the message. >> >> > > So I don't think we should make such a change, except as an opt-in >> > > behavior. The documentation of this feature clearly hints that the >> > > rot13 display is ephemeral, so IMO window-specific display table is a >> > > better default. >> > >> > I see your argument, but I don't think that either is strictly >> > preferable. Would it make sense to then instead add a proper buffer >> > local minor mode `rot13-buffer-mode' as an alternative to existing >> > command? >> >> I don't see how it could be an alternative, because a mode by >> definition affects the buffer in any window. We could have such a >> mode _in_addition_ to the existing command, though. >> >> >> >>