I stole some of it from `epa-decrypt-armor-in-region' because `epa-mail-decrypt' is interactive-only. Ideally armor-start and armor-end should only be lexically bound, so they should be in the let form: (let ((buffer (get-buffer-create (format "%s *decrypted*" (file-name-nondirectory file)))) armor-beg armor-end) ...) -- Jamie