\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
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
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.
(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)
(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))
(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)
(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)
:process nil
:greeting nil))
(buffer (format " *%s session for %s@%s:%d%s"
- (concat elmo-network-session-name-prefix name)
+ name
user
server
port
(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))
"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
(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))))
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")))
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)
;; 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 .*\\(<[^\>]+>\\)"
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
(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))))
(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))
(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))
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))
+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
(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)
(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)
(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.
(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
(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]
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))
(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)
(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.
(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)
: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")
"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.
(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)