[mew-dist 19884] Re: GnuPG Encode with Mew 2.0.58

Tatsuya Kinoshita tats at example.com
2001年 12月 20日 (木) 15:27:35 JST


In message [mew-dist 19882], on Thu, 20 Dec 2001,
Kazu Yamamoto <kazu at example.com> wrote:

> > PGP filter1/2で、"Overwrite (y/N)? "に"y\n"を返して続行するように
> > してはどうでしょうか。
> 
> パッチを作って頂けませんか?

作ってみました。Mew 2.1.52/3.0.51に適用できるはずです。

ただし、GnuPG 1.0.6での動作しか確認できていません。
mew-pgp-msg-overwriteをPGPv2/v5/v6向けにする必要があります。

-- 
木下達也
-------------- next part --------------

 This patch is written by Tatsuya Kinoshita.  Copyright is disclaimed.

diff -cr mew.orig/mew-pgp.el mew/mew-pgp.el
*** mew.orig/mew-pgp.el	Mon Dec 17 19:07:06 2001
--- mew/mew-pgp.el	Thu Dec 20 14:39:35 2001
***************
*** 114,119 ****
--- 114,125 ----
  (defconst mew-pgp-msg-enter
    '("Enter" "Enter" "Enter" "xxx"))
  
+ (defconst mew-pgp-msg-overwrite
+   '("Overwrite (y/N)\\? "
+     "Overwrite (y/N)\\? "
+     "Overwrite (y/N)\\? "
+     "Overwrite (y/N)\\? "))
+ 
  (defconst mew-pgp-msg-enter-pass 
    '("Enter pass phrase: "
      "Enter pass phrase: "
***************
*** 618,623 ****
--- 624,634 ----
      (process-send-string process (format "%s\n" (mew-pgp-passphrase)))
      (set-process-filter process 'mew-pgp-process-filter2))
  
+    ;; overwrite a previous data with a new data. (multiple data is unsupported)
+    ((string-match (mew-pgp-get mew-pgp-msg-overwrite) string)
+     (process-send-string process "y\n")
+     (set-process-filter process 'mew-pgp-process-filter1))
+ 
     ;; just in case
     ((string-match (mew-pgp-get mew-pgp-msg-enter) string)
      (setq mew-pgp-failure mew-pgp-err-other)
***************
*** 662,667 ****
--- 673,683 ----
     ((string-match (mew-pgp-get mew-pgp-msg-no-seckey-or-secring) string)
      (setq mew-pgp-failure mew-pgp-err-seckey-or-secring)
      (set-process-filter process 'mew-pgp-process-filter3))
+ 
+    ;; overwrite a previous data with a new data. (multiple data is unsupported)
+    ((string-match (mew-pgp-get mew-pgp-msg-overwrite) string)
+     (process-send-string process "y\n")
+     (set-process-filter process 'mew-pgp-process-filter2))
  
     ;; just in case
     ((string-match (mew-pgp-get mew-pgp-msg-enter) string)


Mew-dist メーリングリストの案内