From: Katsumi Yamaoka <yamaoka@jpl.org>
To: Aidan Kehoe <kehoea@parhasard.net>
Cc: ding@gnus.org
Subject: Re: nnmail-pathname-coding-system breaks my XEmacs.
Date: Thu, 15 Jan 2009 09:25:00 +0900 [thread overview]
Message-ID: <b4mzlhta00z.fsf@jpl.org> (raw)
In-Reply-To: <18797.52612.666509.700581@parhasard.net>
>>>>> Aidan Kehoe <kehoea@parhasard.net> wrote:
> I made this change yesterday to do that:
> http://hg.debian.org/hg/xemacs/xemacs?cs=774e5c7522bf
--8<---------------cut here---------------start------------->8---
--- a/lisp/mule/mule-cmds.el Sun Jan 11 13:18:42 2009 +0000
+++ b/lisp/mule/mule-cmds.el Tue Jan 13 12:07:27 2009 +0000
[...]
- (define-coding-system-alias 'file-name
[...]
+ ;; These variables have magic handlers to make setting them equivalent
+ ;; to setting the file-name, terminal and keyboard coding system
+ ;; aliases. See coding.el.
+ (setq file-name-coding-system
+ (or
+ (let ((fncs (assq system-type system-type-file-name-coding)))
+ (and fncs (cdr fncs)))
+ native)
--8<---------------cut here---------------end--------------->8---
> This version of your macro works with versions of 21.5 both with and without
> that patch, and with 21.4:
> (defmacro nnmail-with-pathname-coding-system (&rest forms)
> "Bind `file-name-coding-system' while running FORMS.
> A non-nil value of `nnmail-pathname-coding-system' will be used for
> decoding and encoding file names."
> (if (featurep 'xemacs)
> `(progn
> (when (featurep 'file-coding)
> ;; Work around a bug in many 21.5 betas:
> (setq file-name-coding-system (coding-system-aliasee
> 'file-name)))
> (let ((file-name-coding-system
> nnmail-pathname-coding-system))
> ,@forms))
> `(let ((file-name-coding-system nnmail-pathname-coding-system))
> ,@forms)))
IIUC `(setq file-name-coding-system ...)' here is for XEmacs 21.5
to which your patch has not been applied yet. Is it necessary to
do that in advance whenever one binds `file-name-coding-system' to
something? In other words, supposing `file-name' will not vary
after having been set to a certain value according to the system,
isn't it enough to do it once when XEmacs starts? That is,
>>>>> In <b4mtz82duj7.fsf@jpl.org> Katsumi Yamaoka wrote:
> BTW, does this workaround do the trick?
> (if (featurep 'xemacs)
> (if (featurep 'file-coding)
> (setq file-name-coding-system
> (or file-name-coding-system
> (coding-system-name 'file-name)))))
I planned to introduce such a wrapper, however there are many
places that need it in Gnus:
$ grep '(file-name-coding-system' *.el | wc -l
88
So, I'd like to use a much simpler way to fix the problem if
possible. Note that the Gnus release (i.e. the Emacs 23 release)
is around the corner.
Regards,
P.S. I wonder why this is brought up now although binding of
pathname-coding-system (the predecessor of file-name-coding-system)
appeared first in Quassia Gnus v0.1 (1997). ;-)
next prev parent reply other threads:[~2009-01-15 0:25 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <18794.15468.881403.994781@parhasard.net>
2009-01-11 21:54 ` Reiner Steib
2009-01-12 1:08 ` Katsumi Yamaoka
2009-01-12 12:02 ` Aidan Kehoe
2009-01-13 6:46 ` Katsumi Yamaoka
2009-01-13 12:02 ` Aidan Kehoe
2009-01-14 6:36 ` Katsumi Yamaoka
2009-01-14 10:57 ` Katsumi Yamaoka
2009-01-14 11:33 ` Aidan Kehoe
2009-01-14 20:16 ` Reiner Steib
2009-01-14 20:48 ` Aidan Kehoe
2009-01-15 0:25 ` Katsumi Yamaoka [this message]
2009-01-15 0:35 ` Aidan Kehoe
2009-01-16 8:05 ` Katsumi Yamaoka
2009-01-16 14:19 ` Aidan Kehoe
2009-01-14 20:56 ` Aidan Kehoe
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=b4mzlhta00z.fsf@jpl.org \
--to=yamaoka@jpl.org \
--cc=ding@gnus.org \
--cc=kehoea@parhasard.net \
/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).