Re: EasyPG 0.0.1, yet another GnuPG interface for Emacs
Hiroya Murata <[email protected]> Sun, 30 Apr 2006 10:56:50 +0900
| Newsgroups | gmane.mail.emacs.mime.japanese |
|---|---|
| Message-ID | <uvesrn7vh.wl%[email protected]> |
早速, emiko-1_14-epg にして使ってみましたが, 暗号化パートを表示す ると, ^M が行末に残ってしまって上手く MIME デコード出来ませんでし た. 一応, 添付のパッチの様に text モードにするとちゃんと表示されました が, 何か間違っている様な気がします. もしかして環境固有の問題でしょ うか? ;; パッチでは, ついでに ;; ;; * epa-* を使っているので, (require 'epa) を追加 ;; * buffer-substring が引数を省略出来ないので追加 ;; ;; してあります. -- Hiroya Murata (村田 浩也) <[email protected]> PGP fingerprint: 53B6 1B4A 8193 A2D4 1526 BC9E 9AEF 2F6D 249D 5F17 ;; wl-mime.el も epg へ置き換えたので, 後で wl ML に流します
mime-pgp.el.patch
(application/octet-stream, 989 B)
Index: mime-pgp.el
===================================================================
RCS file: /cvs/root/semi/mime-pgp.el,v
retrieving revision 1.46.2.4.2.6.2.8
diff -u -w -u -w -r1.46.2.4.2.6.2.8 mime-pgp.el
--- mime-pgp.el 29 Apr 2006 21:05:42 -0000 1.46.2.4.2.6.2.8
+++ mime-pgp.el 30 Apr 2006 01:44:27 -0000
@@ -52,6 +52,7 @@
(require 'mime-play)
(require 'epg)
+(require 'epa)
;;; @ Internal method for multipart/signed
;;;
@@ -109,6 +110,7 @@
(goto-char (point-min))
(re-search-forward "^-+BEGIN PGP MESSAGE-+$" nil t))
(setq context (epg-make-context))
+ (epg-context-set-textmode context t)
(setq plain
(epg-decrypt-string
context
@@ -151,7 +153,7 @@
(goto-char (point-min))
(while (search-forward "\n" nil t)
(replace-match "\r\n"))
- (buffer-substring)))
+ (buffer-substring (point-min) (point-max))))
(message "%s"
(epg-verify-result-to-string
(epg-context-result-for context 'verify)))))