From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/68166 Path: news.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.gnus.general Subject: Re: nnmail-pathname-coding-system breaks my XEmacs. Date: Thu, 15 Jan 2009 09:25:00 +0900 Organization: Emacsen advocacy group Message-ID: References: <18794.15468.881403.994781@parhasard.net> <87hc45o6ea.fsf@marauder.physik.uni-ulm.de> <18795.12614.222792.255516@parhasard.net> <18796.33500.65305.970938@parhasard.net> <18797.52612.666509.700581@parhasard.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1231979200 2395 80.91.229.12 (15 Jan 2009 00:26:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 15 Jan 2009 00:26:40 +0000 (UTC) Cc: ding@gnus.org To: Aidan Kehoe Original-X-From: ding-owner+M16610@lists.math.uh.edu Thu Jan 15 01:27:49 2009 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.50) id 1LNG5L-00032l-0e for ding-account@gmane.org; Thu, 15 Jan 2009 01:27:47 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1LNG3P-0006yZ-MV; Wed, 14 Jan 2009 18:25:47 -0600 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1LNG3M-0006yA-91 for ding@lists.math.uh.edu; Wed, 14 Jan 2009 18:25:44 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtp (Exim 4.69) (envelope-from ) id 1LNG3J-00010K-8K for ding@lists.math.uh.edu; Wed, 14 Jan 2009 18:25:44 -0600 Original-Received: from orlando.hostforweb.net ([216.246.45.90]) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1LNG3a-0002UJ-00 for ; Thu, 15 Jan 2009 01:25:58 +0100 Original-Received: from localhost ([127.0.0.1]:40735) by orlando.hostforweb.net with esmtpa (Exim 4.69) (envelope-from ) id 1LNG2j-0007Vd-7Q; Wed, 14 Jan 2009 18:25:05 -0600 X-Hashcash: 1:20:090115:kehoea@parhasard.net::uMV8AQFKigLflVAj:000000000000000000000000000000000000000000kK7 X-Hashcash: 1:20:090115:ding@gnus.org::b3wwzEmSXqY9HP4i:00004ERD X-Face: #kKnN,xUnmKia.'[pp`;Omh}odZK)?7wQSl"4o04=EixTF+V[""w~iNbM9ZL+.b*_CxUmFk B#Fu[*?MZZH@IkN:!"\w%I_zt>[$nm7nQosZ<3eu;B:$Q_:p!',P.c0-_Cy[dz4oIpw0ESA^D*1Lw= L&i*6&( User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.60 (gnu/linux) Cancel-Lock: sha1:/P5UO5IVjfIDZrJKAftf/wxJsa0= X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - orlando.hostforweb.net X-AntiAbuse: Original Domain - gnus.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - jpl.org X-Source: X-Source-Args: X-Source-Dir: X-Spam-Score: -2.6 (--) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:68166 Archived-At: >>>>> Aidan Kehoe 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 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). ;-)