"*Regular expression of UNIX Mail delimiter.")
(defvar elmo-archive-header-regexp "^[ \t]*[-=][-=][-=][-=]"
- "*Common regexp of the delimiter in listing archive.") ;; marche
+ "*Common regexp of the delimiter in listing archive.") ; marche
(defvar elmo-archive-file-regexp-alist
(append
(if elmo-archive-lha-dos-compatible
- '((lha . "^%s\\([0-9]+\\)$")) ; OS/2,DOS w/ "-x"
+ '((lha . "^%s\\([0-9]+\\)$")) ; OS/2,DOS w/ "-x"
'((lha . "^.*[ \t]%s\\([0-9]+\\)$")))
'((zip . "^.*[ \t]%s\\([0-9]+\\)$")
(zoo . "^.*[ \t]%s\\([0-9]+\\)$")
- (tar . "^%s\\([0-9]+\\)$") ; ok
- (tgz . "^%s\\([0-9]+\\)$") ; ok
+ (tar . "^%s\\([0-9]+\\)$") ; ok
+ (tgz . "^%s\\([0-9]+\\)$") ; ok
(rar . "^[ \t]%s\\([0-9]+\\)$"))))
(defvar elmo-archive-suffix-alist
'((lha . ".lzh") ; default
-; (lha . ".lzs")
+;;; (lha . ".lzs")
(zip . ".zip")
(zoo . ".zoo")
-; (arc . ".arc")
-; (arj . ".arj")
+;;; (arc . ".arc")
+;;; (arj . ".arj")
(rar . ".rar")
(tar . ".tar")
(tgz . ".tar.gz")))
(rm . ("lha" "d"))
(ls . ("lha" "l" "-x"))
(cat . ("lha" "p" "-n"))
- (ext . ("lha" "x")) ; "-x"
+ (ext . ("lha" "x")) ; "-x"
)
;; some UN|X
'((cp . ("lha" "u"))
(mv . ("zoo" "aMq"))
(mv-pipe . ("zoo" "aMqI"))
(rm . ("zoo" "Dq"))
- (ls . ("zoo" "l")) ; normal
+ (ls . ("zoo" "l")) ; normal
(cat . ("zoo" "xpq"))
(ext . ("zoo" "xq"))))
'((ls . ("gtar" "-tf"))
(cat . ("gtar" "--posix Oxf"))
(ext . ("gtar" "-xf"))
- ;;(rm . ("gtar" "--posix" "--delete" "-f")) ;; well not work
+;;; (rm . ("gtar" "--posix" "--delete" "-f")) ; well not work
)
- '((ls . ("gtar" "-tf"))
- (cat . ("gtar" "-Oxf"))
- (ext . ("gtar" "-xf"))
- ;;(rm . ("gtar" "--delete" "-f")) ;; well not work
- )))
+ '((ls . ("gtar" "-tf"))
+ (cat . ("gtar" "-Oxf"))
+ (ext . ("gtar" "-xf"))
+;;; (rm . ("gtar" "--delete" "-f")) ;; well not work
+ )))
;;; GNU tar (*.tar.gz, *.tar.Z, *.tar.bz2)
(defvar elmo-archive-tgz-method-alist
'((ls . ("gtar" "-ztf"))
(cat . ("gtar" "-Ozxf"))
(create . ("gtar" "-zcf"))
- ;;(rm . elmo-archive-tgz-rm-func)
+;;; (rm . elmo-archive-tgz-rm-func)
(cp . elmo-archive-tgz-cp-func)
(mv . elmo-archive-tgz-mv-func)
(ext . ("gtar" "-zxf"))
(decompress . ("gzip" "-d"))
(compress . ("gzip"))
(append . ("gtar" "-uf"))
- ;;(delete . ("gtar" "--delete" "-f")) ;; well not work
+;;; (delete . ("gtar" "--delete" "-f")) ; well not work
))
(defvar elmo-archive-method-list
'(elmo-archive-lha-method-alist
elmo-archive-zip-method-alist
elmo-archive-zoo-method-alist
-; elmo-archive-tar-method-alist
+;;; elmo-archive-tar-method-alist
elmo-archive-tgz-method-alist
-; elmo-archive-arc-method-alist
-; elmo-archive-arj-method-alist
+;;; elmo-archive-arc-method-alist
+;;; elmo-archive-arj-method-alist
elmo-archive-rar-method-alist))
;;; Internal vars.
t)
(defun elmo-archive-create-folder (spec)
- (let* ((dir (directory-file-name ;; remove tail slash.
+ (let* ((dir (directory-file-name ; remove tail slash.
(elmo-archive-get-archive-directory (nth 1 spec))))
(type (nth 2 spec))
(arc (elmo-archive-get-archive-name (nth 1 spec) type)))
(error "Create folder failed; File \"%s\" exists" dir))
((file-directory-p dir)
(if (file-exists-p arc)
- t ; return value
+ t ; return value
(elmo-archive-create-file arc type spec)))
(t
(elmo-make-directory dir)
(defun elmo-archive-delete-folder (spec)
(let* ((arc (elmo-archive-get-archive-name (nth 1 spec) (nth 2 spec))))
(if (not (file-exists-p arc))
- (error "no such file: %s" arc)
+ (error "No such file: %s" arc)
(delete-file arc)
t)))
(nth 1 new-spec) (nth 2 new-spec))))
(unless (and (eq (nth 2 old-spec) (nth 2 new-spec))
(equal (nth 3 old-spec) (nth 3 new-spec)))
- (error "not same archive type and prefix"))
+ (error "Not same archive type and prefix"))
(if (not (file-exists-p old-arc))
- (error "no such file: %s" old-arc)
+ (error "No such file: %s" old-arc)
(if (file-exists-p new-arc)
- (error "already exists: %s" new-arc)
+ (error "Already exists: %s" new-arc)
(rename-file old-arc new-arc)
t))))
(elmo-archive-call-method method args t))
(elmo-delete-cr-get-content-type))))))
-(defun elmo-archive-append-msg (spec string &optional msg no-see) ;;; verrrrrry slow!!
+;; verrrrrry slow!!
+(defun elmo-archive-append-msg (spec string &optional msg no-see)
(let* ((type (nth 2 spec))
(prefix (nth 3 spec))
(arc (elmo-archive-get-archive-name (nth 1 spec) type))
nil))
(kill-buffer tmp-buffer)))))
-;;; (localdir, maildir, localnews, archive) -> archive
+;; (localdir, maildir, localnews, archive) -> archive
(defun elmo-archive-copy-msgs (dst-spec msgs src-spec
&optional loc-alist same-number)
(let* ((dst-type (nth 2 dst-spec))
(defsubst elmo-archive-article-exists-p (arc msg type)
(if (not elmo-archive-check-existance-strict)
- t ; nop
- (save-excursion ;; added 980915
+ t ; nop
+ (save-excursion ; added 980915
(let* ((method (elmo-archive-get-method type 'ls))
(args (list arc msg))
(buf (get-buffer-create " *ELMO ARCHIVE query*"))
(narrow-to-region (point-min) header-end)
(elmo-msgdb-create-overview-from-buffer number)))
-(defsubst elmo-archive-msgdb-create-entity (method archive number type &optional prefix) ;; verrrry slow!!
+;; verrrry slow!!
+(defsubst elmo-archive-msgdb-create-entity (method archive number type &optional prefix)
(let* ((msg (elmo-concat-path prefix (int-to-string number)))
(arg-list (list archive msg)))
(when (elmo-archive-article-exists-p archive msg type)
(setq overview (append overview (nth 0 result)))
(setq number-alist (append number-alist (nth 1 result)))
(setq mark-alist (append mark-alist (nth 2 result))))
-; ((looking-at delim2) ;; UNIX MAIL
-; (setq result (elmo-archive-parse-unixmail msgs))
-; (setq overview (append overview (nth 0 result)))
-; (setq number-alist (append number-alist (nth 1 result)))
-; (setq mark-alist (append mark-alist (nth 2 result))))
+;;; ((looking-at delim2) ;; UNIX MAIL
+;;; (setq result (elmo-archive-parse-unixmail msgs))
+;;; (setq overview (append overview (nth 0 result)))
+;;; (setq number-alist (append number-alist (nth 1 result)))
+;;; (setq mark-alist (append mark-alist (nth 2 result))))
(t ;; unknown format
- (error "unknown format!")))
+ (error "Unknown format!")))
(when (> num elmo-display-progress-threshold)
(setq i (+ n i))
(setq percent (/ (* i 100) num))
(setq sp (1+ (point)))
(setq ep (prog2 (re-search-forward delim)
(1+ (- (point) (length delim)))))
- (if (>= sp ep) ; no article!
- () ; nop
+ (if (>= sp ep) ; no article!
+ () ; nop
(save-excursion
(narrow-to-region sp ep)
(setq entity (elmo-archive-msgdb-create-entity-subr number))
(setq message-id
(elmo-cache-to-msgid (file-name-nondirectory path))))
(member message-id locked))
- nil ;; Don't delete caches with mark (or locked message).
+ nil;; Don't delete caches with mark (or locked message).
(if (and path
(file-directory-p path))
(progn
(delete-directory path1))))))))
(defun elmo-cache-read (msgid &optional folder number outbuf)
- "Read cache contents to outbuf"
+ "Read cache contents to OUTBUF."
(save-excursion
(let ((path (elmo-cache-exists-p msgid folder number)))
(when path
(cons (car (car cfl))
(car flist)))))
(setq cfl (cdr cfl)))
-; (prin1 firsts)
+;;; (prin1 firsts)
(while firsts
(if (and (not oldest-entity)
(cdr (cdr (car firsts))))
(setq dirs (cdr dirs)))))
(defun elmo-cache-save (msgid partial folder number &optional inbuf)
- "If partial is non-nil, save current buffer (or INBUF) as partial cache."
+ "If PARTIAL is non-nil, save current buffer (or INBUF) as partial cache."
(condition-case nil
- (save-excursion
- (let* ((path (if partial
- (elmo-cache-get-path msgid folder number)
- (elmo-cache-get-path msgid)))
- dir tmp-buf)
- (when path
- (setq dir (directory-file-name (file-name-directory path)))
- (if (not (file-exists-p dir))
- (elmo-make-directory dir))
- (if inbuf (set-buffer inbuf))
- (goto-char (point-min))
- (as-binary-output-file (write-region (point-min) (point-max)
- path nil 'no-msg)))))
- (error)))
+ (save-excursion
+ (let* ((path (if partial
+ (elmo-cache-get-path msgid folder number)
+ (elmo-cache-get-path msgid)))
+ dir tmp-buf)
+ (when path
+ (setq dir (directory-file-name (file-name-directory path)))
+ (if (not (file-exists-p dir))
+ (elmo-make-directory dir))
+ (if inbuf (set-buffer inbuf))
+ (goto-char (point-min))
+ (as-binary-output-file (write-region (point-min) (point-max)
+ path nil 'no-msg)))))
+ (error)))
(defun elmo-cache-exists-p (msgid &optional folder number)
"Returns the path if the cache exists."
ret-val))
(defun elmo-cache-collect-sub-directories (init dir &optional recursively)
- "Collect subdirectories under 'dir'"
+ "Collect subdirectories under DIR."
(let ((dirs
(delete (expand-file-name elmo-cache-dirname
elmo-msgdb-dir)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; buffer cache module
+;; buffer cache module
(defconst elmo-buffer-cache-name " *elmo cache*")
(defvar elmo-buffer-cache nil
- "Message cache. (old ... new) order alist with association
- ((\"folder\" message \"message-id\") . cache-buffer)")
+ "Message cache. (old ... new) order alist.
+With association ((\"folder\" message \"message-id\") . cache-buffer).")
(defmacro elmo-buffer-cache-buffer-get (entry)
(` (cdr (, entry))))
(setq elmo-buffer-cache (cdr top))))
(defun elmo-buffer-cache-add (fld-msg-id)
- "Adding (fld-msg-id . buf) to the top of \"elmo-buffer-cache\".
+ "Adding (FLD-MSG-ID . buf) to the top of `elmo-buffer-cache'.
Returning its cache buffer."
(let ((len (length elmo-buffer-cache))
(buf nil))
(setq n (1+ n))))
(setq elmo-buffer-cache nil))
-;;;
-;;; cache backend by Kenichi OKADA <okada@opaopa.org>
-;;;
+;;
+;; cache backend by Kenichi OKADA <okada@opaopa.org>
+;;
(defsubst elmo-cache-get-folder-directory (spec)
(if (file-name-absolute-p (nth 1 spec))
(defsubst elmo-cache-insert-header (file)
"Insert the header of the article."
(let ((beg 0)
- insert-file-contents-pre-hook ; To avoid autoconv-xmas...
+ insert-file-contents-pre-hook ; To avoid autoconv-xmas...
insert-file-contents-post-hook
format-alist)
(when (file-exists-p file)
(expand-file-name
(nth 1 (elmo-folder-get-spec folder))
(expand-file-name elmo-cache-dirname elmo-msgdb-dir)))
- (if (string-match "^[+=$!]$" folder) ;; localdir, archive, localnews
+ (if (string-match "^[+=$!]$" folder) ; localdir, archive, localnews
(setq subprefix folder)
(setq subprefix (concat folder elmo-path-sep)))
;; include parent
(mapcar '(lambda (msg) (elmo-cache-delete-msg spec msg locked))
msgs)))))
-(defun elmo-cache-list-folder (spec); called by elmo-cache-search()
+(defun elmo-cache-list-folder (spec) ; called by elmo-cache-search()
(let ((killed (and elmo-use-killed-list
(elmo-msgdb-killed-list-load
(elmo-msgdb-expand-path spec))))
(expand-file-name
(elmo-msgid-to-cache
(cdr (assq (if same-number (car msgs) next-num) number-alist)))
- dst-dir))
+ dst-dir))
(if (and (setq msgs (cdr msgs))
(not same-number))
(setq next-num (1+ next-num))))
(defun elmo-date-get-datevec (description)
(cond
((not elmo-date-match)
- (error "date match is not available"))
+ (error "Date match is not available"))
((string-match "^[ \t]*\\([0-9]+\\)?[ \t]*\\([a-zA-Z]+\\)$" description)
(let ((today
(save-match-data
(setq queue (cdr queue)))
(when (> count 0)
(if (elmo-y-or-n-p
- (format "%d pending operation(s) exists. Perform now?" count)
+ (format "%d pending operation(s) exists. Perform now? " count)
(not elmo-dop-flush-confirm) t)
(progn
(message "")
(when (and (string= func "create-folder-maybe")
(elmo-y-or-n-p
(format
- "Create folder %s failed. Abort creating?"
+ "Create folder %s failed. Abort creating? "
folder)
(not elmo-dop-flush-confirm) t))
(elmo-dop-save-pending-messages folder)
performed num)
(sit-for 1) ;
(elmo-dop-queue-save)))
- (if (elmo-y-or-n-p "Clear all pending operations?"
+ (if (elmo-y-or-n-p "Clear all pending operations? "
(not elmo-dop-flush-confirm) t)
(let ((queue elmo-dop-queue))
(while queue
matched)
(if (eq (elmo-folder-get-type folder) 'imap4)
(progn
-;; (while append-list
-;; (if (setq matched (car (rassoc (car append-list) number-alist)))
-;; (setq msgs (delete matched msgs)))
-;; (setq append-list (cdr append-list)))
+;;; (while append-list
+;;; (if (setq matched (car (rassoc (car append-list) number-alist)))
+;;; (setq msgs (delete matched msgs)))
+;;; (setq append-list (cdr append-list)))
(if msgs
(elmo-dop-queue-append folder func-name msgs)))
;; maildir... XXX hard coding.....
(when resume
;; Resume msgdb changed by elmo-dop-msgdb-create.
(let* ((resumed-list (elmo-dop-append-list-load folder t))
- (number-alist (elmo-msgdb-number-load
+ (number-alist (elmo-msgdb-number-load
(elmo-msgdb-expand-path folder)))
(appendings append-list)
pair dels)
(setq appendings (cdr appendings)))
(elmo-dop-append-list-save folder resumed-list t)))
(while appendings
- (let* ((seen-list (elmo-msgdb-seen-load
+ (let* ((seen-list (elmo-msgdb-seen-load
(elmo-msgdb-expand-path folder))))
(setq failure nil)
(setq file-string (elmo-get-file-string ; message string
(defvar elmo-imap4-extra-namespace-alist
'(("^{.*/nntp}.*$" . ".")) ; Default is for UW's remote nntp mailbox...
- "Extra namespace alist. A list of cons cell like: (REGEXP . DELIMITER) ")
+ "Extra namespace alist. A list of cons cell like: (REGEXP . DELIMITER).")
(defvar elmo-imap4-default-hierarchy-delimiter "/")
(defvar elmo-imap4-server-capability nil)
(elmo-imap4-response-value (, response) 'bye)))))
(defmacro elmo-imap4-response-bodydetail-text (response)
- "Returns text of BODY[section]<partial>"
+ "Returns text of BODY[section]<partial>."
(` (nth 3 (assq 'bodydetail (, response)))))
;;; Session commands.
(elmo-imap4-mailbox (elmo-imap4-spec-mailbox spec)))))))
(defun elmo-imap4-rename-folder (old-spec new-spec)
- ;;(elmo-imap4-send-command-wait session "close")
+;;;(elmo-imap4-send-command-wait session "close")
(elmo-imap4-send-command-wait
(elmo-imap4-get-session old-spec)
(list "rename "
result)))
(defun elmo-imap4-check-validity (spec validity-file)
- ;; Not used.
-; (elmo-imap4-send-command-wait
-; (elmo-imap4-get-session spec)
-; (list "status "
-; (elmo-imap4-mailbox
-; (elmo-imap4-spec-mailbox spec))
-; " (uidvalidity)")))
+;;; Not used.
+;;;(elmo-imap4-send-command-wait
+;;;(elmo-imap4-get-session spec)
+;;;(list "status "
+;;; (elmo-imap4-mailbox
+;;; (elmo-imap4-spec-mailbox spec))
+;;; " (uidvalidity)")))
)
(defun elmo-imap4-sync-validity (spec validity-file)
(accept-process-output process 1))
(set-process-filter process 'elmo-imap4-arrival-filter)
(set-process-sentinel process 'elmo-imap4-sentinel)
-;; (while (and (memq (process-status process) '(open run))
-;; (eq elmo-imap4-status 'initial))
-;; (message "Waiting for server response...")
-;; (accept-process-output process 1))
-;; (message "")
+;;; (while (and (memq (process-status process) '(open run))
+;;; (eq elmo-imap4-status 'initial))
+;;; (message "Waiting for server response...")
+;;; (accept-process-output process 1))
+;;; (message "")
(unless (memq elmo-imap4-status '(nonauth auth))
(signal 'elmo-open-error
(list 'elmo-network-initialize-session)))
(let ((session (elmo-imap4-get-session spec))
response)
;; commit.
-; (elmo-imap4-commit spec)
+;;; (elmo-imap4-commit spec)
(with-current-buffer (elmo-network-session-buffer session)
(setq elmo-imap4-status-callback nil)
(setq elmo-imap4-status-callback-data nil))
nil
(goto-char (+ pos len))
(buffer-substring pos (+ pos len))))))
- ;(list ' pos (+ pos len))))))
+;;; (list ' pos (+ pos len))))))
(defsubst elmo-imap4-parse-string ()
(cond ((eq (char-after (point)) ?\")
mark-alist
(elmo-msgdb-overview-entity-get-number
entity)
- ;(nth 0 entity)
+;;; (nth 0 entity)
(or (elmo-msgdb-global-mark-get
(elmo-msgdb-overview-entity-get-id
entity))
(defun elmo-localdir-delete-folder (spec)
(let* ((dir (elmo-localdir-get-folder-directory spec)))
(if (not (file-directory-p dir))
- (error "no such directory: %s" dir)
+ (error "No such directory: %s" dir)
(elmo-delete-directory dir t)
t)))
(new (elmo-localdir-get-folder-directory new-spec))
(new-dir (directory-file-name (file-name-directory new))))
(if (not (file-directory-p old))
- (error "no such directory: %s" old)
+ (error "No such directory: %s" old)
(if (file-exists-p new)
- (error "already exists directory: %s" new)
+ (error "Already exists directory: %s" new)
(if (not (file-exists-p new-dir))
(elmo-make-directory new-dir))
(rename-file old new)
"^[^.].*$" t))))
(defun elmo-maildir-update-current (spec)
- "Move all new msgs to cur in the maildir"
+ "Move all new msgs to cur in the maildir."
(let* ((maildir (elmo-maildir-get-folder-directory spec))
(news (directory-files (expand-file-name "new"
maildir)
(setq news (cdr news)))))
(defun elmo-maildir-set-mark (filename mark)
- "Mark the file in the maildir. MARK is a character."
+ "Mark the FILENAME file in the maildir. MARK is a character."
(if (string-match "^\\([^:]+:[12],\\)\\(.*\\)$" filename)
(let ((flaglist (string-to-char-list (elmo-match-string
2 filename))))
(concat filename ":2," (char-to-string mark)))))
(defun elmo-maildir-delete-mark (filename mark)
- "Mark the file in the maildir. MARK is a character."
+ "Mark the FILENAME file in the maildir. MARK is a character."
(if (string-match "^\\([^:]+:2,\\)\\(.*\\)$" filename)
(let ((flaglist (string-to-char-list (elmo-match-string
2 filename))))
(unless (file-exists-p (file-name-directory filename))
(make-directory (file-name-directory filename)))
(while (file-exists-p filename)
- ;; (sleep-for 2) ; I don't want to wait.
+;;; I don't want to wait.
+;;; (sleep-for 2)
(setq filename
(expand-file-name
(concat "tmp/" (elmo-maildir-make-unique-string))
(defsubst elmo-msgdb-append-element (list element)
(if list
- ;(append list (list element))
+;;; (append list (list element))
(nconc list (list element))
;; list is nil
(list element)))
ret-val))
(defun elmo-msgdb-mark-append (alist id mark)
- "Append mark"
+ "Append mark."
(setq alist (elmo-msgdb-append-element alist
(list id mark))))
(defun elmo-msgdb-mark-alist-to-seen-list (number-alist mark-alist seen-marks)
- "Make seen-list from mark-alist"
+ "Make seen-list from MARK-ALIST."
(let ((seen-mark-list (string-to-char-list seen-marks))
ret-val ent)
(while number-alist
number-list))
(string-to-int (elmo-filter-value condition)))))
((string= key "first")
- (setq result (< (-
+ (setq result (< (-
(length number-list)
(length (memq
(elmo-msgdb-overview-entity-get-number entity)
number-list)))
(string-to-int (elmo-filter-value condition)))))
((string= key "from")
- (setq result (string-match
+ (setq result (string-match
(elmo-filter-value condition)
(elmo-msgdb-overview-entity-get-from entity))))
((string= key "subject")
- (setq result (string-match
+ (setq result (string-match
(elmo-filter-value condition)
(elmo-msgdb-overview-entity-get-subject entity))))
((string= key "to")
(if (and (not reserve-cache) message-id)
(elmo-cache-delete message-id
folder (car msg-list)))
- ;; This is no good!!!!
- ;(setq overview (delete (assoc message-id overview) overview))
+;;; This is no good!!!!
+;;; (setq overview (delete (assoc message-id overview) overview))
(setq overview
(delq
(setq ov-entity
(defsubst elmo-msgdb-overview-entity-set-number (entity number)
(and entity (aset (cdr entity) 0 number))
entity)
- ;(setcar (cadr entity) number) entity)
+;;;(setcar (cadr entity) number) entity)
(defsubst elmo-msgdb-overview-entity-set-from (entity from)
(and entity (aset (cdr entity) 2 from))
(if (not (file-directory-p old))
()
(if (file-exists-p new)
- (error "already exists directory: %s" new)
+ (error "Already exists directory: %s" new)
(if (not (file-exists-p new-dir))
(elmo-make-directory new-dir))
(rename-file old new)))))
(function
(lambda (x)
(+ (* elmo-multi-divide-number cur-number) x)))
- (elmo-list-folder-important
+ (elmo-list-folder-important
(car folders)
(car split-number-alist))))
folders (cdr folders)))
(require 'elmo-util)
(require 'elmo-vars)
+;;; Code:
+;;
(eval-and-compile
(luna-define-class elmo-network-session () (name
host
(luna-define-method elmo-network-close-session ((session elmo-network-session))
(when (elmo-network-session-process-internal session)
-; (memq (process-status (elmo-network-session-process-internal session))
-; '(open run))
+;;; (memq (process-status (elmo-network-session-process-internal session))
+;;; '(open run))
(kill-buffer (process-buffer
(elmo-network-session-process-internal session)))
(delete-process (elmo-network-session-process-internal session))))
USER is the user-id for the authenticate.
AUTH is the authenticate method name (symbol).
STREAM-TYPE is the stream type (See also `elmo-network-stream-type-alist').
-Returns a process object. if making session failed, returns nil."
+Returns a process object. if making session failed, returns nil."
(let ((session
(luna-make-entity class
:name name
(setq elmo-nntp-server-command-alist
(nconc elmo-nntp-server-command-alist
(list (cons
- (cons
+ (cons
(elmo-network-session-host-internal (, session))
(elmo-network-session-port-internal (, session)))
(setq entry
(with-current-buffer (elmo-network-session-buffer session)
(setq elmo-nntp-read-point (point-min))
(or (elmo-nntp-read-response session t)
- (error "cannot open network"))
+ (error "Cannot open network"))
(when (eq (elmo-network-stream-type-symbol
(elmo-network-session-stream-type-internal session))
'starttls)
(elmo-nntp-send-command session "starttls")
(or (elmo-nntp-read-response session)
- (error "cannot open starttls session"))
+ (error "Cannot open starttls session"))
(starttls-negotiate
(elmo-network-session-process-internal session)))))
(defun elmo-nntp-send-mode-reader (session)
(elmo-nntp-send-command session "mode reader")
(if (null (elmo-nntp-read-response session t))
- (error "mode reader failed")))
+ (error "Mode reader failed")))
(defun elmo-nntp-send-command (session command &optional noerase)
(with-current-buffer (elmo-network-session-buffer session)
(if (looking-at "[23][0-9]+ .*$")
(progn (setq response-continue nil)
(setq elmo-nntp-read-point match-end)
- (setq response
- (if response
+ (setq response
+ (if response
(concat response "\n" response-string)
response-string)))
(if (looking-at "[^23][0-9]+ .*$")
(if not-command
(setq response-continue nil))
(setq response
- (if response
+ (if response
(concat response "\n" response-string)
response-string)))
(setq elmo-nntp-read-point match-end)))
session))
(goto-char elmo-nntp-read-point))
(elmo-delete-cr
- (buffer-substring elmo-nntp-read-point
+ (buffer-substring elmo-nntp-read-point
(- (point) 3)))))
(defun elmo-nntp-read-body (session outbuf)
(setq regexp
(format "^\\(%s[^. ]+\\)\\([. ]\\).*\n"
(if (and (elmo-nntp-spec-group spec)
- (null (string=
+ (null (string=
(elmo-nntp-spec-group spec) "")))
(concat (elmo-nntp-spec-group spec)
"\\.") "")))
(setq append-serv (concat append-serv
":" (int-to-string
(elmo-nntp-spec-port spec)))))
- (unless (eq (elmo-network-stream-type-symbol
+ (unless (eq (elmo-network-stream-type-symbol
(elmo-nntp-spec-stream-type spec))
elmo-default-nntp-stream-type)
(setq append-serv
(if (consp fld)
(list (concat "-" (car fld)
(and (elmo-nntp-spec-username spec)
- (concat
+ (concat
":" (elmo-nntp-spec-username spec)))
(and append-serv
(concat append-serv))))
(defun elmo-nntp-max-of-folder (spec)
(let ((killed-list (and elmo-use-killed-list
- (elmo-msgdb-killed-list-load
+ (elmo-msgdb-killed-list-load
(elmo-msgdb-expand-path spec))))
end-num entry)
(if elmo-nntp-groups-async
(if (setq entry
- (elmo-get-hash-val
+ (elmo-get-hash-val
(concat (elmo-nntp-spec-group spec)
(elmo-nntp-folder-postfix
(elmo-nntp-spec-username spec)
(format "group %s"
(elmo-nntp-spec-group spec)))
(setq response (elmo-nntp-read-response session))
- (if (and response
- (string-match
- "211 \\([0-9]+\\) \\([0-9]+\\) \\([0-9]+\\) [^.].+$"
+ (if (and response
+ (string-match
+ "211 \\([0-9]+\\) \\([0-9]+\\) \\([0-9]+\\) [^.].+$"
response))
(progn
(setq end-num (string-to-int
(setq ov-list (elmo-nntp-parse-overview-string str))
(while ov-list
(setq ov-entity (car ov-list))
- ;; INN bug??
-; (if (or (> (setq num (string-to-int (aref ov-entity 0)))
-; 99999)
-; (<= num 0))
-; (setq num 0))
-; (setq num (int-to-string num))
+;;; INN bug??
+;;; (if (or (> (setq num (string-to-int (aref ov-entity 0)))
+;;; 99999)
+;;; (<= num 0))
+;;; (setq num 0))
+;;; (setq num (int-to-string num))
(setq num (string-to-int (aref ov-entity 0)))
(when (or (null numlist)
(memq num numlist))
(forward-line 1)
(setq beg (point))
(setq ret-val (nconc ret-val (list ret-list))))
-; (kill-buffer tmp-buffer)
+;;; (kill-buffer tmp-buffer)
ret-val)))
(defun elmo-nntp-get-newsgroup-by-msgid (msgid server user port type)
(replace-match "")
(forward-line))))))))
-;(defun elmo-msgdb-nntp-overview-create-range (spec beg end mark)
-; (elmo-nntp-overview-create-range hostname beg end mark folder)))
+;;(defun elmo-msgdb-nntp-overview-create-range (spec beg end mark)
+;; (elmo-nntp-overview-create-range hostname beg end mark folder)))
-;(defun elmo-msgdb-nntp-max-of-folder (spec)
-; (elmo-nntp-max-of-folder hostname folder)))
+;;(defun elmo-msgdb-nntp-max-of-folder (spec)
+;; (elmo-nntp-max-of-folder hostname folder)))
(defun elmo-nntp-append-msg (spec string &optional msg no-see))
(run-hooks 'elmo-nntp-post-pre-hook)
(elmo-nntp-send-buffer session content-buf)
(elmo-nntp-send-command session ".")
- ;;(elmo-nntp-read-response buffer process t)
+;;; (elmo-nntp-read-response buffer process t)
(if (not (string-match
"^2" (setq response (elmo-nntp-read-raw-response
session))))
(if from-msgs
(elmo-list-filter from-msgs result)
result)))
- (t
+ (t
(let ((val (elmo-filter-value condition))
(negative (eq (elmo-filter-type condition) 'unmatch))
(case-fold-search t)
(let* ((received 0)
(last-point (point-min)))
(with-current-buffer (elmo-network-session-buffer session)
- (accept-process-output
+ (accept-process-output
(elmo-network-session-process-internal session) 1)
(discard-input)
;; Wait for all replies.
;; order to avoid deadlocks.
(when (or (null articles) ;All requests have been sent.
(zerop (% count elmo-nntp-header-fetch-chop-length)))
- (accept-process-output
+ (accept-process-output
(elmo-network-session-process-internal session) 1)
(discard-input)
(while (progn
;; UIDL
(elmo-pop3-send-command process "uidl")
(unless (elmo-pop3-read-response process)
- (error "UIDL failed."))
+ (error "UIDL failed"))
(unless (setq response (elmo-pop3-read-contents
(current-buffer) process))
- (error "UIDL failed."))
+ (error "UIDL failed"))
(elmo-pop3-parse-uidl-response response)))))
(defun elmo-pop3-read-contents (buffer process)
(elmo-pop3-send-command process (format
"top %s 0" (car articles))
'no-erase)
- ;; (accept-process-output process 1)
+;;; (accept-process-output process 1)
(setq articles (cdr articles))
(setq count (1+ count))
;; Every 200 requests we have to read the stream in
'elmo-pop3-retrieve-headers "Getting headers..."
(/ (* received 100) number))))
(accept-process-output process 1)
- ;(accept-process-output process)
+;;; (accept-process-output process)
(discard-input))))
;; Remove all "\r"'s.
(goto-char (point-min))
(if (file-writable-p filename)
(progn
(when mime-charset
- ;;(elmo-set-buffer-multibyte default-enable-multibyte-characters)
+;;; (elmo-set-buffer-multibyte default-enable-multibyte-characters)
(encode-mime-charset-region (point-min) (point-max) mime-charset))
(as-binary-output-file
(write-region (point-min) (point-max) filename nil 'no-msg)))
File content is encoded with MIME-CHARSET."
(elmo-set-work-buf
(prin1 object (current-buffer))
- ;;(princ "\n" (current-buffer))
+;;;(princ "\n" (current-buffer))
(elmo-save-buffer filename mime-charset)))
(defsubst elmo-imap4-decode-folder-string (string)
)
(if (file-name-absolute-p fld-name)
(setq path (expand-file-name fld-name))
+;;; (setq path (expand-file-name fld-name
+;;; elmo-localdir-folder-path))
(setq path fld-name))
- ;(setq path (expand-file-name fld-name
- ;elmo-localdir-folder-path)))
(list (if (elmo-folder-maildir-p folder)
'maildir
'localdir) path))))
(erase-buffer)
(prin1 elmo-passwd-alist tmp-buffer)
(princ "\n" tmp-buffer)
-; (if (and (file-exists-p filename)
-; (not (equal 384 (file-modes filename))))
-; (error "%s is not safe.chmod 600 %s!" filename filename))
+;;; (if (and (file-exists-p filename)
+;;; (not (equal 384 (file-modes filename))))
+;;; (error "%s is not safe.chmod 600 %s!" filename filename))
(if (file-writable-p filename)
(progn
(write-region (point-min) (point-max)
;; from subr.el
(defun elmo-replace-in-string (str regexp newtext &optional literal)
- "Replaces all matches in STR for REGEXP with NEWTEXT string.
+ "Replace all matches in STR for REGEXP with NEWTEXT string.
And returns the new string.
Optional LITERAL non-nil means do a literal replacement.
Otherwise treat \\ in NEWTEXT string as special:
(cond ((eq (elmo-folder-get-type folder1) 'imap4)
(let ((spec1 (elmo-folder-get-spec folder1))
(spec2 (elmo-folder-get-spec folder2)))
- (and ;(elmo-imap4-identical-name-space-p ;; No use.
- ; (nth 1 spec1) (nth 1 spec2))
+ (and
+;;; No use.
+;;; (elmo-imap4-identical-name-space-p
+;;; (nth 1 spec1) (nth 1 spec2))
(string= (elmo-imap4-spec-hostname spec1)
- (elmo-imap4-spec-hostname spec2)) ; hostname
+ (elmo-imap4-spec-hostname spec2)) ; hostname
(string= (elmo-imap4-spec-username spec1)
(elmo-imap4-spec-username spec2))))) ; username
(t
(list 'makunbound (list 'intern string hashtable))))
(defmacro elmo-unintern (string)
- ;; Emacs 19.28 or earlier does not have unintern.
+ "`unintern' symbol named STRING, When can use `unintern'.
+Emacs 19.28 or earlier does not have `unintern'."
(static-if (fboundp 'unintern)
(list 'unintern string)))
(buffer-substring (mime-buffer-entity-body-start-internal entity)
(mime-buffer-entity-body-end-internal entity))))
-;(luna-define-method mime-entity-content ((entity mime-elmo-entity))
-; (mime-decode-string
-; (with-current-buffer (mime-buffer-entity-buffer-internal entity)
-; (buffer-substring (mime-buffer-entity-body-start-internal entity)
-; (mime-buffer-entity-body-end-internal entity)))
-; (mime-entity-encoding entity)))
+;;(luna-define-method mime-entity-content ((entity mime-elmo-entity))
+;; (mime-decode-string
+;; (with-current-buffer (mime-buffer-entity-buffer-internal entity)
+;; (buffer-substring (mime-buffer-entity-body-start-internal entity)
+;; (mime-buffer-entity-body-end-internal entity)))
+;; (mime-entity-encoding entity)))
;;; mmelmo.el ends here