GNU bug report logs - #25949
26.0.50; process-file fails when visiting a file with a quoted file name

Previous Next

Package: emacs;

Reported by: Philipp Stephani <p.stephani2 <at> gmail.com>

Date: Fri, 3 Mar 2017 13:39:01 UTC

Severity: normal

Tags: patch

Found in version 26.0.50

Done: Philipp Stephani <p.stephani2 <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 25949 in the body.
You can then email your comments to 25949 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#25949; Package emacs. (Fri, 03 Mar 2017 13:39:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Philipp Stephani <p.stephani2 <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 03 Mar 2017 13:39:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Philipp Stephani <p.stephani2 <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.0.50;
 process-file fails when visiting a file with a quoted file name
Date: Fri, 03 Mar 2017 14:38:11 +0100
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

Debugger entered--Lisp error: (file-missing "Setting current directory" "No such file or directory" "/:/tmp/")
  call-process("true" nil nil nil)
  apply(call-process "true" nil nil nil nil)
  process-file("true" nil nil nil)
  apply(process-file ("true" nil nil nil))
  file-name-non-special(process-file "true" nil nil nil)
  apply(file-name-non-special process-file "true" nil nil nil nil)
  process-file("true" nil nil nil)
  apply(process-file ("true" nil nil nil))
  tramp-run-real-handler(process-file ("true" nil nil nil))
  tramp-file-name-handler(process-file "true" nil nil nil)
  apply(tramp-file-name-handler process-file "true" nil nil nil nil)
  process-file("true")
  eval((process-file "true") nil)
  eval-expression((process-file "true") nil)
  funcall-interactively(eval-expression (process-file "true") nil)
  call-interactively(eval-expression nil nil)
  command-execute(eval-expression)


In GNU Emacs 26.0.50 (build 10, x86_64-unknown-linux-gnu, GTK+ Version 3.10.8)
 of 2017-03-03 built on localhost
Repository revision: 244de7b0ed3bb23e700c9edef51e413602d8720a
Windowing system distributor 'The X.Org Foundation', version 11.0.11501000
System Description:	Ubuntu 14.04 LTS

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.

Configured using:
 'configure --enable-checking --enable-check-lisp-object-type
 --with-modules 'CFLAGS=-O0 -ggdb3''

Configured features:
XPM JPEG TIFF GIF PNG SOUND GSETTINGS NOTIFY GNUTLS FREETYPE XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 MODULES

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message puny seq byte-opt subr-x gv
bytecomp byte-compile cl-extra help-mode cconv cl-loaddefs pcase cl-lib
dired dired-loaddefs format-spec rfc822 mml easymenu mml-sec
password-cache epa derived epg epg-config gnus-util rmail rmail-loaddefs
mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils
mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr
mail-utils time-date mule-util tooltip eldoc electric uniquify
ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow isearch timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite charscript case-table epa-hook jka-cmpr-hook help
simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs button
faces cus-face macroexp files text-properties overlay sha1 md5 base64
format env code-pages mule custom widget hashtable-print-readable
backquote inotify dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty
make-network-process emacs)

Memory information:
((conses 16 96482 12339)
 (symbols 48 20188 1)
 (miscs 40 39 156)
 (strings 32 17690 5095)
 (string-bytes 1 576738)
 (vectors 16 14048)
 (vector-slots 8 483315 6318)
 (floats 8 48 68)
 (intervals 56 217 0)
 (buffers 976 12)
 (heap 1024 23865 964))

-- 
Google Germany GmbH
Erika-Mann-Straße 33
80636 München

Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschäftsführer: Matthew Scott Sucherman, Paul Terence Manicle

Diese E-Mail ist vertraulich.  Wenn Sie nicht der richtige Adressat sind,
leiten Sie diese bitte nicht weiter, informieren Sie den Absender und löschen
Sie die E-Mail und alle Anhänge.  Vielen Dank.

This e-mail is confidential.  If you are not the right addressee please do not
forward it, please inform the sender, and please erase this e-mail including
any attachments.  Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25949; Package emacs. (Fri, 03 Mar 2017 16:38:01 GMT) Full text and rfc822 format available.

Message #8 received at 25949 <at> debbugs.gnu.org (full text, mbox):

From: Philipp Stephani <p.stephani2 <at> gmail.com>
To: 25949 <at> debbugs.gnu.org
Subject: Re: bug#25949: 26.0.50; process-file fails when visiting a file with
 a quoted file name
Date: Fri, 03 Mar 2017 16:37:32 +0000
[Message part 1 (text/plain, inline)]
Philipp Stephani <p.stephani2 <at> gmail.com> schrieb am Fr., 3. März 2017 um
14:41 Uhr:

