トップ «前の日記(2003-04-23 (Wed)) 最新 次の日記(2003-04-25 (Fri))» 編集

猫熊は燃えつきた?!日記

最近なんにもやっていませんが、なにかやったらこちらに置くようにしています。
2002|12|
2003|01|02|03|04|05|06|07|08|09|10|11|12|
2004|01|02|03|04|05|06|07|08|09|10|11|12|
2005|01|02|03|04|05|06|07|08|09|10|11|12|
2006|01|02|03|04|05|06|07|08|09|10|11|12|
2007|01|02|03|04|05|06|07|08|09|10|11|12|
2008|01|02|03|04|05|06|07|08|09|10|11|12|
2009|01|02|03|04|05|06|07|08|09|10|11|12|
2010|01|02|03|04|05|06|07|08|
2011|09|
2012|02|


2003-04-24 (Thu) 知らないことが多い [長年日記]

最近の検索

MSN検索から『ノバうさぎ』で来る人が妙に多いので、MSN 検索というものを初めて試したところ、ぼくのページが 10位になっていてびっくり。常用するのは、やっぱ google の方が精度も高いし、良いと思いますよ。> 来られた方

最近のアンテナ

これってなぁに?とずーと思っていたんだけど、最近やっとどういうものか理解できた。理解できたというより、URL の上の階層を見に行った、かな。
emacs-w3m の antenna よりも不便のような気もするが、とりあえず koseさんのところに便乗して閲覧させて貰おう。simple じゃないほうって diff みたいにしているのかな?

Mew3 で thread をくっつける その2

