From: Thierry Volpiatto <thierry.volpiatto@gmail.com>
To: 15337@debbugs.gnu.org
Subject: bug#15337: 24.3.50; [PATCH] cd to directory name with french accent fail from term/ansi-term
Date: Thu, 12 Sep 2013 07:11:00 +0200 [thread overview]
Message-ID: <87r4cuwrob.fsf@gmail.com> (raw)
In-Reply-To: <87a9jj7eqj.fsf@gmail.com>
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Thierry Volpiatto <thierry.volpiatto@gmail.com>
>> Cc: 15337@debbugs.gnu.org
>> Date: Wed, 11 Sep 2013 16:12:28 +0200
>>
>> > IOW, please dig deeper and tell where did the unibyte string in
>> > cd-path come from, because I don't see why would it be TRT to decode
>> > it where you suggest; perhaps I'm missing something.
>>
>> I am using emacs -Q here and CDPATH is empty (I don't use it).
>> (getenv "CDPATH") => nil
>> env | grep CDPATH => empty too.
>>
>> cd is working as expected from emacs itself, but when used from term,
>> the string "~/Téléchargement" is
>> "/home/thierry/T\303\251l\303\251chargements"
>> so `file-directory-p' fails on
>> "/home/thierry/T\303\251l\303\251chargements"
>> And the CDPATH error is called.
>>
>> So the patch I send fix the problem but yes maybe the decoding should
>> occur somewhere in term.el instead when sending the string to `cd'.
>
> If you cannot figure out where does the unibyte string come from,
> please provide a test case starting from "emacs -Q". Thanks.
So from emacs -Q
(I repeat my initial message)
M-x ansi-term
cd ~/Téléchargements/
Debugger entered--Lisp error: (error "No such directory found via CDPATH environment variable")
signal(error ("No such directory found via CDPATH environment variable"))
error("No such directory found via CDPATH environment variable")
cd("/home/thierry/T\303\251l\303\251chargements")
#[(string) "\b\306\232\203\b\307\207\b\310H\311U\2031\312\313\b\314#\312\313\b T#\b\314 O\315\b T\nO!\v\fB\211,\207\b\310H\316U\203@\317\b\314\320O!\207\307\207" [string first-colon second-colon filename fileline term-pending-frame "" t 0 26 string-match ":" 1 string-to-number 47 cd nil] 4]("//home/thierry/T\303\251l\303\251chargements")
term-emulate-terminal(#<process *ansi-term*> "\n//home/thierry/T\303\251l\303\251chargements\n[01;32mthierry@dell-14z[00m:[01;34m~/T\303\251l\303\251chargements[00m$ ")
--
Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997
next prev parent reply other threads:[~2013-09-12 5:11 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-11 11:57 bug#15337: 24.3.50; [PATCH] cd to directory name with french accent fail from term/ansi-term Thierry Volpiatto
2013-09-11 13:51 ` Eli Zaretskii
2013-09-11 14:12 ` Thierry Volpiatto
2013-09-11 16:21 ` Eli Zaretskii
2013-09-12 5:11 ` Thierry Volpiatto [this message]
2013-09-12 15:33 ` Eli Zaretskii
2013-09-13 5:21 ` Thierry Volpiatto
2013-09-13 7:49 ` Eli Zaretskii
2013-09-13 11:29 ` Thierry Volpiatto
2013-09-13 11:59 ` Thierry Volpiatto
2013-09-13 13:25 ` Eli Zaretskii
2013-09-13 13:23 ` Eli Zaretskii
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r4cuwrob.fsf@gmail.com \
--to=thierry.volpiatto@gmail.com \
--cc=15337@debbugs.gnu.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.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).