[Date Prev] [Date Index] [Date Next]
[Thread Prev] [Thread Index] [Thread Next]

[xyzzy:05587] Re: Kamail で IE の mailto プロトコルから新規メール作成できないか?



Yuji Furutani さん、こんにちは。

	2000年11月24日(金)[20:55:07]の、
	[xyzzy:05586] Kamail で IE の mailto プロトコルから新規メール作成できないか?
	への返事です。

| KamailでIEのメールを作成するリンクから新規メールを書けないのでし
| ょうか?

めちゃめちゃ強引ですが、こうすればできるような。

・estartup.l の process-command-line-1 を以下のように変更。

		((equal "-rw" arg)
		 (setq ro nil))
                ;; ここから
		((setq opt (parse-command-line arg nil "-mailto" 'args))
		 (when (and (boundp '*cmdline-mailto-hook*)
			    *cmdline-mailto-hook*)
		   (funcall *cmdline-mailto-hook* opt))
		 (setq si:*command-line-args* nil))
                ;; ここまで追加
		(t
		 (let ((filename (merge-pathnames arg dir)))
		   (find-file filename)
		   (add-history filename '*minibuffer-file-name-history*))

・.xyzzy に以下を追加。

(autoload 'kamail "kamail/kamail" t)
(setq ed::*cmdline-mailto-hook*
      #'(lambda (args)
	  (when (string-matchp "^mailto:\\([^?]+\\)\\(\\?subject=\\(.*\\)\\)?" args)
	    (let ((header (list (list "to" (subseq args (match-beginning 1) (match-end 1)))))
		  (subject (and (match-beginning 3)
				(/= (match-beginning 3) (match-end 3))
				(subseq args (match-beginning 3) (match-end 3)))))
	      (and subject
		   (push (list "subject" subject) header))
	      (kamail)
	      (funcall (find-symbol "kamail-select-view" "km"))
	      (funcall (find-symbol "kamail-prepare-mail" "km") header)))))

・mailto プロトコルを以下のように設定。

   ...\xyzzycli.exe -mailto "%1"

-- 
亀井哲弥(Tetsuya Kamei)
kamei@xxxxxxxxxxxx

Index Home