bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#15337: 24.3.50; [PATCH] cd to directory name with french accent fail


From: Eli Zaretskii
Subject: bug#15337: 24.3.50; [PATCH] cd to directory name with french accent fail from term/ansi-term
Date: Fri, 13 Sep 2013 10:49:28 +0300

> From: Thierry Volpiatto <thierry.volpiatto@gmail.com>
> Cc: 15337@debbugs.gnu.org
> Date: Fri, 13 Sep 2013 07:21:44 +0200
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > So please see if decoding the result of prog1 with
> > decode-coding-string, like you suggested to do in 'cd', but before
> > passing it to funcall, fixes the problem.  Something like this:
> >
> >      (funcall term-command-hook
> >               (decode-coding-string
> >                 (prog1 (substring str (1+ i) end)
> >                    (setq i (match-end 0)))
> >                 locale-coding-system))
> 
> Yes it is working

Then please install.

> or just decoding 'string' in `term-command-hook' works too.

I considered that as well, but decided that doing it before
term-command-hook is called is better, since that hook might be
redefined by users of term.el (right?).  So it is better to pass the
hook an already decoded string, because Lisp code does not generally
expect to get unibyte strings, especially if they are file names.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]