From 01a5793322a7c10a853ad5fef2dcbfad24e88a77 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Thu, 21 Sep 2000 00:11:15 +0000 Subject: [PATCH] Synch with Gnus. --- lisp/ChangeLog | 8 ++++++++ lisp/gnus-score.el | 2 +- lisp/nnheader.el | 22 ++++++++++++++++++---- texi/ChangeLog | 5 +++++ texi/gnus-ja.texi | 7 +++++++ texi/gnus.texi | 7 +++++++ 6 files changed, 46 insertions(+), 5 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c9ef545..0ad7478 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2000-07-16 Dmitry Bely + + * nnheader.el (nnheader-translate-file-chars): Path splitting on NT. + +2000-09-20 18:33:00 ShengHuo ZHU + + * gnus-score.el (gnus-score-find-bnews): Use directory-sep-char. + 2000-09-20 17:37:46 ShengHuo ZHU * message.el (message-default-charset): Set default value in diff --git a/lisp/gnus-score.el b/lisp/gnus-score.el index 2f44019..e0927e2 100644 --- a/lisp/gnus-score.el +++ b/lisp/gnus-score.el @@ -2585,7 +2585,7 @@ GROUP using BNews sys file syntax." ;; too much. (delete-char (min (1- (point-max)) klen)) (goto-char (point-max)) - (search-backward "/") + (search-backward (char-to-string directory-sep-char)) (delete-region (1+ (point)) (point-min))) ;; If short file names were used, we have to translate slashes. (goto-char (point-min)) diff --git a/lisp/nnheader.el b/lisp/nnheader.el index 6239929..f70171b 100644 --- a/lisp/nnheader.el +++ b/lisp/nnheader.el @@ -836,10 +836,24 @@ If FULL, translate everything." 2 0)) ;; We translate -- but only the file name. We leave the directory ;; alone. - (if (string-match "/[^/]+\\'" file) - ;; This is needed on NT's and stuff. - (setq leaf (substring file (1+ (match-beginning 0))) - path (substring file 0 (1+ (match-beginning 0)))) + (if (memq system-type '(win32 w32 mswindows windows-nt)) + ;; This is needed on NT and stuff, because + ;; file-name-nondirectory is not enough to split + ;; file names, containing ':', e.g. + ;; "d:\\Work\\News\\nntp+news.fido7.ru:fido7.ru.gnu.SCORE" + ;; + ;; we are trying to correctly split such names: + ;; "d:file.name" -> "a:" "file.name" + ;; "aaa:bbb.ccc" -> "" "aaa:bbb.ccc" + ;; "d:aaa\\bbb:ccc" -> "d:aaa\\" "bbb:ccc" + ;; etc. + ;; to translate then only the file name part. + (progn + (setq leaf file + path "") + (if (string-match "\\(^\\w:\\|[/\\]\\)\\([^/\\]+\\)$" file) + (setq leaf (substring file (match-beginning 2)) + path (substring file 0 (match-beginning 2))))) ;; Fall back on this. (setq leaf (file-name-nondirectory file) path (file-name-directory file)))) diff --git a/texi/ChangeLog b/texi/ChangeLog index a187a34..5c20a34 100644 --- a/texi/ChangeLog +++ b/texi/ChangeLog @@ -1,3 +1,8 @@ +2000-09-20 John H. Palmieri + + * gnus.texi (Mail Source Customization): Document of + mail-source-incoming-file-prefix. + 2000-09-20 Simon Josefsson * gnus.texi (IMAP): Add examples. diff --git a/texi/gnus-ja.texi b/texi/gnus-ja.texi index 98548d9..bf18114 100644 --- a/texi/gnus-ja.texi +++ b/texi/gnus-ja.texi @@ -10901,6 +10901,13 @@ www.my-deja.com などのウェブメールサーバーからメールを取得します。 は @file{~/Mail/} です。現時点では、これが使われる唯一のものは前の変数 が @code{nil} であった場合、入ってきたファイルが保存される場所の指定です。 +@item mail-source-incoming-file-prefix +@vindex mail-source-incoming-file-prefix +入ってきたメールを保存するファイルのプレフィックスです。初期値 +は @file{Incoming} で、この場合ファイル +は @file{Incoming30630D_} や @file{Incoming298602ZD} のようになります。 +@code{mail-source-delete-incoming} が @code{nil} の場合だけですが。 + @item mail-source-default-file-modes @vindex mail-source-default-file-modes 全ての新しいメールファイルはこのファイルモードになります。初期値 diff --git a/texi/gnus.texi b/texi/gnus.texi index 9909aa6..038e3e5 100644 --- a/texi/gnus.texi +++ b/texi/gnus.texi @@ -11433,6 +11433,13 @@ Directory where files (if any) will be stored. The default is where the incoming files will be stored if the previous variable is @code{nil}. +@item mail-source-incoming-file-prefix +@vindex mail-source-incoming-file-prefix +Prefix for file name for storing incoming mail. The default is +@file{Incoming}, in which case files will end up with names like +@file{Incoming30630D_} or @file{Incoming298602ZD}. This is really only +relevant if @code{mail-source-delete-incoming} is @code{nil}. + @item mail-source-default-file-modes @vindex mail-source-default-file-modes All new mail files will get this file mode. The default is 384. -- 1.7.10.4