* wl-fldmgr.el (wl-fldmgr-make-group): Check folder name error.
* wl-draft.el (wl-draft-reply): Decode newsgroup field.
* elmo.el (elmo-make-folder): Add folder name error check.
* elmo-nntp.el (elmo-nntp-group-coding-system): New variable.
(elmo-nntp-encode-group-string): New inline function.
(elmo-nntp-decode-group-string): Ditto.
(elmo-folder-initialize): Use elmo-nntp-encode-group-string.
(elmo-nntp-folder-list-subfolders): Set processing buffer as unibyte;
Use `not' instead of `null';
Use elmo-nntp-decode-group-string.
* elmo-imap4.el (elmo-folder-list-subfolders): Don't append delimiter.
2001-10-11 Yuuichi Teranishi <teranisi@gohome.org>
+ * elmo.el (elmo-make-folder): Add folder name error check.
+
+ * elmo-nntp.el (elmo-nntp-group-coding-system): New variable.
+ (elmo-nntp-encode-group-string): New inline function.
+ (elmo-nntp-decode-group-string): Ditto.
+ (elmo-folder-initialize): Use elmo-nntp-encode-group-string.
+ (elmo-nntp-folder-list-subfolders): Set processing buffer as unibyte;
+ Use `not' instead of `null';
+ Use elmo-nntp-decode-group-string.
+
+ * elmo-imap4.el (elmo-folder-list-subfolders): Don't append delimiter.
+
* elmo-version.el (elmo-version): Up to 2.7.5.
2001-10-10 Hiroya Murata <lapis-lazuli@pop06.odn.ne.jp>
elmo-imap4-default-hierarchy-delimiter))
result append-serv type)
;; Append delimiter
- (if (and root
- (not (string= root ""))
- (not (string-match (concat "\\(.*\\)"
- (regexp-quote delim)
- "\\'")
- root)))
- (setq root (concat root delim)))
+;; (if (and root
+;; (not (string= root ""))
+;; (not (string-match (concat "\\(.*\\)"
+;; (regexp-quote delim)
+;; "\\'")
+;; root)))
+;; (setq root (concat root delim)))
(setq result (elmo-imap4-response-get-selectable-mailbox-list
(elmo-imap4-send-command-wait
session
"Non-nil means max number of msgdb is set as the max number of `list active'.
(Needed for inn 2.3 or later?).")
+(defvar elmo-nntp-group-coding-system nil
+ "A coding system for newsgroup string.")
+
+(defsubst elmo-nntp-encode-group-string (string)
+ (if elmo-nntp-group-coding-system
+ (encode-coding-string string elmo-nntp-group-coding-system)
+ string))
+
+(defsubst elmo-nntp-decode-group-string (string)
+ (if elmo-nntp-group-coding-system
+ (decode-coding-string string elmo-nntp-group-coding-system)
+ string))
+
;;; ELMO NNTP folder
(eval-and-compile
(luna-define-class elmo-nntp-folder (elmo-net-folder)
(elmo-nntp-folder-set-group-internal
folder
(if (match-beginning 1)
- (elmo-match-string 1 name)))
+ (elmo-nntp-encode-group-string
+ (elmo-match-string 1 name))))
;; Setup slots for elmo-net-folder
(elmo-net-folder-set-user-internal folder
(if (match-beginning 2)
(let ((session (elmo-nntp-get-session folder))
response ret-val top-ng append-serv use-list-active start)
(with-temp-buffer
+ (set-buffer-multibyte nil)
(if (and (elmo-nntp-folder-group-internal folder)
(elmo-nntp-select-group
session
session
(concat "list"
(if (and (elmo-nntp-folder-group-internal folder)
- (null (string= (elmo-nntp-folder-group-internal
- folder) "")))
+ (not (string= (elmo-nntp-folder-group-internal
+ folder) "")))
(concat " active"
(format " %s.*"
(elmo-nntp-folder-group-internal folder)
(elmo-net-folder-stream-type-internal folder)))))
(mapcar '(lambda (fld)
(if (consp fld)
- (list (concat "-" (car fld)
+ (list (concat "-" (elmo-nntp-decode-group-string (car fld))
(and (elmo-net-folder-user-internal folder)
(concat
":"
(elmo-net-folder-user-internal folder)))
(and append-serv
(concat append-serv))))
- (concat "-" fld
+ (concat "-" (elmo-nntp-decode-group-string fld)
(and (elmo-net-folder-user-internal folder)
(concat ":" (elmo-net-folder-user-internal
folder)))
(setq prefix (substring name 0 1))
(setq name (substring name 1)))
(setq type (intern (car (setq split (split-string name ":")))))
- (setq name (substring name (+ 1 (length (car split)))))
+ (if (> (length split) 2)
+ (setq name (substring name (+ 1 (length (car split)))))
+ (error "Error in folder name `%s'" original))
(setq prefix (concat (car split) ":")))
(setq class (format "elmo-%s" (symbol-name type)))
(require (intern class))
2001-10-11 Yuuichi Teranishi <teranisi@gohome.org>
+ * wl-message.el (wl-message-display-internal): Bind
+ `default-mime-charset'.
+
+ * wl-fldmgr.el (wl-fldmgr-make-group): Check folder name error.
+
+ * wl-draft.el (wl-draft-reply): Decode newsgroup field.
+
* Version number is increased to 2.7.5.
2001-10-10 Hiroya Murata <lapis-lazuli@pop06.odn.ne.jp>
(setq mail-followup-to
(wl-draft-make-mail-followup-to (append to cc)))
(setq mail-followup-to (wl-delete-duplicates mail-followup-to nil t)))
- (setq newsgroups (wl-parse newsgroups
- "[ \t\f\r\n,]*\\([^ \t\f\r\n,]+\\)")
- newsgroups (wl-delete-duplicates newsgroups)
- newsgroups (if newsgroups (mapconcat 'identity newsgroups ",")))
+ (with-temp-buffer ; to keep raw buffer unibyte.
+ (elmo-set-buffer-multibyte default-enable-multibyte-characters)
+ (setq newsgroups (wl-parse newsgroups
+ "[ \t\f\r\n,]*\\([^ \t\f\r\n,]+\\)")
+ newsgroups (wl-delete-duplicates newsgroups)
+ newsgroups
+ (if newsgroups
+ (mapconcat
+ (lambda (grp)
+ (setq decoder (mime-find-field-decoder 'Newsgroups 'plain))
+ (if decoder (funcall decoder grp) grp))
+ newsgroups ","))))
(setq to (wl-delete-duplicates to nil t))
(setq cc (wl-delete-duplicates
(append (wl-delete-duplicates cc nil t)
(wl-fldmgr-read-string
(read-from-minibuffer
(if access "Access Type Group: " "Group: ")))))
+ ;; To check the folder name is correct.
+ (elmo-make-folder group)
(when (or access (string-match "[\t ]*/$" group))
(setq group (if access group
(substring group 0 (match-beginning 0))))
(defun wl-message-display-internal (folder number flag
&optional force-reload unread)
- (let ((elmo-message-fetch-threshold wl-fetch-confirm-threshold))
+ (let ((elmo-message-fetch-threshold wl-fetch-confirm-threshold)
+ (default-mime-charset wl-mime-charset))
(setq wl-message-buffer-all-header-flag (eq flag 'all-header))
(prog1
(if (eq flag 'as-is)