From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Johan Claesson Newsgroups: gmane.emacs.bugs Subject: bug#18037: 24.3; term.el cannot track non-ascii directories Date: Fri, 14 Nov 2014 17:37:13 +0100 Message-ID: <877fyxwxfq.fsf@bredband.net> References: <877g3ddvkj.fsf@bredband.net> <83oawp6rrr.fsf@gnu.org> <87k37dcc9k.fsf@bredband.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1415983110 21914 80.91.229.3 (14 Nov 2014 16:38:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 14 Nov 2014 16:38:30 +0000 (UTC) Cc: 18037@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Nov 14 17:38:21 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 1XpJt7-0003la-3A for geb-bug-gnu-emacs@m.gmane.org; Fri, 14 Nov 2014 17:38:21 +0100 Original-Received: from localhost ([::1]:37101 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XpJt6-0001mD-Hx for geb-bug-gnu-emacs@m.gmane.org; Fri, 14 Nov 2014 11:38:20 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40071) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XpJsx-0001m4-PR for bug-gnu-emacs@gnu.org; Fri, 14 Nov 2014 11:38:17 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XpJso-00038i-U7 for bug-gnu-emacs@gnu.org; Fri, 14 Nov 2014 11:38:11 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:35547) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XpJso-00038V-Qw for bug-gnu-emacs@gnu.org; Fri, 14 Nov 2014 11:38:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XpJso-0004iV-Ak for bug-gnu-emacs@gnu.org; Fri, 14 Nov 2014 11:38:02 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: <877g3ddvkj.fsf@bredband.net> Resent-From: Johan Claesson Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 14 Nov 2014 16:38:02 +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.141598308118124 (code B ref 18037); Fri, 14 Nov 2014 16:38:02 +0000 Original-Received: (at 18037) by debbugs.gnu.org; 14 Nov 2014 16:38:01 +0000 Original-Received: from localhost ([127.0.0.1]:60993 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XpJsm-0004iF-73 for submit@debbugs.gnu.org; Fri, 14 Nov 2014 11:38:00 -0500 Original-Received: from smtprelay-b22.telenor.se ([195.54.99.213]:59879) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XpJsj-0004i3-6e for 18037@debbugs.gnu.org; Fri, 14 Nov 2014 11:37:58 -0500 Original-Received: from ipb4.telenor.se (ipb4.telenor.se [195.54.127.167]) by smtprelay-b22.telenor.se (Postfix) with ESMTP id 01226F48E for <18037@debbugs.gnu.org>; Fri, 14 Nov 2014 17:37:35 +0100 (CET) X-SENDER-IP: [213.114.158.173] X-LISTENER: [smtp.bredband.net] X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhMIAH8vZlTVcp6tPGdsb2JhbABbgw6BLoI2hQfNFoEgFwEBAQEBAQUBAQEBODuEAgEBAQECAVYjBQsIAxQBDCUPAQQZDAoUBhOIOA0B0gsBAQEHAiAYkQqEUgWgAIcKkjk8MIJLAQEB X-IPAS-Result: AhMIAH8vZlTVcp6tPGdsb2JhbABbgw6BLoI2hQfNFoEgFwEBAQEBAQUBAQEBODuEAgEBAQECAVYjBQsIAxQBDCUPAQQZDAoUBhOIOA0B0gsBAQEHAiAYkQqEUgWgAIcKkjk8MIJLAQEB X-IronPort-AV: E=Sophos;i="5.07,386,1413237600"; d="scan'208";a="682715692" Original-Received: from c-ad9e72d5.04-99-73746f3.cust.bredbandsbolaget.se (HELO goblin) ([213.114.158.173]) by ipb4.telenor.se with ESMTP; 14 Nov 2014 17:37:11 +0100 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) 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:96018 Hi, This problem is corrected in 24.4. I think the bug report can be closed. Regards, /Johan Johan Claesson writes: > Ok, good catch. > > > --- a/term.el 2014-07-16 19:22:09.348823919 +0200 > +++ b/term.el 2014-07-16 21:30:28.272894153 +0200 > @@ -3424,7 +3424,8 @@ > (substring string (1+ first-colon) second-colon)))) > (setq term-pending-frame (cons filename fileline)))) > ((= (aref string 0) ?/) > - (cd (substring string 1))) > + (cd (decode-coding-string (substring string 1) > + locale-coding-system))) > ;; Allowing the inferior to call functions in Emacs is > ;; probably too big a security hole. > ;; ((= (aref string 0) ?!) > > > > Regards, > > /Johan > > > > Eli Zaretskii writes: > >>> 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.