[mew-dist 26375] Re: Some hacks around summary column

Shun-ichi TAHARA ( 田原 俊一 ) jado at example.com
2005年 5月 30日 (月) 09:34:03 JST


From: Shun-ichi TAHARA (田原 俊一) <jado at example.com>
Message-Id: <20050530.072359.226781022.jado at example.com>

> > [mew-dist 26370] は捨てて、こちらでお願いします。
> 
> すみません。t SPC でポカがあったので、こちらで。

何度も済みません。1個所ダメなコードがあったので、もう1回差し換えで。
--
jado at example.com
-------------- next part --------------
Index: mew-const.el
===================================================================
RCS file: /cvsmew/mew/mew-const.el,v
retrieving revision 1.71
diff -c -r1.71 mew-const.el
*** mew-const.el	18 May 2005 10:11:48 -0000	1.71
--- mew-const.el	30 May 2005 00:28:13 -0000
***************
*** 209,214 ****
--- 209,216 ----
  (defconst mew-regex-message-files3 "^[0-9]+$")
  (defconst mew-regex-message-files4 "^0[1-9][0-9]*$")
  
+ (defconst mew-regex-refile-body "\a[^\a\r\n]+\a")
+ 
  ;;;
  ;;; Sumsyn
  ;;;
Index: mew-highlight.el
===================================================================
RCS file: /cvsmew/mew/mew-highlight.el,v
retrieving revision 1.33
diff -c -r1.33 mew-highlight.el
*** mew-highlight.el	16 May 2005 02:10:12 -0000	1.33
--- mew-highlight.el	30 May 2005 00:28:13 -0000
***************
*** 271,276 ****
--- 271,284 ----
  		      (not (mew-summary-message-number)))
  		 (forward-line))
  	     (setq start (point)))