>
> 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
>
> Debugger entered--Lisp error: (file-missing "Setting current directory"
> "No such file or directory" "/:/tmp/")
>   call-process("true" nil nil nil)
>   apply(call-process "true" nil nil nil nil)
>   process-file("true" nil nil nil)
>   apply(process-file ("true" nil nil nil))
>   file-name-non-special(process-file "true" nil nil nil)
>   apply(file-name-non-special process-file "true" nil nil nil nil)
>   process-file("true" nil nil nil)
>   apply(process-file ("true" nil nil nil))
>   tramp-run-real-handler(process-file ("true" nil nil nil))
>   tramp-file-name-handler(process-file "true" nil nil nil)
>   apply(tramp-file-name-handler process-file "true" nil nil nil nil)
>   process-file("true")
>   eval((process-file "true") nil)
>   eval-expression((process-file "true") nil)
>   funcall-interactively(eval-expression (process-file "true") nil)
>   call-interactively(eval-expression nil nil)
>   command-execute(eval-expression)
>

The same issue can be triggered simply with

(let ((default-directory "/:/")) (process-file "true"))
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25949; Package emacs. (Fri, 03 Mar 2017 17:01:01 GMT) Full text and rfc822 format available.

Message #11 received at 25949 <at> debbugs.gnu.org (full text, mbox):

From: Philipp Stephani <p.stephani2 <at> gmail.com>
To: 25949 <at> debbugs.gnu.org
Subject: Re: bug#25949: 26.0.50; process-file fails when visiting a file with
 a quoted file name
Date: Fri, 03 Mar 2017 16:59:49 +0000
[Message part 1 (text/plain, inline)]
Philipp Stephani <p.stephani2 <at> gmail.com> schrieb am Fr., 3. März 2017 um
14:41 Uhr:

>
> 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
>
> Debugger entered--Lisp error: (file-missing "Setting current directory"
> "No such file or directory" "/:/tmp/")
>   call-process("true" nil nil nil)
>   apply(call-process "true" nil nil nil nil)
>   process-file("true" nil nil nil)
>   apply(process-file ("true" nil nil nil))
>   file-name-non-special(process-file "true" nil nil nil)
>   apply(file-name-non-special process-file "true" nil nil nil nil)
>   process-file("true" nil nil nil)
>   apply(process-file ("true" nil nil nil))
>   tramp-run-real-handler(process-file ("true" nil nil nil))
>   tramp-file-name-handler(process-file "true" nil nil nil)
>   apply(tramp-file-name-handler process-file "true" nil nil nil nil)
>   process-file("true")
>   eval((process-file "true") nil)
>   eval-expression((process-file "true") nil)
>   funcall-interactively(eval-expression (process-file "true") nil)
>   call-interactively(eval-expression nil nil)
>   command-execute(eval-expression)
>
>
Attached a patch.
[Message part 2 (text/html, inline)]
[0001-Make-process-file-resolve-the-default-directory.txt (text/plain, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25949; Package emacs. (Fri, 03 Mar 2017 19:32:02 GMT) Full text and rfc822 format available.

Message #14 received at 25949 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Philipp Stephani <p.stephani2 <at> gmail.com>
Cc: 25949 <at> debbugs.gnu.org
Subject: Re: bug#25949: 26.0.50;
 process-file fails when visiting a file with a quoted file name
Date: Fri, 03 Mar 2017 20:31:06 +0100
Philipp Stephani <p.stephani2 <at> gmail.com> 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).

Best regards, Michael.




Reply sent to Philipp Stephani <p.stephani2 <at> gmail.com>:
You have taken responsibility. (Tue, 04 Apr 2017 12:36:02 GMT) Full text and rfc822 format available.

Notification sent to Philipp Stephani <p.stephani2 <at> gmail.com>:
bug acknowledged by developer. (Tue, 04 Apr 2017 12:36:02 GMT) Full text and rfc822 format available.

Message #19 received at 25949-done <at> debbugs.gnu.org (full text, mbox):

From: Philipp Stephani <p.stephani2 <at> gmail.com>
To: Michael Albinus <michael.albinus <at> gmx.de>, 25949-done <at> debbugs.gnu.org
Subject: Re: 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 part 1 (text/plain, inline)]
Michael Albinus <michael.albinus <at> gmx.de> schrieb am Fr., 3. März 2017 um
20:31 Uhr:

> Philipp Stephani <p.stephani2 <at> gmail.com> 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.
[Message part 2 (text/html, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 03 May 2017 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 6 years and 360 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.