つかのまのげんじつとーひで[mew-dist: 23608]に再度対抗してみた。汚いのはあいかわらずだが、これ以上やる気が無いので公開。
ぼくと同じキー設定だと、"t1" を親にしたいメールの上で押して Message-ID を取得、子供にしたいメールの上で "t2" を押す。undo したかったら、"t3"。summary と thread と virtual で動くつもりだけど、作った本人も virtual folder で試したことはないです。ちなみに、もとのメールを改竄するので注意!!
(define-key mew-summary-mode-map "t1" 'mew-get-msgid-inrepto)
(define-key mew-summary-mode-map "t2" 'mew-put-msgid-inrepto)
(define-key mew-summary-mode-map "t3" 'mew-remove-msgid-inrepto)
 
(defvar mew-get-msgid nil)
 
(defun mew-get-msgid-inrepto ()
  "親の Message-ID を取得する"
  (interactive)
  (setq mew-get-msgid nil)
  (if (mew-summary-case1)
    (save-excursion
      (mew-summary-goto-message)
      (beginning-of-line)
      (when (looking-at "[^\r]+\r \\(<[^>]+>\\) ")
	(setq mew-get-msgid (mew-match-string 1)))
      (if mew-get-msgid
	  (message "Message-Id: %s" mew-get-msgid)
	(message "No Message-Id: detect")))
    (message "Not execute this buffer")))
  
(defun mew-put-msgid-inrepto ()
  "親の Message-ID を In-Reply-To に無理やり付ける"
  (interactive)
  (if (not (mew-summary-or-virtual-p))
      (message "This command can be used in Mew.")
    (let (addrep)
      (save-excursion
	(mew-summary-not-in-queue
	 (mew-summary-not-in-draft
	  (mew-summary-goto-message)
	  (let* ((fld (mew-summary-folder-name))
		 (msg (mew-summary-message-number))
		 (file (mew-expand-folder fld msg))
		 exist pos end)
	    (if (and (looking-at "[^\r]+\r \\(<[^>]+>\\) ")
		     (string=  mew-get-msgid (mew-match-string 1)))
		(message "Same Message-ID detect.")
	      (if (null mew-get-msgid)
		  (message "No Prev Message-Id:")
		(when (y-or-n-p (format "Add In-Reply-To: %s? " mew-get-msgid))
		  (with-temp-buffer
		    (mew-frwlet
		     mew-cs-text-for-read mew-cs-text-for-write
		     (insert-file-contents file)
		     (setq exist (or (mew-header-get-value "In-Reply-To:")
				     (mew-header-get-value "References:")))
		     (if (and exist
			      (not (y-or-n-p "Exist In-Reply-To: or References: Replace? ")))
			 (message "Exist In-Reply-To: or References:")
		       (goto-char (point-min))
		       (if (re-search-forward "\n\\(\n\\)" nil t)
			   (setq end (match-beginning 1))
			 (setq end (point-max)))
		       (goto-char (point-min))
		       (if (re-search-forward "^In-Reply-To:" end t)
			   (progn
			     (beginning-of-line)
			     (insert "X-Mew-")
			     (beginning-of-line))
			 (goto-char (point-min))
			 (if (re-search-forward "Message-ID:" end t)
			     (beginning-of-line)
			   (if (re-search-forward "\n\\(\n\\)" nil t)
			       (goto-char (match-beginning 1)))))
		       (mew-header-insert "In-Reply-To:"
					  (concat mew-get-msgid " (Inserted Mew)")
					  'nofold)
		       (mew-fake-inrep-sub file fld msg)))
		    (setq addrep t)))))))))
      (when addrep
	(when (mew-thread-p)
	  (let ((lines (count-lines (point-min) (point-max))))
	    (mew-summary-make-thread)
	    ;; "mt" じゃなさそうなので、再表示する
	    (when (= lines (count-lines (point-min) (point-max)))
	      (mew-summary-make-thread))))
	(message "Add In-Reply-To: %s done" mew-get-msgid)))))
 
(defun mew-remove-msgid-inrepto ()
  "無理やりつけた In-Reply-To をはずす"
  (interactive)
  (if (not (mew-summary-or-virtual-p))
      (message "This command can be used in Mew.")
    (let (modp)
      (save-excursion
	(mew-summary-not-in-queue
	 (mew-summary-not-in-draft
	  (mew-summary-goto-message)
	  (let ((fld (mew-summary-folder-name))
		(msg (mew-summary-message-number))
		file xinrep mewinrep pos end)
	    (when (and fld msg)
	      (setq file (mew-expand-folder fld msg))
	      (with-temp-buffer
		(mew-frwlet
		 mew-cs-text-for-read mew-cs-text-for-write
		 (insert-file-contents file)
		 (set-buffer-modified-p nil)
		 (goto-char (point-min))
		 (if (re-search-forward "\n\\(\n\\)" nil t)
		     (setq end (match-beginning 1))
		   (setq end (point-max)))
		 (goto-char (point-min))
		 (setq xinrep (mew-header-get-value "X-Mew-In-Reply-To:"))
		 (when (setq mewinrep (mew-header-get-value "In-Reply-To:"))
		   (setq mewinrep (string-match " (Inserted Mew)$" mewinrep)))
		 (goto-char (point-min))
		 (when (and mewinrep
			    (re-search-forward "^In-Reply-To:" end t))
		   (goto-char (match-beginning 0))
		   (setq pos (point))
		   (forward-line 1)
		   (mew-header-goto-next)
		   (delete-region pos (point)))
		 (goto-char (point-min))
		 (when (and xinrep
			    (re-search-forward "^\\(X-Mew-\\)In-Reply-To:" end t))
		   (delete-region (match-beginning 1) (match-end 1)))
		 (when (setq modp (buffer-modified-p))
		   (mew-fake-inrep-sub file fld msg)))))))))
      (if modp
	  (let (lines)
	    (when (mew-thread-p)
	      (setq lines (count-lines (point-min) (point-max)))
	      (mew-summary-make-thread)
	      (when (= lines (count-lines (point-min) (point-max)))
		(mew-summary-make-thread)))
	    (message "Remove In-Reply-To inserted by Mew."))
	(message "No In-Reply-To inserted by Mew.")))))
 
(defun mew-fake-inrep-sub (file fld msg)
  (write-region (point-min) (point-max) file nil 'nomsg)
  (save-excursion
    (if (get-buffer fld)
	(set-buffer fld)
      (mew-summary-visit-folder fld)
      (while (processp mew-summary-buffer-process)
	(sit-for 1)
	(discard-input)))
    (unless (mew-sinfo-get-scan-form)
      (mew-sinfo-set-scan-form (mew-summary-scan-form fld))))
  (set-buffer-multibyte t)
  (let ((width (1- (mew-scan-width)))
	(vec (if (fboundp 'mew-pop-scan-header)
		 (mew-pop-scan-header)
	       (mew-scan-header))))
    (mew-scan-set-folder vec fld)
    (mew-scan-set-message vec msg)
    (mew-scan-insert-line fld vec width msg nil))
  (set-buffer fld)
  (mew-summary-folder-cache-save))
 

が〜〜〜ん

(ちょっと反応が遅いが)由伸、登録抹消かぁ。これはいたい ;_;


書いている人: 白井秀行 (mailto:shirai@meadowy。org)
訪問して下さった人: 今日: 人, 昨日: , 過去: 人 (2007年5月10日から)
RDF Feed