[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#7287: 24.0.50; epa-mail-decrypt changes the current major-mode
From: |
Lars Ingebrigtsen |
Subject: |
bug#7287: 24.0.50; epa-mail-decrypt changes the current major-mode |
Date: |
Fri, 27 Sep 2019 17:48:30 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
Robert Pluim <rpluim@gmail.com> writes:
> I think epa-mail-decrypt is either obsolete, or strongly deprecated,
> since everyone should be use message mode with mml tags to get proper
> MIME formatting, but hereʼs what I tried:
>
> Sent myself a message with inline OPENPGP
> Opened that with Gnus
> Told Gnus to *not* automatically decrypt the OPENPGP part :-)
> K-c to get a buffer with the encrypted text
> M-x epa-mail-mode
> C-c C-e C-d
>
> The end result was a buffer called '*decoded*' in fundamental mode,
> which is the same mode as what K-c used.
Thanks for the recipe.
I'm getting a different result -- after answering `n' to the question
Replace the original text? (y or n)
I get a buffer called " *Temp*" which is, indeed, in a buffer that say's
it's Info mode. Looking at the code, it's:
(defun epa-decrypt-region (start end &optional make-buffer-function)
"Decrypt the current region between START and END.
[...]
(with-output-to-temp-buffer "*Temp*"
(set-buffer standard-output)
(insert plain)
(epa-info-mode))))
And that mode is:
(define-derived-mode epa-info-mode special-mode "Info"
"Major mode for `epa-info-buffer'."
(buffer-disable-undo)
(setq truncate-lines t
buffer-read-only t))
So I think the fix here is just to change the lighter to "EPA Info" to
avoid this confusion.
I'm doing that and closing this bug report.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no