Gnus development mailing list
 help / color / mirror / Atom feed
* Why does nnmail-group-pathname encode filename?
@ 2005-04-05 13:14 Katsumi Yamaoka
  0 siblings, 0 replies; only message in thread
From: Katsumi Yamaoka @ 2005-04-05 13:14 UTC (permalink / 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)



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-04-05 13:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-05 13:14 Why does nnmail-group-pathname encode filename? Katsumi Yamaoka

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).