From: Katsumi Yamaoka <yamaoka@jpl.org>
Subject: Why does nnmail-group-pathname encode filename?
Date: Tue, 05 Apr 2005 22:14:30 +0900 [thread overview]
Message-ID: <b9yfyy5e56x.fsf@jpl.org> (raw)
Hi,
I noticed non-ASCII group names cause an error in XEmacs. It is
because `nnmail-group-pathname' encodes a file name by
`nnmail-pathname-coding-system' as follows:
(defun nnmail-group-pathname (group dir &optional file)
"Make file name for GROUP."
[...]
(expand-file-name
(mm-encode-coding-string
(nnheader-replace-chars-in-string group ?. ?/)
nnmail-pathname-coding-system)
dir))))
The backtrace is below and here's a simple example how the
problem occurs:
(let ((file (concat "/tmp/" (string (make-char 'japanese-jisx0208 36 34))))
(file-name-coding-system 'euc-jp))
(write-region (point) (point) file)
(setq file (encode-coding-string file 'euc-jp))
(file-exists-p file))
It returns t in Emacs, but nil in XEmacs since the file name is
encoded doubly. Does anyone know the reason it is needed? In
addition to this, isn't it unnecessary that `gnus-agent-group-path'
does the same?
Debugger entered--Lisp error: (file-error "Opening output file" "No such file or directory" "/home/yamaoka/News/agent/nnrss/unnamed/########/.overview")
write-region-internal(1 1603 "/home/yamaoka/News/agent/nnrss/unnamed/########/.overview" nil silent nil raw-text)
write-region(1 1603 "/home/yamaoka/News/agent/nnrss/unnamed/########/.overview" nil silent)
gnus-agent-retrieve-headers((1 2 3 4 5 6 7 8 9 10) "nnrss:********" nil)
gnus-retrieve-headers((1 2 3 4 5 6 7 8 9 10) "nnrss:********" nil)
gnus-cache-retrieve-headers((1 2 3 4 5 6 7 8 9 10) "nnrss:********" nil)
gnus-retrieve-headers((1 2 3 4 5 6 7 8 9 10) "nnrss:********" nil)
gnus-fetch-headers((1 2 3 4 5 6 7 8 9 10))
gnus-select-newsgroup("nnrss:********" nil nil)
gnus-summary-read-group-1("nnrss:********" nil nil nil nil nil)
gnus-summary-read-group("nnrss:********" nil nil nil nil nil nil)
gnus-group-read-group(nil)
call-interactively(gnus-group-read-group)
(`********' is a non-ASCII group name, `########' is an encoded one)
reply other threads:[~2005-04-05 13:14 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b9yfyy5e56x.fsf@jpl.org \
--to=yamaoka@jpl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).