+ 	   (goto-char beg)
+ 	   (while (and (< (point) end) ;; we cannot trust end
+ 		       (re-search-forward mew-regex-refile-body end t))
+ 	     (if (and interrupt (input-pending-p))
+ 		 (throw 'loop (setq ret t)))
+ 	     (setq med (match-beginning 0))
+ 	     (put-text-property med (1+ med) 'invisible t)
+ 	     (put-text-property (1- (point)) (point) 'invisible t))
  	   (when mew-use-highlight-mark
  	     (goto-char beg)
  	     (while (and (< (point) end) ;; we cannot trust end
Index: mew-imap.el
===================================================================
RCS file: /cvsmew/mew/mew-imap.el,v
retrieving revision 1.248
diff -c -r1.248 mew-imap.el
*** mew-imap.el	26 May 2005 06:15:48 -0000	1.248
--- mew-imap.el	30 May 2005 00:28:13 -0000
***************
*** 1175,1180 ****
--- 1175,1181 ----
  	    (mew-imap-exec-recover bnm))
  	(mew-summary-lock process "IMAPing" (or sshpro sslpro))
  	(mew-sinfo-set-summary-form (mew-get-summary-form bnm))
+ 	(mew-sinfo-set-body-column (mew-get-summary-form bnm 'body))
  	(mew-sinfo-set-unread-mark nil)
  	(mew-sinfo-set-scan-id nil)
  	(mew-info-clean-up pnm)
Index: mew-local.el
===================================================================
RCS file: /cvsmew/mew/mew-local.el,v
retrieving revision 1.93
diff -c -r1.93 mew-local.el
*** mew-local.el	26 May 2005 06:15:48 -0000	1.93
--- mew-local.el	30 May 2005 00:28:13 -0000
***************
*** 258,263 ****
--- 258,264 ----
  	  range pro opts)
       (message "Scanning %s..." bnm)
       (mew-sinfo-set-summary-form (mew-get-summary-form bnm))
+      (mew-sinfo-set-body-column (mew-get-summary-form bnm 'body))
       (mew-sinfo-set-unread-mark nil)
       (mew-sinfo-set-scan-id nil)
       (mew-info-clean-up pnm)
Index: mew-nntp.el
===================================================================
RCS file: /cvsmew/mew/mew-nntp.el,v
retrieving revision 1.122
diff -c -r1.122 mew-nntp.el
*** mew-nntp.el	26 May 2005 06:15:48 -0000	1.122
--- mew-nntp.el	30 May 2005 00:28:13 -0000
***************
*** 443,448 ****
--- 443,449 ----
        (when process
  	(mew-summary-lock process "NNTPing" (or sshpro sslpro))
  	(mew-sinfo-set-summary-form (mew-get-summary-form bnm))
+ 	(mew-sinfo-set-body-column (mew-get-summary-form bnm 'body))
  	(mew-sinfo-set-unread-mark nil)
  	(mew-sinfo-set-scan-id nil)
  	(mew-info-clean-up pnm)
Index: mew-pop.el
===================================================================
RCS file: /cvsmew/mew/mew-pop.el,v
retrieving revision 1.196
diff -c -r1.196 mew-pop.el
*** mew-pop.el	26 May 2005 06:15:49 -0000	1.196
--- mew-pop.el	30 May 2005 00:28:13 -0000
***************
*** 672,677 ****
--- 672,678 ----
  	      (mew-summary-visible-buffer bnm))
  	(mew-summary-lock process "POPing" (or sshpro sslpro))
  	(mew-sinfo-set-summary-form (mew-get-summary-form bnm))
+ 	(mew-sinfo-set-body-column (mew-get-summary-form bnm 'body))
  	(mew-sinfo-set-unread-mark nil)
  	(mew-sinfo-set-scan-id nil)
  	(mew-info-clean-up pnm)
Index: mew-refile.el
===================================================================
RCS file: /cvsmew/mew/mew-refile.el,v
retrieving revision 1.132
diff -c -r1.132 mew-refile.el
*** mew-refile.el	26 May 2005 06:15:49 -0000	1.132
--- mew-refile.el	30 May 2005 00:28:13 -0000
***************
*** 598,627 ****
  
  (defvar mew-override-body-open "<")
  (defvar mew-override-body-close "> ")
- (defconst mew-regex-override-body
-   (concat (regexp-quote mew-override-body-open)
- 	  "[^>\r\n]*"
- 	  (regexp-quote mew-override-body-close)))
  
  (defun mew-summary-refile-override-body (folders-str)
    (let* ((open mew-override-body-open)
  	 (close mew-override-body-close)
! 	 (len (+ (length folders-str) (length open) (length close))))
      (save-excursion
!       (when (mew-summary-goto-body 'after)
! 	(when (looking-at mew-regex-override-body)
  	  (mew-elet
! 	   (delete-region (point) (match-end 0))))
! 	(mew-elet
! 	 (insert-and-inherit open folders-str close))))
      len))
  
  (defun mew-summary-refile-remove-body ()
    (save-excursion
!     (when (and (mew-summary-goto-body 'after)
! 	       (looking-at mew-regex-override-body))
        (mew-elet
!        (delete-region (point) (match-end 0))))))
  
  (defun mew-summary-refile-log (fld folders-str)
    (save-excursion
--- 598,648 ----
  
  (defvar mew-override-body-open "<")
  (defvar mew-override-body-close "> ")
  
  (defun mew-summary-refile-override-body (folders-str)
    (let* ((open mew-override-body-open)
  	 (close mew-override-body-close)
! 	 (len (+ (length folders-str) (length open) (length close)))
! 	 (width (min 30 ;; xxx
! 		     (+ (string-width folders-str)
! 			(string-width open) (string-width close))))
! 	 (column (mew-sinfo-get-body-column))
! 	 (column2 (- (mew-scan-width) width 1))
! 	 end start)
      (save-excursion
!       (mew-summary-refile-remove-body)
!       (if column
  	  (mew-elet
! 	   (move-to-column column)
! 	   (setq start (point))
! 	   (insert-and-inherit "\a"))
! 	(setq end (save-excursion (end-of-line) (point)))
! 	(if (search-forward "\r" end t)
! 	    (goto-char (match-beginning 0))
! 	  (goto-char end))
! 	(if (or (< (current-column) column2) ;; mew-use-spc-padding == nil?
! 		(= (move-to-column column2) column2))
! 	    (mew-elet
! 	     (setq start (point))
! 	     (insert-and-inherit "\a" mew-sp))
! 	  (forward-char -1)
! 	  (mew-elet
! 	   (setq start (point))
! 	   (insert-and-inherit
! 	    "\a" (make-string (1+ (- column2 (current-column))) mew-sp)))))
!       (mew-elet
!        (insert-and-inherit open folders-str close "\a")
!        (put-text-property start (1+ start) 'invisible t)
!        (put-text-property (1- (point)) (point) 'invisible t)))
      len))
  
  (defun mew-summary-refile-remove-body ()
    (save-excursion
!     (beginning-of-line)
!     (when (re-search-forward
! 	   mew-regex-refile-body (save-excursion (end-of-line) (point)) t)
        (mew-elet
!        (delete-region (match-beginning 0) (match-end 0))))))
  
  (defun mew-summary-refile-log (fld folders-str)
    (save-excursion
Index: mew-scan.el
===================================================================
RCS file: /cvsmew/mew/mew-scan.el,v
retrieving revision 1.228
diff -c -r1.228 mew-scan.el
*** mew-scan.el	27 May 2005 05:59:17 -0000	1.228
--- mew-scan.el	30 May 2005 00:28:13 -0000
***************
*** 235,245 ****
  ;;; Scan from
  ;;;
  
! (defun mew-get-summary-form (folder &optional column)
    "Get summary-form from 'mew-summary-form-list', 
  'mew-summary-form-list-string-type, and 'mew-summary-form-list-list-type'.
! 'mew-summary-form-header' is prepended. If COLUMN is non-nil, the number
! of thread indent position is returned."
    (let (ret form col)
      (setq ret (mew-folder-spec folder
  			       mew-summary-form-list
--- 235,247 ----
  ;;; Scan from
  ;;;
  
! (defun mew-get-summary-form (folder &optional column afterp)
    "Get summary-form from 'mew-summary-form-list', 
  'mew-summary-form-list-string-type, and 'mew-summary-form-list-list-type'.
! 'mew-summary-form-header' is prepended. If COLUMN is non-nil, the column
! number of specified element described in summary-form is returned, only
! when the position is fixed (otherwise, returns nil). If afterp is non-nil,
! the column number of just after position of specified element is returned."
    (let (ret form col)
      (setq ret (mew-folder-spec folder
  			       mew-summary-form-list
***************
*** 249,274 ****
  	(mew-set '(form col) ret)
        (setq form mew-summary-form))
      (setq form (append mew-summary-form-header form))
!     (if column
! 	(if (numberp col) col (mew-thread-column form))
!       form)))
  
! (defun mew-thread-column (form)
!   (let ((col 0) ret ent)
      (catch 'loop
        (while form
  	(setq ent (car form))
  	(setq form (cdr form))
  	(cond
  	 ((consp ent)
! 	  (setq col (+ col (abs (car ent)))))
  	 ((stringp ent)
  	  (setq col (+ col (string-width ent))))
  	 ((eq ent t)
! 	  (throw 'loop (setq ret col)))
  	 (t
! 	  (setq col (1+ col))))))
!     (or ret mew-thread-column)))
  
  (defun mew-get-unread-mark (folder)
    (car (mew-folder-spec folder
--- 251,290 ----
  	(mew-set '(form col) ret)
        (setq form mew-summary-form))
      (setq form (append mew-summary-form-header form))
!     (cond
!      ((and (eq column t) (numberp col))
!       col)
!      (column
!       (mew-get-summary-column form column afterp))
!      (t
!       form))))
  
! (defmacro mew-get-summary-column-check (pos elm chk col)
!   `(if (and ,pos (eq ,elm ,chk)) (throw 'loop ,col)))
! 
! (defun mew-get-summary-column (form column afterp)
!   (let ((col 0) (beforep (null afterp)) ent)
      (catch 'loop
        (while form
  	(setq ent (car form))
  	(setq form (cdr form))
  	(cond
  	 ((consp ent)
! 	  (mew-get-summary-column-check beforep (car (cdr ent)) column col)
! 	  (if (= (car ent) 0)
! 	      (throw 'loop nil))
! 	  (setq col (+ col (abs (car ent))))
! 	  (mew-get-summary-column-check afterp (car (cdr ent)) column col))
  	 ((stringp ent)
  	  (setq col (+ col (string-width ent))))
  	 ((eq ent t)
! 	  (mew-get-summary-column-check t ent column col))
  	 (t
! 	  (mew-get-summary-column-check beforep ent column col)
! 	  (setq col (1+ col))
! 	  (mew-get-summary-column-check afterp ent column col))))
!       (if (eq column t)
! 	  mew-thread-column))))
  
  (defun mew-get-unread-mark (folder)
    (car (mew-folder-spec folder
***************
*** 282,316 ****
  ;;;
  
  (defun mew-scan-get-piece (spec)
!   (let (func width str rightp nopad)
!     (if (stringp spec)
! 	(progn
! 	  (setq TOTAL (+ TOTAL (string-width spec)))
! 	  spec)
!       (if (symbolp spec)
! 	  (setq width 1 func spec)
! 	(mew-set '(width func) spec))
!       (when (and (integerp width) (symbolp func))
! 	(when (= width 0)
! 	  (setq width (- WIDTH TOTAL 1))
! 	  (unless mew-use-spc-padding
! 	    (setq nopad t)))
! 	(if (< width 0) (setq width (abs width) rightp t))
! 	(setq TOTAL (+ TOTAL width))
! 	(setq func (intern-soft
! 		    (concat mew-summary-form-func-prefix (symbol-name func))))
! 	(when (fboundp func)
! 	  (setq str (funcall func))
! 	  (if rightp
! 	      (if (<= (string-width str) width)
! 		  (format (format "%%%ds" width) str)
! 		(setq TOTAL (+ (- TOTAL width) (string-width str)))
! 		str) ;; width may exceed.
! 	    (mew-substring str width nil nopad)))))))
  
  (defun mew-scan-get-line (mew-vec WIDTH)
    (let* ((TOTAL 0) (fld "")
! 	 (line (mapconcat 'mew-scan-get-piece (mew-sinfo-get-summary-form) ""))
  	 par-id my-id msg ld uid siz irt-list)
      (setq my-id (or (mew-idstr-get-first-id (MEW-ID)) ""))
      ;; RFC 2822 says: the "In-Reply-To:" field may be used to identify
--- 298,334 ----
  ;;;
  
  (defun mew-scan-get-piece (spec)
!   (let (func width str rightp remain)
!     (when (< TOTAL WIDTH)
!       (if (stringp spec)
! 	  (progn
! 	    (setq TOTAL (+ TOTAL (string-width spec)))
! 	    spec)
! 	(if (symbolp spec)
! 	    (setq width 1 func spec)
! 	  (mew-set '(width func) spec))
! 	(when (and (integerp width) (symbolp func))
! 	  (if (< width 0) (setq width (abs width) rightp t))
! 	  (setq func (intern-soft
! 		      (concat mew-summary-form-func-prefix (symbol-name func))))
! 	  (when (fboundp func)
! 	    (setq TOTAL (+ TOTAL width))
! 	    (setq str (funcall func))
! 	    (if rightp
! 		(if (> (setq remain (- width (string-width str))) 0)
! 		    (concat (make-string remain mew-sp) str)
! 		  (setq TOTAL (- TOTAL remain))
! 		  str) ;; width may exceed.
! 	      (if (> width 0)
! 		  (mew-substring str width)
! 		(setq TOTAL (+ TOTAL (string-width str)))
! 		str))))))))
  
  (defun mew-scan-get-line (mew-vec WIDTH)
    (let* ((TOTAL 0) (fld "")
! 	 (line (mew-substring
! 		(mapconcat 'mew-scan-get-piece (mew-sinfo-get-summary-form) "")
! 		WIDTH nil (null mew-use-spc-padding)))
  	 par-id my-id msg ld uid siz irt-list)
      (setq my-id (or (mew-idstr-get-first-id (MEW-ID)) ""))
      ;; RFC 2822 says: the "In-Reply-To:" field may be used to identify
Index: mew-summary.el
===================================================================
RCS file: /cvsmew/mew/mew-summary.el,v
retrieving revision 1.198
diff -c -r1.198 mew-summary.el
*** mew-summary.el	18 May 2005 11:54:42 -0000	1.198
--- mew-summary.el	30 May 2005 00:28:13 -0000
***************
*** 19,25 ****
      "scan-id" "find-key" "cursor-line" "direction" "start-point"
      "cache-time" "summary-form" "unread-mark" "refile-back"
      "disp-msg" "case" "folder" "proto" "mid-marker" "mid-line" "ttl-line"
!     "mark-review" "ret-pos"))
  
  (mew-blinfo-defun 'mew-sinfo mew-sinfo-list)
  
--- 19,25 ----
      "scan-id" "find-key" "cursor-line" "direction" "start-point"
      "cache-time" "summary-form" "unread-mark" "refile-back"
      "disp-msg" "case" "folder" "proto" "mid-marker" "mid-line" "ttl-line"
!     "mark-review" "ret-pos" "body-column"))
  
  (mew-blinfo-defun 'mew-sinfo mew-sinfo-list)
  
Index: mew-syntax.el
===================================================================
RCS file: /cvsmew/mew/mew-syntax.el,v
retrieving revision 1.89
diff -c -r1.89 mew-syntax.el
*** mew-syntax.el	26 May 2005 06:15:49 -0000	1.89
--- mew-syntax.el	30 May 2005 00:28:14 -0000
***************
*** 339,358 ****
  (defsubst mew-summary-goto-mark ()
    (beginning-of-line))
  
- (defsubst mew-summary-goto-body (&optional after)
-   (when mew-summary-form-body-starter
-     (beginning-of-line)
-     (let ((beg (point)))
-       (forward-line)
-       (if (search-backward "\r" nil t)
- 	  (if (search-backward mew-summary-form-body-starter beg t)
- 	      (progn
- 		(if after (goto-char (match-end 0)))
- 		t)
- 	    nil)
- 	(forward-line -1) ;; just in case
- 	nil))))
- 
  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  ;;;
  ;;; Summary mode syntax
--- 339,344 ----
Index: mew-thread.el
===================================================================
RCS file: /cvsmew/mew/mew-thread.el,v
retrieving revision 1.124
diff -c -r1.124 mew-thread.el
*** mew-thread.el	26 May 2005 06:15:49 -0000	1.124
--- mew-thread.el	30 May 2005 00:28:14 -0000
***************
*** 244,250 ****
  	    (disp (mew-sinfo-get-disp-msg))
  	    (ctime (mew-sinfo-get-cache-time))
  	    (case (mew-sinfo-get-case))
! 	    (column (mew-get-summary-form folder 'column))
  	    db size top start me prnt prnt-cld my-id prnt-id func msg line
  	    tm1 tm2 tm3 tm4 tm5 tm6)
         (message "Making thread (first pass)...")
--- 244,252 ----
  	    (disp (mew-sinfo-get-disp-msg))
  	    (ctime (mew-sinfo-get-cache-time))
  	    (case (mew-sinfo-get-case))
! 	    (column (mew-get-summary-form folder t))
! 	    (type-column (mew-get-summary-form folder 'type))
! 	    (subj-column (mew-get-summary-form folder 'subj t))
  	    db size top start me prnt prnt-cld my-id prnt-id func msg line
  	    tm1 tm2 tm3 tm4 tm5 tm6)
         (message "Making thread (first pass)...")
***************
*** 313,318 ****
--- 315,322 ----
  	 (mew-vinfo-set-top nil)
  	 (mew-vinfo-set-db db)
   	 (mew-vinfo-set-column column)
+ 	 (mew-vinfo-set-type-column type-column)
+ 	 (mew-vinfo-set-subj-column subj-column)
  	 ;;
  	 (message "Making thread (second pass)...")
  	 (setq tm3 (current-time))
***************
*** 338,344 ****
  	 (message "Displaying thread...")
  	 (setq tm5 (current-time))
  	 (mew-summary-thread-print-top
! 	  (mew-vinfo-get-top) folder column)
  	 ;;
  	 ;; Unmarking in both Summary and Thread
  	 (when mark (mew-mark-undo-mark mew-mark-review))
--- 342,348 ----
  	 (message "Displaying thread...")
  	 (setq tm5 (current-time))
  	 (mew-summary-thread-print-top
! 	  (mew-vinfo-get-top) folder column subj-column)
  	 ;;
  	 ;; Unmarking in both Summary and Thread
  	 (when mark (mew-mark-undo-mark mew-mark-review))
***************
*** 379,403 ****
  (defun mew-thread-next-property2 (beg end level)
    (text-property-any beg end 'mew-thread-indent level))
  
! (defun mew-thread-adjust-body (level)
!   (when (mew-summary-goto-body)
!     (mew-elet
!      (let ((end (point))
! 	   (width (* level mew-thread-indent-width))
! 	   (sum 0))
         (while (< sum width)
  	 (setq sum (+ (char-width (char-before)) sum))
  	 (forward-char -1))
         (delete-region (point) end)
         (when (/= sum width)
! 	 (insert (make-string (- sum width) mew-sp)))))))
  
  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  ;;;
  ;;; Visualizing thread
  ;;;
  
! (defun mew-summary-thread-print-top (top folder column)
    (while top
      (let* ((me (car top))
  	   (cld (mew-thread-get-child me)))
--- 383,426 ----
  (defun mew-thread-next-property2 (beg end level)
    (text-property-any beg end 'mew-thread-indent level))
  
! (defun mew-thread-adjust-column (level column)
!   (let ((width (* level mew-thread-indent-width))
! 	(sum 0) end start saved)
!     (cond
!      (column
!       (move-to-column (+ column width))
!       (mew-elet
!        (setq end (point))
         (while (< sum width)
  	 (setq sum (+ (char-width (char-before)) sum))
  	 (forward-char -1))
         (delete-region (point) end)
         (when (/= sum width)
! 	 (insert (make-string (- sum width) mew-sp)))))
!      ((re-search-forward
!        mew-regex-refile-body (save-excursion (end-of-line) (point)) t)
!       (mew-elet
!        (setq end (match-beginning 0))
!        (while (eq (char-after (+ end 2)) mew-sp)
! 	 (delete-region (+ end 2) (+ end 3))
! 	 (setq sum (1+ sum)))
!        (setq saved (buffer-substring end (point)))
!        (delete-region end (point))
!        (while (< sum width)
! 	 (setq sum (+ (char-width (char-before)) sum))
! 	 (forward-char -1))
!        (setq start (point))
!        (insert saved)
!        (when (/= sum width)
! 	 (goto-char (1+ start))
! 	 (insert (make-string (- sum width) mew-sp))))))))
  
  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  ;;;
  ;;; Visualizing thread
  ;;;
  
! (defun mew-summary-thread-print-top (top folder column subj-column)
    (while top
      (let* ((me (car top))
  	   (cld (mew-thread-get-child me)))
***************
*** 408,417 ****
         (move-to-column column)
         (mew-thread-put-property (point) (1+ (point)) 0)
         (forward-line))
!       (if cld (mew-summary-thread-print-tree cld folder column))
        (setq top (cdr top)))))
  
! (defun mew-summary-thread-print-tree (tree folder column)
    (let ((tree-stack nil)
  	(prefix "")
  	(level 1) pos)
--- 431,440 ----
         (move-to-column column)
         (mew-thread-put-property (point) (1+ (point)) 0)
         (forward-line))
!       (if cld (mew-summary-thread-print-tree cld folder column subj-column))
        (setq top (cdr top)))))
  
! (defun mew-summary-thread-print-tree (tree folder column subj-column)
    (let ((tree-stack nil)
  	(prefix "")
  	(level 1) pos)
***************
*** 428,434 ****
  	     (insert prefix (aref mew-thread-indent-strings 0))
  	   (insert prefix (aref mew-thread-indent-strings 1)))
  	 (mew-thread-put-property pos (point) level)
! 	 (mew-thread-adjust-body level)
  	 (forward-line))
  	;;
  	(setq tree next)
--- 451,457 ----
  	     (insert prefix (aref mew-thread-indent-strings 0))
  	   (insert prefix (aref mew-thread-indent-strings 1)))
  	 (mew-thread-put-property pos (point) level)
! 	 (mew-thread-adjust-column level subj-column)
  	 (forward-line))
  	;;
  	(setq tree next)
***************
*** 532,539 ****
        (mew-decode-syntax-delete)
        (save-excursion
  	(beginning-of-line)
! 	(when (looking-at
! 	       (concat "^." (regexp-quote (char-to-string mew-mark-thread-root))))
  	  (setq pruned (point))
  	  (mew-thread-graft 'nomsg))
  	(move-to-column column)
--- 555,562 ----
        (mew-decode-syntax-delete)
        (save-excursion
  	(beginning-of-line)
! 	(move-to-column (mew-vinfo-get-type-column))
! 	(when (eq (char-after (point)) mew-mark-thread-root)
  	  (setq pruned (point))
  	  (mew-thread-graft 'nomsg))
  	(move-to-column column)
***************
*** 586,593 ****
        (mew-decode-syntax-delete)
        (save-excursion
  	(beginning-of-line)
! 	(when (looking-at
! 	       (concat "^." (regexp-quote (char-to-string mew-mark-thread-root))))
  	  (setq pruned (point))
  	  (mew-thread-graft 'nomsg))
  	(move-to-column column)
--- 609,616 ----
        (mew-decode-syntax-delete)
        (save-excursion
  	(beginning-of-line)
! 	(move-to-column (mew-vinfo-get-type-column))
! 	(when (eq (char-after (point)) mew-mark-thread-root)
  	  (setq pruned (point))
  	  (mew-thread-graft 'nomsg))
  	(move-to-column column)
***************
*** 812,818 ****
    (mew-thread-only
     (mew-summary-goto-message)
     (mew-decode-syntax-delete)
!    (if (looking-at (concat "^." (regexp-quote (char-to-string mew-mark-thread-root))))
         (mew-thread-graft)
       (mew-thread-prune))
     (mew-thread-move-cursor)
--- 835,842 ----
    (mew-thread-only
     (mew-summary-goto-message)
     (mew-decode-syntax-delete)
!    (move-to-column (mew-vinfo-get-type-column))
!    (if (eq (char-after (point)) mew-mark-thread-root)
         (mew-thread-graft)
       (mew-thread-prune))
     (mew-thread-move-cursor)
***************
*** 826,835 ****
     (mew-decode-syntax-delete)
     (save-excursion
       (goto-char (point-min))
!      (let (pos)
         (while (setq pos (mew-thread-next-property2 (point) (point-max) 0))
  	 (goto-char pos)
! 	 (mew-thread-prune 'nomsg)
  	 (forward-line))))
     (when (eq (get-text-property (point) 'invisible) t)
       (mew-re-search-backward-visible mew-regex-msg-or-part))
--- 850,861 ----
     (mew-decode-syntax-delete)
     (save-excursion
       (goto-char (point-min))
!      (let ((type-column (mew-vinfo-get-type-column)) pos)
         (while (setq pos (mew-thread-next-property2 (point) (point-max) 0))
  	 (goto-char pos)
! 	 (move-to-column type-column)
! 	 (if (not (eq (char-after (point)) mew-mark-thread-root))
! 	     (mew-thread-prune 'nomsg))
  	 (forward-line))))
     (when (eq (get-text-property (point) 'invisible) t)
       (mew-re-search-backward-visible mew-regex-msg-or-part))
***************
*** 844,852 ****
     (mew-decode-syntax-delete)
     (save-excursion
       (goto-char (point-min))
!      (let ((regex (concat "^." (regexp-quote (char-to-string mew-mark-thread-root)))))
!        (while (re-search-forward regex nil t)
! 	 (mew-thread-graft 'nomsg)
  	 (forward-line))))
     (mew-thread-move-cursor)
     (set-buffer-modified-p nil)))
--- 870,881 ----
     (mew-decode-syntax-delete)
     (save-excursion
       (goto-char (point-min))
!      (let ((type-column (mew-vinfo-get-type-column)) pos)
!        (while (setq pos (mew-thread-next-property2 (point) (point-max) 0))
! 	 (goto-char pos)
! 	 (move-to-column type-column)
! 	 (if (eq (char-after (point)) mew-mark-thread-root)
! 	     (mew-thread-graft 'nomsg))
  	 (forward-line))))
     (mew-thread-move-cursor)
     (set-buffer-modified-p nil)))
***************
*** 873,879 ****
  	 (put-text-property beg (point) 'invisible t)
  	 (goto-char beg)
  	 (forward-line -1)
! 	 (forward-char)
  	 (put-text-property (point) (1+ (point)) 'invisible t)
  	 (insert mew-mark-thread-root))))))
  
--- 902,908 ----
  	 (put-text-property beg (point) 'invisible t)
  	 (goto-char beg)
  	 (forward-line -1)
! 	 (move-to-column (mew-vinfo-get-type-column))
  	 (put-text-property (point) (1+ (point)) 'invisible t)
  	 (insert mew-mark-thread-root))))))
  
***************
*** 898,905 ****
  	   (put-text-property (1- (point)) (point) 'invisible nil)
  	   (setq beg (point)))
  	 (goto-char start)
  	 (forward-line -1)
! 	 (forward-char)
  	 (delete-char 1)
  	 (put-text-property (point) (1+ (point)) 'invisible nil))))))
  
--- 927,939 ----
  	   (put-text-property (1- (point)) (point) 'invisible nil)
  	   (setq beg (point)))
  	 (goto-char start)
+ 	 (while (re-search-forward mew-regex-refile-body end t)
+ 	   (setq beg (match-beginning 0))
+ 	   (put-text-property beg (1+ beg) 'invisible t)
+ 	   (put-text-property (1- (point)) (point) 'invisible t))
+ 	 (goto-char start)
  	 (forward-line -1)
! 	 (move-to-column (mew-vinfo-get-type-column))
  	 (delete-char 1)
  	 (put-text-property (point) (1+ (point)) 'invisible nil))))))
  
***************
*** 944,949 ****
--- 978,984 ----
  
  (defun mew-thread-glue-it ()
    (let ((column (mew-vinfo-get-column))
+ 	(subj-column (mew-vinfo-get-subj-column))
  	(m (make-marker))
  	(width 0) (wd 0) (adjust 0)
  	(prefix "")
***************
*** 967,973 ****
  		     (aref mew-thread-indent-strings 0))
  	    (setq prefix (concat prefix (aref mew-thread-indent-strings 2)))
  	  (setq prefix (concat prefix (aref mew-thread-indent-strings 3)))))
!       (when (mew-summary-goto-body)
  	(while (> (point) beg)
  	  (setq wd (+ wd (char-width (char-before))))
  	  (forward-char -1)))
--- 1002,1009 ----
  		     (aref mew-thread-indent-strings 0))
  	    (setq prefix (concat prefix (aref mew-thread-indent-strings 2)))
  	  (setq prefix (concat prefix (aref mew-thread-indent-strings 3)))))
!       (when subj-column
! 	(move-to-column subj-column)
  	(while (> (point) beg)
  	  (setq wd (+ wd (char-width (char-before))))
  	  (forward-char -1)))
***************
*** 1002,1008 ****
  	   (insert (aref mew-thread-indent-strings 1)))
  	 (goto-char (mew-thread-next-property (point)))
  	 (mew-thread-put-property pbeg (point) (+ indent pindent))
! 	 (mew-thread-adjust-body (- pindent adjust))
  	 (catch 'loop
  	   (while t
  	     (forward-line)
--- 1038,1044 ----
  	   (insert (aref mew-thread-indent-strings 1)))
  	 (goto-char (mew-thread-next-property (point)))
  	 (mew-thread-put-property pbeg (point) (+ indent pindent))
! 	 (mew-thread-adjust-column (- pindent adjust) subj-column)
  	 (catch 'loop
  	   (while t
  	     (forward-line)
***************
*** 1017,1023 ****
  	       (insert (aref mew-thread-indent-strings 3)))
  	     (goto-char (mew-thread-next-property (point)))
  	     (mew-thread-put-property pbeg (point) (+ idt pindent))
! 	     (mew-thread-adjust-body (- pindent adjust))))
  	 (beginning-of-line)
  	 (setq end (point))
  	 (when (looking-at mew-regex-thread-separator)
--- 1053,1059 ----
  	       (insert (aref mew-thread-indent-strings 3)))
  	     (goto-char (mew-thread-next-property (point)))
  	     (mew-thread-put-property pbeg (point) (+ idt pindent))
! 	     (mew-thread-adjust-column (- pindent adjust) subj-column)))
  	 (beginning-of-line)
  	 (setq end (point))
  	 (when (looking-at mew-regex-thread-separator)
Index: mew-virtual.el
===================================================================
RCS file: /cvsmew/mew/mew-virtual.el,v
retrieving revision 1.70
diff -c -r1.70 mew-virtual.el
*** mew-virtual.el	26 May 2005 06:15:49 -0000	1.70
--- mew-virtual.el	30 May 2005 00:28:14 -0000
***************
*** 13,19 ****
  ;;;
  
  (defvar mew-vinfo-list
!   '("func" "lra" "top" "db" "column" 
      "parent-folder" ;; Thread only
      "flds")) ;; Virtual (not Thread) only
  
--- 13,19 ----
  ;;;
  
  (defvar mew-vinfo-list
!   '("func" "lra" "top" "db" "column" "type-column" "subj-column"
      "parent-folder" ;; Thread only
      "flds")) ;; Virtual (not Thread) only
  


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