From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Philipp Stephani Newsgroups: gmane.emacs.bugs Subject: bug#25949: 26.0.50; process-file fails when visiting a file with a quoted file name Date: Tue, 04 Apr 2017 12:35:11 +0000 Message-ID: References: <877f46yx6t.fsf@detlef> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a114521e05ea66f054c568257 X-Trace: blaine.gmane.org 1491309404 21307 195.159.176.226 (4 Apr 2017 12:36:44 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 4 Apr 2017 12:36:44 +0000 (UTC) To: Michael Albinus , 25949-done@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Apr 04 14:36:40 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cvNhK-0004UY-1q for geb-bug-gnu-emacs@m.gmane.org; Tue, 04 Apr 2017 14:36:34 +0200 Original-Received: from localhost ([::1]:35590 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cvNhP-0001zB-TD for geb-bug-gnu-emacs@m.gmane.org; Tue, 04 Apr 2017 08:36:39 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39055) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cvNgt-0001gu-QJ for bug-gnu-emacs@gnu.org; Tue, 04 Apr 2017 08:36:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cvNgp-0002nq-1S for bug-gnu-emacs@gnu.org; Tue, 04 Apr 2017 08:36:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:33427) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cvNgo-0002nd-Tq for bug-gnu-emacs@gnu.org; Tue, 04 Apr 2017 08:36:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cvNgo-0002v2-Il for bug-gnu-emacs@gnu.org; Tue, 04 Apr 2017 08:36:02 -0400 Resent-From: Philipp Stephani Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Tue, 04 Apr 2017 12:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 25949 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Mail-Followup-To: 25949@debbugs.gnu.org, p.stephani2@gmail.com, p.stephani2@gmail.com Original-Received: via spool by 25949-done@debbugs.gnu.org id=D25949.149130933011175 (code D ref 25949); Tue, 04 Apr 2017 12:36:02 +0000 Original-Received: (at 25949-done) by debbugs.gnu.org; 4 Apr 2017 12:35:30 +0000 Original-Received: from localhost ([127.0.0.1]:59857 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cvNgI-0002uA-3U for submit@debbugs.gnu.org; Tue, 04 Apr 2017 08:35:30 -0400 Original-Received: from mail-lf0-f44.google.com ([209.85.215.44]:35291) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cvNgF-0002tv-Uu for 25949-done@debbugs.gnu.org; Tue, 04 Apr 2017 08:35:28 -0400 Original-Received: by mail-lf0-f44.google.com with SMTP id j90so92061293lfk.2 for <25949-done@debbugs.gnu.org>; Tue, 04 Apr 2017 05:35:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=c8YPYatvN2HEN5bTQcBW3Wb6dPCn1BQFJ+tJkgniAKI=; b=RHOE7GNe7zSPqMVckQfUV6tpW30ccyH6hUj3v/8Te6Cew6lX3NmHFhChY7phExFJFr r7+2TgexNeJFP4Y+OXA8QIoiOcgHpEb1VM+/NqT4w+GExuL5iqgxz/fz2GEfTc6j3Aqn 534+akpkuvAkBMY6qEKhH6hU7pAXNzYScD5EJcwTrQ5OCgfmfaqJ1jVUYtWDpNXn66jE muVHmTqmgPDxGGmOVqE36ffctxQKrd/92rKlFVYc2Sq3zhxhg6KJGDzVNFcDwdOaYL3e w/tRI53YOPrLdSx7P6nbrg+S9Tlnuhf5VhGMHbXjF1K7BX3bMvGVYTCXsRNmtEZLFWtQ CU8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=c8YPYatvN2HEN5bTQcBW3Wb6dPCn1BQFJ+tJkgniAKI=; b=gaTLeQLvh6Vhx1mJSEAKy+fdP2X87MOXT1Sm4UN7TwBX201CwJaC5FFBVqXeQ9W7cd Xs51UyJlQYy8mzNaUNZnz0X4fBKv/gsAlnbs0eXQLLSZAPux9WY3yg+qTx3VOhxceAbr b+jxc0/M5XG2V7MnKitKAJqaFzX+4hFqybk1RZjUrbhoJ2PUCeBtCfP4Bn3Vto1eD8xD 5or3GjxiF/THOxBjUqMLMFn8jJeUq9YpXme4ASXpB431orhXe0T955nSgXpFLzQ60dAA NiO3IYeJxW0OAd3Grl4dNr+/2crlLwgfKRdWyUj06ftfZb5Wx00x2gunFkySkQqvwGKv Q5Ug== X-Gm-Message-State: AFeK/H01X3xSAPHWGUBGaA3xJ229p5e5J2kN51ztQXp1BI6fBQG9OKQhOGTiQgEvOoVcAbJ7hMvcn/q+fNgmzQ== X-Received: by 10.28.151.81 with SMTP id z78mr11506952wmd.95.1491309321689; Tue, 04 Apr 2017 05:35:21 -0700 (PDT) In-Reply-To: <877f46yx6t.fsf@detlef> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:131273 Archived-At: --001a114521e05ea66f054c568257 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Michael Albinus schrieb am Fr., 3. M=C3=A4rz 2017 = um 20:31 Uhr: > Philipp Stephani writes: > > Hi Philippe, > > > emacs -Q > > C-x C-f /:/tmp/foobar.txt (it doesn't matter whether the file > > exists) > > M-: (process-file "true") > > > > will result in an error > > There are other functions which behave similar wrong: > > M-: (start-file-process "foo" (current-buffer) "true") > M-: (shell-command "true") > > > + ;; Some operations respect file name handlers in > > + ;; `default-directory'. Because core function like > > + ;; `call-process' don't care about file name handlers in > > + ;; `default-directory', we here have to resolve the > > + ;; directory into a local one. For `process-file', this > > + ;; fixes Bug#25949. > > + (if (memq operation '(insert-directory process-file)) > > Maybe you could add them here (not tested). > Added and pushed as 604eb02fff to master. --001a114521e05ea66f054c568257 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


Michae= l Albinus <michael.albinus@gmx= .de> schrieb am Fr., 3. M=C3=A4rz 2017 um 20:31=C2=A0Uhr:
<= blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px= #ccc solid;padding-left:1ex">Philipp Stephani <p.stephani2@gmail.co= m> writes:

Hi Philippe,

>=C2=A0 =C2=A0 =C2=A0emacs -Q
>=C2=A0 =C2=A0 =C2=A0C-x C-f /:/tmp/foobar.txt (it doesn't matter wh= ether the file
>=C2=A0 =C2=A0 =C2=A0exists)
>=C2=A0 =C2=A0 =C2=A0M-: (process-file "true")
>
>=C2=A0 =C2=A0 =C2=A0will result in an error

There are other functions which behave similar wrong:

M-: (start-file-process "foo" (current-buffer) "true")<= br class=3D"gmail_msg"> M-: (shell-command "true")

> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ;; Some operations respect file na= me handlers in
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ;; `default-directory'.=C2=A0 = Because core function like
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ;; `call-process' don't ca= re about file name handlers in
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ;; `default-directory', we her= e have to resolve the
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ;; directory into a local one.=C2= =A0 For `process-file', this
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ;; fixes Bug#25949.
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0(if (memq operation '(insert-directory= process-file))

Maybe you could add them here (not tested).

Added and pushed as=C2=A0604eb02fff to master.
--001a114521e05ea66f054c568257--