From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#18037: 24.3; term.el cannot track non-ascii directories Date: Wed, 16 Jul 2014 22:13:44 +0300 Message-ID: <83oawp6rrr.fsf@gnu.org> References: <877g3ddvkj.fsf@bredband.net> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1405538065 13078 80.91.229.3 (16 Jul 2014 19:14:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 16 Jul 2014 19:14:25 +0000 (UTC) Cc: 18037@debbugs.gnu.org To: Johan Claesson Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jul 16 21:14:18 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1X7Ueg-0003R8-6H for geb-bug-gnu-emacs@m.gmane.org; Wed, 16 Jul 2014 21:14:18 +0200 Original-Received: from localhost ([::1]:40859 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X7Uef-0007Q6-N4 for geb-bug-gnu-emacs@m.gmane.org; Wed, 16 Jul 2014 15:14:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59044) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X7UeX-0007P7-0X for bug-gnu-emacs@gnu.org; Wed, 16 Jul 2014 15:14:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X7UeQ-0008Tz-SY for bug-gnu-emacs@gnu.org; Wed, 16 Jul 2014 15:14:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:33329) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X7UeQ-0008Tt-PQ for bug-gnu-emacs@gnu.org; Wed, 16 Jul 2014 15:14:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1X7UeQ-0000Zl-1p for bug-gnu-emacs@gnu.org; Wed, 16 Jul 2014 15:14:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 16 Jul 2014 19:14:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18037 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 18037-submit@debbugs.gnu.org id=B18037.14055380392189 (code B ref 18037); Wed, 16 Jul 2014 19:14:01 +0000 Original-Received: (at 18037) by debbugs.gnu.org; 16 Jul 2014 19:13:59 +0000 Original-Received: from localhost ([127.0.0.1]:56828 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X7UeM-0000ZC-JJ for submit@debbugs.gnu.org; Wed, 16 Jul 2014 15:13:58 -0400 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:60562) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X7UeK-0000Yb-H1 for 18037@debbugs.gnu.org; Wed, 16 Jul 2014 15:13:57 -0400 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0N8T00500JXDAM00@a-mtaout21.012.net.il> for 18037@debbugs.gnu.org; Wed, 16 Jul 2014 22:13:49 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N8T0059UK307U80@a-mtaout21.012.net.il>; Wed, 16 Jul 2014 22:13:49 +0300 (IDT) In-reply-to: <877g3ddvkj.fsf@bredband.net> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:91595 Archived-At: > From: Johan Claesson > Date: Wed, 16 Jul 2014 20:09:48 +0200 > > --- a/term.el 2014-07-16 19:22:09.348823919 +0200 > +++ b/term.el 2014-07-16 19:25:33.920825786 +0200 > @@ -3424,7 +3424,7 @@ > (substring string (1+ first-colon) second-colon)))) > (setq term-pending-frame (cons filename fileline)))) > ((= (aref string 0) ?/) > - (cd (substring string 1))) > + (cd (string-as-multibyte (substring string 1)))) > ;; Allowing the inferior to call functions in Emacs is > ;; probably too big a security hole. > ;; ((= (aref string 0) ?!) string-as-multibyte is not right. > (Motivation: in term-exec-1 the coding-system-for-read is set to 'binary > with the following comment: > > ;; The process's output contains not just chars but also binary > ;; escape codes, so we need to see the raw output. We will have to > ;; do the decoding by hand on the parts that are made of chars. > > I think term-command-hook is one place where such decoding is needed.) Indeed; but string-as-multibyte is not the way to decode the string. You need to use decode-coding-string and locale-coding-system.