[Mew-dist 04687] Re: update for mew-summary-sort(-region)

Kazu Yamamoto ( 山本和彦 ) kazu at example.com
1998年 5月 13日 (水) 20:15:31 JST


From: Masahiro MURATA (村田全寛) <muse at example.com>
Subject: [Mew-dist 04610] Re: update for mew-summary-sort(-region)
Date: Sat, 9 May 1998 23:10:39 +0900

>   もちろん,prefix argument なし mew-summary-sort は "all" のままになり
> ます。

こういう実装の方がよくありませんか?

--かず

Index: mew-sort.el
===================================================================
RCS file: /usr/local/cvsroot/Mew/mew/mew-sort.el,v
retrieving revision 1.6
diff -c -r1.6 mew-sort.el
*** mew-sort.el	1998/04/20 06:36:08	1.6
--- mew-sort.el	1998/05/13 11:13:28
***************
*** 12,18 ****
  
  (defvar mew-summary-sort-fields
    '(("date" . "date") ("subject") ("from") ("to") ("newsgroups")
!     ("posted" . "date") ("x-sequence" . "num"))
    "*List of fields for `mew-summary-sort'.
  Each element is (FIELD-NAME) or (FIELD-NAME . MODE).
  MODE is one of \"date\" (sort by chronological order) or
--- 12,18 ----
  
  (defvar mew-summary-sort-fields
    '(("date" . "date") ("subject") ("from") ("to") ("newsgroups")
!     ("posted" . "date") ("x-sequence" . "num") ("x-mail-count" . "num"))
    "*List of fields for `mew-summary-sort'.
  Each element is (FIELD-NAME) or (FIELD-NAME . MODE).
  MODE is one of \"date\" (sort by chronological order) or
***************
*** 61,67 ****
        (mew-summary-scan-body mew-prog-imls
  			     'mew-summary-mode
  			     folder
! 			     mew-cs-scan))))
  
  (defun mew-summary-sort (&optional arg)
    (interactive "P")
--- 61,68 ----
        (mew-summary-scan-body mew-prog-imls
  			     'mew-summary-mode
  			     folder
! 			     mew-cs-scan
! 			     (mew-update-range)))))
  
  (defun mew-summary-sort (&optional arg)
    (interactive "P")
Index: mew-minibuf.el
===================================================================
RCS file: /usr/local/cvsroot/Mew/mew/mew-minibuf.el,v
retrieving revision 1.12
diff -c -r1.12 mew-minibuf.el
*** mew-minibuf.el	1998/05/06 03:50:30	1.12
--- mew-minibuf.el	1998/05/13 11:12:48
***************
*** 108,130 ****
        (list range 'erase)) ;; non-update, erase it
       ;; update
       ((get-buffer folder)
!       (save-excursion
! 	(set-buffer folder)
! 	(goto-char (point-max))
! 	(if (bobp)
! 	    (list "all" 'update) ;; buffer is empty. no need to erase
! 	  (forward-line -1)
! 	  (list 
! 	   (concat
! 	    (int-to-string (1+ (string-to-int (mew-summary-message-number))))
! 	    "-" 
! 	    "last")
! 	   'update) ;; this is update!
! 	  )))
       ;; update but folder doesn't exist in Emacs. 
       (t (list "all" 'update)) ;; no need to erase
       )
      ))
  
  (defun mew-input-address (prompt)
    (read-from-minibuffer (concat prompt " ") "" mew-mini-address-map nil)
--- 108,132 ----
        (list range 'erase)) ;; non-update, erase it
       ;; update
       ((get-buffer folder)
!       (mew-update-range))
       ;; update but folder doesn't exist in Emacs. 
       (t (list "all" 'update)) ;; no need to erase
       )
      ))
+ 
+ (defun mew-update-range ()
+   (save-excursion
+     (goto-char (point-max))
+     (if (bobp)
+ 	(list "all" 'update) ;; buffer is empty. no need to erase
+       (forward-line -1)
+       (list 
+        (concat
+ 	(int-to-string (1+ (string-to-int (mew-summary-message-number))))
+ 	"-" 
+ 	"last")
+        'update) ;; this is update!
+       )))
  
  (defun mew-input-address (prompt)
    (read-from-minibuffer (concat prompt " ") "" mew-mini-address-map nil)



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