From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.devel Subject: Re: [mange@freemail.hu: File name encoding confusion when renaming] Date: Thu, 22 Mar 2007 21:21:31 +0900 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1174566138 20312 80.91.229.12 (22 Mar 2007 12:22:18 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 22 Mar 2007 12:22:18 +0000 (UTC) Cc: mange@freemail.hu, emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Mar 22 13:22:11 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HUMIz-0006qj-UT for ged-emacs-devel@m.gmane.org; Thu, 22 Mar 2007 13:22:10 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HUMKm-0008Q6-EM for ged-emacs-devel@m.gmane.org; Thu, 22 Mar 2007 07:24:00 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HUMKh-0008Pr-Du for emacs-devel@gnu.org; Thu, 22 Mar 2007 08:23:55 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HUMKf-0008Pf-Up for emacs-devel@gnu.org; Thu, 22 Mar 2007 08:23:54 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HUMKf-0008Pc-LT for emacs-devel@gnu.org; Thu, 22 Mar 2007 07:23:53 -0500 Original-Received: from mx1.aist.go.jp ([150.29.246.133]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HUMIp-0003FW-6b; Thu, 22 Mar 2007 08:21:59 -0400 Original-Received: from rqsmtp2.aist.go.jp (rqsmtp2.aist.go.jp [150.29.254.123]) by mx1.aist.go.jp with ESMTP id l2MCLhAn001862; Thu, 22 Mar 2007 21:21:43 +0900 (JST) env-from (handa@m17n.org) Original-Received: from smtp4.aist.go.jp by rqsmtp2.aist.go.jp with ESMTP id l2MCLgGn019230; Thu, 22 Mar 2007 21:21:42 +0900 (JST) env-from (handa@m17n.org) Original-Received: by smtp4.aist.go.jp with ESMTP id l2MCLVvW012034; Thu, 22 Mar 2007 21:21:31 +0900 (JST) env-from (handa@m17n.org) Original-Received: from handa by etlken.m17n.org with local (Exim 4.63) (envelope-from ) id 1HUMIN-0006CE-9z; Thu, 22 Mar 2007 21:21:31 +0900 In-reply-to: (message from Richard Stallman on Thu, 22 Mar 2007 01:02:39 -0400) User-Agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/22.0.95 (i686-pc-linux-gnu) MULE/5.0 (SAKAKI) X-detected-kernel: Solaris 8 (1) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:68290 Archived-At: In article , Richard Stallman writes: > [I sent this message a week ago but did not get a response.] > Can someone please DTRT and ack? Sorry for the late response. I've just installed a fix. The problem was that the first argument ABSNAME of barf_or_query_if_file_exists was not consistent in multibyteness. The function expects it not yet encoded and Fwrite_region calls it with non-encoded filename. But the other functions calls it with already encoded filename. Considering that barf_or_query_if_file_exists signals an error or show a message with ABSNAME, I think it should be a non-encoded filename. So I've installed the following change. 2007-03-22 Kenichi Handa * fileio.c (Fcopy_file): Call barf_or_query_if_file_exists with non-encoded file name. (Frename_file): Likewise. (Fadd_name_to_file): Likewise. (Fmake_symbolic_link): Likewise. --- Kenichi Handa handa@m17n.org > ------- Start of forwarded message ------- > X-Spam-Status: No, score=3D0.0 required=3D5.0 tests=3DUNPARSEABLE_RELAY=20 > autolearn=3Dfailed version=3D3.1.0 > From: Magnus Henoch > To: emacs-pretest-bug@gnu.org > Jabber-Id: legoscia@jabber.cd.chalmers.se > Date: Wed, 14 Mar 2007 06:57:21 +0100 > MIME-Version: 1.0 > Content-Type: text/plain; charset=3Diso-8859-1 > Subject: File name encoding confusion when renaming > I'm using a UTF-8 locale, and want my files to have UTF-8 filenames, > but some of them have Latin-1 names. For the purpose of bug > reproduction, such a file can be created with: > echo foo > $(printf '\345') > That is, the file's name is "=C3=A5" in Latin-1. > I want to rename this file to the same name in UTF-8: > M-: (rename-file "\345" "=C3=A5") > This fails with: > Debugger entered--Lisp error: (file-already-exists "File already exists" = "/tmp/=C3=83=C2=A5") > rename-file("=C3=83=C2=A5" "\x8e5") > eval((rename-file "=C3=83=C2=A5" "\x8e5")) > eval-expression((rename-file "=C3=83=C2=A5" "\x8e5") nil) > call-interactively(eval-expression) > However, if I set the OK-IF-ALREADY-EXISTS argument to t, renaming > succeeds: > M-: (rename-file "\345" "=C3=A5" t) > Also, renaming the file to anything else succeeds. > If Emacs crashed, and you have the Emacs process in the gdb debugger, > please include the output from the following gdb commands: > `bt full' and `xbacktrace'. > If you would like to further debug the crash, please read the file > /usr/local/share/emacs/22.0.93/etc/DEBUG for instructions. > In GNU Emacs 22.0.93.1 (powerpc-unknown-netbsd4.99.7, X toolkit, Xaw3d sc= roll bars) > of 2007-02-08 on zemdatav > X server distributor `The XFree86 Project, Inc', version 11.0.40500000 > Important settings: > value of $LC_ALL: nil > value of $LC_COLLATE: C > value of $LC_CTYPE: en_US.UTF-8 > value of $LC_MESSAGES: sv > value of $LC_MONETARY: sv_SE > value of $LC_NUMERIC: nil > value of $LC_TIME: nil > value of $LANG: nil > locale-coding-system: utf-8 > default-enable-multibyte-characters: t > Major mode: Emacs-Lisp > Minor modes in effect: > shell-dirtrack-mode: t > display-time-mode: t > jabber-activity-mode: t > jabber-mode-line-mode: t > iswitchb-mode: t > icomplete-mode: t > tooltip-mode: t > mouse-wheel-mode: t > file-name-shadow-mode: t > global-font-lock-mode: t > font-lock-mode: t > blink-cursor-mode: t > unify-8859-on-encoding-mode: t > utf-translate-cjk-mode: t > auto-compression-mode: t > line-number-mode: t > transient-mark-mode: t > Recent input: > =20 > =20 > =20 > =20 > =20 > =20 > =20 > =20 > =20 > =20 > =20 > =20 > C-u C-SPC =20 > M-x r e p o SPC r t > Recent messages: > mouse-2, RET: find function's definition > Loading jka-compr...done > uncompressing dired-aux.el.gz...done > Note: file is write protected > Magnus Rutgersson is now Online > Mark saved where search started > Making completion list... > Loading emacsbug...done > _______________________________________________ > emacs-pretest-bug mailing list > emacs-pretest-bug@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug > ------- End of forwarded message -------