Synch up with the main trunk.
authorteranisi <teranisi>
Sun, 23 Dec 2001 03:23:53 +0000 (03:23 +0000)
committerteranisi <teranisi>
Sun, 23 Dec 2001 03:23:53 +0000 (03:23 +0000)
17 files changed:
doc/wl-ja.texi
doc/wl.texi
elmo/ChangeLog
elmo/elmo-imap4.el
elmo/elmo-net.el
elmo/elmo-nntp.el
elmo/elmo-pop3.el
elmo/elmo.el
wl/ChangeLog
wl/wl-draft.el
wl/wl-e21.el
wl/wl-folder.el
wl/wl-mule.el
wl/wl-util.el
wl/wl-vars.el
wl/wl-version.el
wl/wl-xmas.el

index d21a3cc..d2a8dcb 100644 (file)
@@ -4272,6 +4272,13 @@ Wanderlust \e$B$N%*%U%i%$%s%b!<%I\e(B/\e$B%*%s%i%$%s%b!<%I$r%H%0%k$7$^$9!#\e(B
 \e$B%"%I%l%9%^%M!<%8%c$r5/F0$7$^$9!#\e(B
 @xref{Address Manager}.
 (@code{wl-addrmgr})
+
+@item C-c C-d
+@kindex C-c C-d (Draft)
+@findex wl-draft-elide-region
+\e$B%]%$%s%H$H%^!<%/$N4V$NJ8$r>J$-$^$9\e(B (@code{wl-draft-elide-region})\e$B!#J8>O\e(B
+\e$B$O@Z$i$l$F\e(B (killed) \e$BJQ?t\e(B @code{wl-draft-elide-ellipsis} \e$B$NCM$GCV$-49$($i\e(B
+\e$B$l$^$9!#%G%U%)%k%H$N>JN,Id9f$H$7$F;H$o$l$kCM$O\e(B (@samp{[...]}) \e$B$G$9!#\e(B
 @end table
 
 @section \e$B%+%9%?%^%$%:JQ?t\e(B
index b0a4604..4200f8d 100644 (file)
@@ -4306,6 +4306,14 @@ Selects a template.
 Enter Address Manager.
 @xref{Address Manager}.
 (@code{wl-addrmgr})
+
+@item C-c C-d
+@kindex C-c C-d (Draft)
+@findex wl-draft-elide-region
+Elide the text between point and mark (@code{wl-draft-elide-region}).
+The text is killed and replaced with the contents of the variable
+@code{wl-draft-elide-ellipsis}.  The default value is to use an ellipsis
+(@samp{[...]}).
 @end table
 
 @section Customizable Variables
index f8d4a70..a3601a5 100644 (file)
@@ -1,5 +1,30 @@
 2001-12-19  Yuuichi Teranishi  <teranisi@gohome.org>
 
+       * elmo.el (luna-define-class): Added `biff' slot.
+
+       * elmo-pop3.el (elmo-pop3-debug): Split biff log.
+       (elmo-pop3-debug-inhibit-logging): Abolished.
+       (elmo-network-close-session): Eliminated needless let.
+       (elmo-pop3-get-session): Set prefix 'BIFF' if biff folder.
+       (elmo-pop3-send-command): Added `no-log' argument.
+       (elmo-pop3-process-filter): Use `with-current-buffer'.
+       (elmo-pop3-auth-user): Set `no-log' argument; Delete process
+       if login failure.
+       (elmo-pop3-auth-apop): Likewise.
+       (elmo-network-authenticate-session): Likewise.
+
+       * elmo-nntp.el (elmo-nntp-get-session): Set prefix 'BIFF'
+       if biff folder.
+
+       * elmo-net.el (elmo-network-session-password-key): Use class symbol
+       string to determine protocol.
+       (elmo-network-session-name-prefix): Abolished.
+       (elmo-network-session-cache-key): Follow the change above.
+       (elmo-network-open-session): Ditto.
+
+       * elmo-imap4.el (elmo-imap4-send-command): Modified error message.
+       (elmo-imap4-get-session): Set prefix 'BIFF' if biff folder.
+
        * elmo-util.el (elmo-file-field-primitive-condition-match): Fixed
        unmatch condition checking.
 
index 4d5bf6a..1f35051 100644 (file)
@@ -198,7 +198,6 @@ Debug information is inserted in the buffer \"*IMAP4 DEBUG*\"")
            (insert "NO LOGGING\n")
          (insert (apply 'format message args) "\n")))))
 
-
 (defsubst elmo-imap4-decode-folder-string (string)
   (if elmo-imap4-use-modified-utf7
       (utf7-decode-string string 'imap)
@@ -284,7 +283,7 @@ Returns a TAG string which is assigned to the COMMAND."
        (elmo-imap4-process-bye session))
       (setq elmo-imap4-current-response nil)
       (if elmo-imap4-parsing
-         (error "IMAP process is running. Please wait (or plug again.)"))
+         (error "IMAP process is running. Please wait (or plug again)"))
       (setq elmo-imap4-parsing t)
       (elmo-imap4-debug "<-(%s)- %s" tag command)
       (while (setq token (car command-args))
@@ -640,7 +639,12 @@ BUFFER must be a single-byte buffer."
                    (elmo-imap4-folder-mailbox-internal folder)))))
 
 (defun elmo-imap4-get-session (folder &optional if-exists)
-  (elmo-network-get-session 'elmo-imap4-session "IMAP" folder if-exists))
+  (elmo-network-get-session 'elmo-imap4-session
+                           (concat
+                            (if (elmo-folder-biff-internal folder)
+                                "BIFF-")
+                            "IMAP")
+                           folder if-exists))
 
 (defun elmo-imap4-session-select-mailbox (session mailbox
                                                  &optional force no-error)
index afd2fa8..6f2d6c3 100644 (file)
 
 (defsubst elmo-network-session-password-key (session)
   (format "%s:%s/%s@%s:%d"
-         (elmo-network-session-name-internal session)
+         (upcase
+          (nth 1 (split-string (symbol-name
+                                (luna-class-name session)) "[4-]")))
          (elmo-network-session-user-internal session)
          (elmo-network-session-auth-internal session)
          (elmo-network-session-server-internal session)
          (elmo-network-session-port-internal session)))
 
 (defvar elmo-network-session-cache nil)
-(defvar elmo-network-session-name-prefix nil)
 
 (defsubst elmo-network-session-cache-key (name folder)
   "Returns session cache key for NAME and FOLDER."
   (format "%s:%s/%s@%s:%d%s"
-         (concat elmo-network-session-name-prefix name)
+         name
          (elmo-net-folder-user-internal folder)
          (elmo-net-folder-auth-internal folder)
          (elmo-net-folder-server-internal folder)
@@ -212,7 +213,7 @@ Returns a process object.  if making session failed, returns nil."
                           :process nil
                           :greeting nil))
        (buffer (format " *%s session for %s@%s:%d%s"
-                       (concat elmo-network-session-name-prefix name)
+                       name
                        user
                        server
                        port
index 8cd3d60..4bbf723 100644 (file)
@@ -245,7 +245,10 @@ Don't cache if nil.")
 (defun elmo-nntp-get-session (folder &optional if-exists)
   (elmo-network-get-session
    'elmo-nntp-session
-   "NNTP"
+   (concat
+    (if (elmo-folder-biff-internal folder)
+       "BIFF-")
+    "NNTP")
    folder
    if-exists))
 
index 2af46c9..94caee7 100644 (file)
@@ -66,15 +66,15 @@ set as non-nil.")
   "Non-nil forces POP3 folder as debug mode.
 Debug information is inserted in the buffer \"*POP3 DEBUG*\"")
 
-(defvar elmo-pop3-debug-inhibit-logging nil)
-
 ;;; Debug
 (defsubst elmo-pop3-debug (message &rest args)
   (if elmo-pop3-debug
-      (with-current-buffer (get-buffer-create "*POP3 DEBUG*")
-       (goto-char (point-max))
-       (if elmo-pop3-debug-inhibit-logging
-           (insert "NO LOGGING\n")
+      (let ((biff (string-match "BIFF-" (buffer-name)))
+           pos)
+       (with-current-buffer (get-buffer-create (concat "*POP3 DEBUG*"
+                                                       (if biff "BIFF")))
+         (goto-char (point-max))
+         (setq pos (point))
          (insert (apply 'format message args) "\n")))))
 
 ;;; ELMO POP3 folder
@@ -149,15 +149,13 @@ Debug information is inserted in the buffer \"*POP3 DEBUG*\"")
     (when (memq (process-status
                 (elmo-network-session-process-internal session))
                '(open run))
-      (let ((buffer (process-buffer
-                    (elmo-network-session-process-internal session))))
-       (elmo-pop3-send-command (elmo-network-session-process-internal session)
-                               "quit")
-       ;; process is dead.
-       (or (elmo-pop3-read-response
-            (elmo-network-session-process-internal session)
-            t)
-           (error "POP error: QUIT failed"))))
+      (elmo-pop3-send-command (elmo-network-session-process-internal session)
+                             "quit")
+      ;; process is dead.
+      (or (elmo-pop3-read-response
+          (elmo-network-session-process-internal session)
+          t)
+         (error "POP error: QUIT failed")))
     (kill-buffer (process-buffer
                  (elmo-network-session-process-internal session)))
     (delete-process (elmo-network-session-process-internal session))))
@@ -167,15 +165,20 @@ Debug information is inserted in the buffer \"*POP3 DEBUG*\"")
                                         nil
                                       (elmo-pop3-folder-use-uidl-internal
                                        folder))))
-    (elmo-network-get-session 'elmo-pop3-session "POP3" folder if-exists)))
-
-(defun elmo-pop3-send-command (process command &optional no-erase)
+    (elmo-network-get-session 'elmo-pop3-session
+                             (concat
+                              (if (elmo-folder-biff-internal folder)
+                                  "BIFF-")
+                              "POP3")
+                             folder if-exists)))
+
+(defun elmo-pop3-send-command (process command &optional no-erase no-log)
   (with-current-buffer (process-buffer process)
     (unless no-erase
       (erase-buffer))
     (goto-char (point-min))
     (setq elmo-pop3-read-point (point))
-    (elmo-pop3-debug "SEND: %s\n" command)
+    (elmo-pop3-debug "SEND: %s\n" (if no-log "<NO LOGGING>" command))
     (process-send-string process command)
     (process-send-string process "\r\n")))
 
@@ -220,8 +223,7 @@ Debug information is inserted in the buffer \"*POP3 DEBUG*\"")
       return-value)))
 
 (defun elmo-pop3-process-filter (process output)
-  (save-excursion
-    (set-buffer (process-buffer process))
+  (with-current-buffer (process-buffer process)
     (goto-char (point-max))
     (insert output)
     (elmo-pop3-debug "RECEIVED: %s\n" output)
@@ -240,18 +242,24 @@ Debug information is inserted in the buffer \"*POP3 DEBUG*\"")
     ;; try USER/PASS
     (elmo-pop3-send-command
      process
-     (format "user %s" (elmo-network-session-user-internal session)))
+     (format "user %s" (elmo-network-session-user-internal session))
+     nil 'no-log)
     (or (elmo-pop3-read-response process t)
-       (signal 'elmo-authenticate-error
-               '(elmo-pop-auth-user)))
+       (progn
+         (delete-process process)
+         (signal 'elmo-authenticate-error
+                 '(elmo-pop-auth-user))))
     (elmo-pop3-send-command  process
                             (format
                              "pass %s"
                              (elmo-get-passwd
-                              (elmo-network-session-password-key session))))
+                              (elmo-network-session-password-key session)))
+                            nil 'no-log)
     (or (elmo-pop3-read-response process t)
-       (signal 'elmo-authenticate-error
-               '(elmo-pop-auth-user)))))
+       (progn
+         (delete-process process)
+         (signal 'elmo-authenticate-error
+                 '(elmo-pop-auth-user))))))
 
 (defun elmo-pop3-auth-apop (session)
   (if (string-match "^\+OK .*\\(<[^\>]+>\\)"
@@ -267,12 +275,15 @@ Debug information is inserted in the buffer \"*POP3 DEBUG*\"")
                           1
                           (elmo-network-session-greeting-internal session))
                          (elmo-get-passwd
-                          (elmo-network-session-password-key session))))))
+                          (elmo-network-session-password-key session)))))
+        nil 'no-log)
        (or (elmo-pop3-read-response
             (elmo-network-session-process-internal session)
             t)
-           (signal 'elmo-authenticate-error
-                   '(elmo-pop3-auth-apop))))
+           (progn
+             (delete-process (elmo-network-session-process-internal session))
+             (signal 'elmo-authenticate-error
+                     '(elmo-pop3-auth-apop)))))
     (signal 'elmo-open-error '(elmo-pop3-auth-apop))))
 
 (luna-define-method elmo-network-initialize-session-buffer :after
@@ -314,7 +325,6 @@ Debug information is inserted in the buffer \"*POP3 DEBUG*\"")
   (with-current-buffer (process-buffer
                        (elmo-network-session-process-internal session))
     (let* ((process (elmo-network-session-process-internal session))
-          (elmo-pop3-debug-inhibit-logging t)
           (auth (elmo-network-session-auth-internal session))
           (auth (mapcar '(lambda (mechanism) (upcase (symbol-name mechanism)))
                         (if (listp auth) auth (list auth))))
@@ -355,7 +365,8 @@ Debug information is inserted in the buffer \"*POP3 DEBUG*\"")
                          (concat
                           " "
                           (elmo-base64-encode-string
-                           (sasl-step-data step) 'no-line-break))))) ;)
+                           (sasl-step-data step) 'no-line-break))))
+            nil 'no-log)
            (catch 'done
              (while t
                (unless (setq response (elmo-pop3-read-response process t))
@@ -383,7 +394,7 @@ Debug information is inserted in the buffer \"*POP3 DEBUG*\"")
                 (if (sasl-step-data step)
                     (elmo-base64-encode-string (sasl-step-data step)
                                                'no-line-break)
-                  "")))))))))
+                  "") nil 'no-log))))))))
 
 (luna-define-method elmo-network-setup-session ((session
                                                 elmo-pop3-session))
index e4bf81f..95a3f26 100644 (file)
@@ -109,6 +109,7 @@ If a folder name begins with PREFIX, use BACKEND."
                                     message-modified ; message is modified.
                                     mark-modified    ; mark is modified.
                                     process-duplicates  ; read or hide
+                                    biff   ; folder for biff
                                     ))
   (luna-define-internal-accessors 'elmo-folder))
 
index 2f0a579..d0d79fc 100644 (file)
@@ -1,3 +1,30 @@
+2001-12-21  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * wl-draft.el (wl-draft-elide-region): New user command.
+       * wl-vars.el (wl-draft-elide-ellipsis): New user option.
+
+       * wl-e21.el (wl-draft-key-setup): Bind the key `C-c C-d' to the
+       command `wl-draft-elide-region'.
+       * wl-mule.el: Ditto.
+       * wl-xmas.el: Ditto.
+
+2001-12-20  Yuuichi Teranishi  <teranisi@gohome.org>
+
+       * wl-util.el (wl-biff-check-folder): Fix for non-pop3 folders.
+       (wl-biff-check-folder-async): Removed needless let.
+
+2001-12-19  Yuuichi Teranishi  <teranisi@gohome.org>
+
+       * wl-util.el (wl-biff-check-folders): Set `no-cache' argument of
+       wl-folder-get-elmo-folder.
+       (wl-biff-check-folder): Set `biff' argument of
+       `wl-folder-check-one-entity'.
+       (wl-biff-check-folder-async): Setup `biff' slot of folder.
+
+       * wl-folder.el (wl-folder-get-elmo-folder): Added `no-cache' argument.
+       (wl-folder-check-one-entity): Added `biff' argument;
+       Setup `biff' slot of folder.
+
 2001-12-18  Yuuichi Teranishi  <teranisi@gohome.org>
 
        * wl-fldmgr.el (wl-fldmgr-add-completion-all-completions): Removed
index d6d28d7..7477196 100644 (file)
@@ -732,6 +732,15 @@ Reply to author if WITH-ARG is non-nil."
       (mail-position-on-field "to"))
   (insert "\nFcc: "))
 
+;; Imported from message.el.
+(defun wl-draft-elide-region (b e)
+  "Elide the text in the region.
+An ellipsis (from `wl-draft-elide-ellipsis') will be inserted where the
+text was killed."
+  (interactive "r")
+  (kill-region b e)
+  (insert wl-draft-elide-ellipsis))
+
 ;; function for wl-sent-message-via
 
 (defmacro wl-draft-sent-message-p (type)
index 579749c..a9f48e2 100644 (file)
@@ -610,7 +610,8 @@ Special commands:
   (define-key wl-draft-mode-map "\C-c\C-p" 'wl-draft-preview-message)
   (define-key wl-draft-mode-map "\C-c\C-a" 'wl-addrmgr)
   (define-key wl-draft-mode-map "\C-x\C-s" 'wl-draft-save)
-  (define-key wl-draft-mode-map "\C-xk"    'wl-draft-mimic-kill-buffer))
+  (define-key wl-draft-mode-map "\C-xk"    'wl-draft-mimic-kill-buffer)
+  (define-key wl-draft-mode-map "\C-c\C-d" 'wl-draft-elide-region))
 
 (defun wl-draft-overload-functions ()
   (wl-mode-line-buffer-identification)
index 9722be7..523f7b1 100644 (file)
                 (setq li (cdr li))))))))
 
 ;;; ELMO folder structure with cache.
-(defmacro wl-folder-get-elmo-folder (entity)
+(defmacro wl-folder-get-elmo-folder (entity &optional no-cache)
   "Get elmo folder structure from entity."
-  (` (or (wl-folder-elmo-folder-cache-get (, entity))
-        (let* ((name (elmo-string (, entity)))
-               (folder (elmo-make-folder name)))
-          (wl-folder-elmo-folder-cache-put name folder)
-          folder))))
+  (` (if (, no-cache)
+        (elmo-make-folder (elmo-string (, entity)))
+       (or (wl-folder-elmo-folder-cache-get (, entity))
+          (let* ((name (elmo-string (, entity)))
+                 (folder (elmo-make-folder name)))
+            (wl-folder-elmo-folder-cache-put name folder)
+            folder)))))
 
 (defmacro wl-folder-elmo-folder-cache-get (name &optional hashtb)
   "Returns a elmo folder structure associated with NAME from HASHTB.
@@ -798,12 +800,14 @@ Optional argument ARG is repeart count."
     (run-hooks 'wl-folder-check-entity-hook)
     ret-val))
 
-(defun wl-folder-check-one-entity (entity)
-  (let* ((folder (wl-folder-get-elmo-folder entity))
+(defun wl-folder-check-one-entity (entity &optional biff)
+  (let* ((folder (wl-folder-get-elmo-folder entity biff))
         (nums (condition-case err
-                  (if (wl-string-match-member entity wl-strict-diff-folders)
-                      (elmo-strict-folder-diff folder)
-                    (elmo-folder-diff folder))
+                  (progn
+                    (if biff (elmo-folder-set-biff-internal folder t))
+                    (if (wl-string-match-member entity wl-strict-diff-folders)
+                        (elmo-strict-folder-diff folder)
+                      (elmo-folder-diff folder)))
                 (error
                  ;; maybe not exist folder.
                  (if (and (not (memq 'elmo-open-error
index 065060a..e8540d3 100644 (file)
@@ -158,7 +158,8 @@ Special commands:
   (define-key wl-draft-mode-map "\C-c\C-p" 'wl-draft-preview-message)
   (define-key wl-draft-mode-map "\C-x\C-s" 'wl-draft-save)
   (define-key wl-draft-mode-map "\C-c\C-a" 'wl-addrmgr)
-  (define-key wl-draft-mode-map "\C-xk" 'wl-draft-mimic-kill-buffer))
+  (define-key wl-draft-mode-map "\C-xk" 'wl-draft-mimic-kill-buffer)
+  (define-key wl-draft-mode-map "\C-c\C-d" 'wl-draft-elide-region))
 
 (defun wl-draft-overload-menubar ()
   (local-set-key [menu-bar mail send]
index d591fd6..aae027b 100644 (file)
@@ -818,7 +818,7 @@ This function is imported from Emacs 20.7."
          folder)
       (if (eq (length flist) 1)
          (wl-biff-check-folder-async (wl-folder-get-elmo-folder
-                                      (car flist)) (interactive-p))
+                                      (car flist) 'biff) (interactive-p))
        (unwind-protect
            (while flist
              (setq folder (wl-folder-get-elmo-folder (car flist))
@@ -833,12 +833,10 @@ This function is imported from Emacs 20.7."
 (defun wl-biff-check-folder (folder)
   (if (eq (elmo-folder-type-internal folder) 'pop3)
       (unless (elmo-pop3-get-session folder 'if-exists)
-       ;; Currently no main pop3 process.
-       (let ((elmo-network-session-name-prefix "BIFF-"))
-         (wl-folder-check-one-entity
-          (elmo-folder-name-internal folder))))
-    (let ((elmo-network-session-name-prefix "BIFF-"))
-      (wl-folder-check-one-entity (elmo-folder-name-internal folder)))))
+       (wl-folder-check-one-entity (elmo-folder-name-internal folder)
+                                   'biff))
+    (wl-folder-check-one-entity (elmo-folder-name-internal folder)
+                               'biff)))
 
 (defun wl-biff-check-folder-async-callback (diff data)
   (if (nth 1 data)
@@ -856,6 +854,7 @@ This function is imported from Emacs 20.7."
 
 (defun wl-biff-check-folder-async (folder notify-minibuf)
   (when (elmo-folder-plugged-p folder)
+    (elmo-folder-set-biff-internal folder t)
     (if (and (eq (elmo-folder-type-internal folder) 'imap4)
             (elmo-folder-use-flag-p folder))
        ;; Check asynchronously only when IMAP4 and use server diff.
@@ -866,8 +865,7 @@ This function is imported from Emacs 20.7."
                (list (elmo-folder-name-internal folder)
                      (get-buffer wl-folder-buffer-name)
                      notify-minibuf))
-         (let ((elmo-network-session-name-prefix "BIFF-"))
-           (elmo-folder-diff-async folder)))
+         (elmo-folder-diff-async folder))
       (unwind-protect
          (wl-biff-notify (car (wl-biff-check-folder folder))
                          notify-minibuf)
index 369d324..52f9c6e 100644 (file)
@@ -952,6 +952,11 @@ ex.
   :group 'wl-draft
   :group 'wl-setting)
 
+(defcustom wl-draft-elide-ellipsis "\n[...]\n\n"
+  "*The string which is inserted for elided text."
+  :type 'string
+  :group 'wl-draft)
+
 (defcustom wl-template-alist nil
   "Alist of template."
   :type '(repeat (list (string :tag "Name")
index 7b427f3..d50ca77 100644 (file)
@@ -46,7 +46,7 @@
    "Wanderlust" nil
    (eval-when-compile
      (product-version (product-find 'elmo-version))) ; equals to ELMO version.
-   "Something-pre"))
+   "Something-pre2"))
 
 (defconst wl-version-status nil
   "Wanderlust verstion status.  For override default rule.
index b60ba74..2799c53 100644 (file)
@@ -514,7 +514,8 @@ Special commands:
   (define-key wl-draft-mode-map "\C-c\C-p" 'wl-draft-preview-message)
   (define-key wl-draft-mode-map "\C-x\C-s" 'wl-draft-save)
   (define-key wl-draft-mode-map "\C-c\C-a" 'wl-addrmgr)
-  (define-key wl-draft-mode-map "\C-xk"    'wl-draft-mimic-kill-buffer))
+  (define-key wl-draft-mode-map "\C-xk"    'wl-draft-mimic-kill-buffer)
+  (define-key wl-draft-mode-map "\C-c\C-d" 'wl-draft-elide-region))
 
 (defun wl-draft-overload-functions ()
   (wl-mode-line-buffer-identification)