GNU bug report logs - #34675
27.0.50; (MS-Windows) DND fails for UNC filename on same server

Previous Next

Package: emacs;

Reported by: Richard Copley <rcopley <at> gmail.com>

Date: Wed, 27 Feb 2019 13:43:01 UTC

Severity: normal

Found in version 27.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

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 34675 in the body.
You can then email your comments to 34675 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#34675; Package emacs. (Wed, 27 Feb 2019 13:43:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Richard Copley <rcopley <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 27 Feb 2019 13:43:02 GMT) Full text and rfc822 format available.

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

From: Richard Copley <rcopley <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 27.0.50; (MS-Windows) DND fails for UNC filename on same server
Date: Wed, 27 Feb 2019 13:41:34 +0000
[Message part 1 (text/plain, inline)]
Open Windows Explorer in a file share on the local machine.
Drag a file from there and drop it onto Emacs.
The error "Can not read file:///server/share/file-name" is signalled.

dnd-get-local-file-uri attempts to convert the remote file name to a local
file name by removing the server name. That is not valid for UNC file
names.

In GNU Emacs 27.0.50 (build 1, x86_64-w64-mingw32)
 of 2019-02-12 built on X
Repository revision: d41f9123ecae45654f006d736996343275d774bd
Repository branch: buster
Windowing system distributor 'Microsoft Corp.', version 6.1.7601
System Description: Microsoft Windows Server 2008 R2 Standard Service Pack
1 (v6.1.1130.7601.24355)

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
dnd-open-local-file: Can not read file:///server/share/file-name
Configured using:
 'configure --config-cache --with-modules --without-pop --without-dbus
 --without-gconf --without-gsettings CFLAGS=-O3'

Configured features:
SOUND NOTIFY W32NOTIFY ACL GNUTLS ZLIB TOOLKIT_SCROLL_BARS MODULES
THREADS PDUMPER GMP

Important settings:
  value of $LANG: ENG
  locale-coding-system: cp1252

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  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 rmc puny dired dired-loaddefs
format-spec rfc822 mml easymenu mml-sec epa derived epg epg-config
gnus-util rmail rmail-loaddefs time-date mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047
rfc2045 ietf-drums mm-util mail-prsvr mail-utils browse-url url-util
url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs
password-cache json map seq byte-opt gv bytecomp byte-compile cconv
cl-loaddefs cl-lib url-vars elec-pair mule-util tooltip eldoc electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel dos-w32 ls-lisp
disp-table term/w32-win w32-win w32-vars term/common-win 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 charprop
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 threads w32notify w32
multi-tty make-network-process emacs)

Memory information:
((conses 16 55778 9941)
 (symbols 48 6721 1)
 (strings 32 19194 1886)
 (string-bytes 1 589026)
 (vectors 16 10297)
 (vector-slots 8 130876 12274)
 (floats 8 20 150)
 (intervals 56 221 18)
 (buffers 992 11))
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34675; Package emacs. (Sat, 02 Mar 2019 12:02:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Richard Copley <rcopley <at> gmail.com>
Cc: 34675 <at> debbugs.gnu.org
Subject: Re: bug#34675: 27.0.50;
 (MS-Windows) DND fails for UNC filename on same server
Date: Sat, 02 Mar 2019 14:01:00 +0200
> From: Richard Copley <rcopley <at> gmail.com>
> Date: Wed, 27 Feb 2019 13:41:34 +0000
> 
> Open Windows Explorer in a file share on the local machine.
> Drag a file from there and drop it onto Emacs.
> The error "Can not read file:///server/share/file-name" is signalled.
> 
> dnd-get-local-file-uri attempts to convert the remote file name to a local
> file name by removing the server name. That is not valid for UNC file
> names.

Thanks, but please provide a full recipe, including the pertinent
names of the server and the share.  Your local system isn't called
"server", is it?  If it is, please help me by telling how you created
such a share locally, because I don't think I know how to do that.

Apologies if I'm missing something simple here.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34675; Package emacs. (Sat, 02 Mar 2019 12:45:02 GMT) Full text and rfc822 format available.

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

From: Richard Copley <rcopley <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 34675 <at> debbugs.gnu.org
Subject: Re: bug#34675: 27.0.50; (MS-Windows) DND fails for UNC filename on
 same server
Date: Sat, 2 Mar 2019 12:44:02 +0000
[Message part 1 (text/plain, inline)]
On Sat, 2 Mar 2019 at 12:01, Eli Zaretskii <eliz <at> gnu.org> wrote:

> > From: Richard Copley <rcopley <at> gmail.com>
> > Date: Wed, 27 Feb 2019 13:41:34 +0000
> >
> > Open Windows Explorer in a file share on the local machine.
> > Drag a file from there and drop it onto Emacs.
> > The error "Can not read file:///server/share/file-name" is signalled.
> >
> > dnd-get-local-file-uri attempts to convert the remote file name to a
> local
> > file name by removing the server name. That is not valid for UNC file
> > names.
>
> Thanks, but please provide a full recipe, including the pertinent
> names of the server and the share.  Your local system isn't called
> "server", is it?  If it is, please help me by telling how you created
> such a share locally, because I don't think I know how to do that.
>
> Apologies if I'm missing something simple here.
>

Thanks for replying. I'm sorry I wasn't clear.

1. In a command prompt window, create a folder "x", and share it as
"y", and create a file "z" in the folder "x":

mkdir %HOMEDRIVE%%HOMEPATH%\x
net share y=%HOMEDRIVE%%HOMEPATH%\x
>%HOMEDRIVE%%HOMEPATH%\x\z echo.

2. Run "emacs -Q". Evaluate (system-name) in Emacs and make a note of
the result.

3. Open Explorer and enter "\\foo\y" in the address bar, where "foo"
is the system name.

4. Drag the file "z" from Explorer and drop it on Emacs. Emacs signals
an error, "dnd-open-local-file: Can not read file:///y/z".

5. Clean up:

net share y /delete
rmdir /s /q %HOMEDRIVE%%HOMEPATH%\x

End of recipe.

Just now I noticed this in the docstring of the variable
`dnd-open-remote-file-function':

"‘dnd-open-local-file’ attempts to open a remote file using its UNC name and
is the  default on MS-Windows.  ‘dnd-open-remote-url’ uses
‘url-handler-mode’
and is the default except for MS-Windows."

It sounds as though my scenario has been considered. But it is not
true now that "‘dnd-open-local-file’ attempts to open a remote file
using its UNC name".

The backtrace:

Debugger entered--Lisp error: (error "Can not read file:///y/z")
  signal(error ("Can not read file:///y/z"))
  error("Can not read %s" "file:///y/z")
  dnd-open-local-file("file:///y/z" private)
  dnd-open-file("file://foo/y/z" private)
  dnd-handle-one-url(#<window 3 on *scratch*> private "file://foo/y/z")
  w32-handle-dropped-file(#<window 3 on *scratch*> "\\\\foo\\y\\z")
  apply(w32-handle-dropped-file (#<window 3 on *scratch*> "\\\\foo\\y\\z"))
  #f(compiled-function (&rest args2) #<bytecode 0x15fd7ed>)("\\\\foo\\y\\z")
  mapc(#f(compiled-function (&rest args2) #<bytecode 0x15fd7ed>)
("\\\\foo\\y\\z"))
  w32-drag-n-drop((drag-n-drop (#<window 3 on *scratch*> 146 (304 . 67)
489947765 nil 146 (38 . 3) nil (304 . 19) (8 . 16)) ("\\\\foo\\y\\z")))
  funcall-interactively(w32-drag-n-drop (drag-n-drop (#<window 3 on
*scratch*> 146 (304 . 67) 489947765 nil 146 (38 . 3) nil (304 . 19) (8 .
16)) ("\\\\foo\\y\\z")))
  call-interactively(w32-drag-n-drop nil nil)
  command-execute(w32-drag-n-drop)
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34675; Package emacs. (Sat, 02 Mar 2019 18:13:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Richard Copley <rcopley <at> gmail.com>
Cc: 34675 <at> debbugs.gnu.org
Subject: Re: bug#34675: 27.0.50; (MS-Windows) DND fails for UNC filename on
 same server
Date: Sat, 02 Mar 2019 20:12:19 +0200
> From: Richard Copley <rcopley <at> gmail.com>
> Date: Sat, 2 Mar 2019 12:44:02 +0000
> Cc: 34675 <at> debbugs.gnu.org
> 
> 1. In a command prompt window, create a folder "x", and share it as
> "y", and create a file "z" in the folder "x":
> 
> mkdir %HOMEDRIVE%%HOMEPATH%\x
> net share y=%HOMEDRIVE%%HOMEPATH%\x
> >%HOMEDRIVE%%HOMEPATH%\x\z echo.
> 
> 2. Run "emacs -Q". Evaluate (system-name) in Emacs and make a note of
> the result.
> 
> 3. Open Explorer and enter "\\foo\y" in the address bar, where "foo"
> is the system name.
> 
> 4. Drag the file "z" from Explorer and drop it on Emacs. Emacs signals
> an error, "dnd-open-local-file: Can not read file:///y/z".
> 
> 5. Clean up:
> 
> net share y /delete
> rmdir /s /q %HOMEDRIVE%%HOMEPATH%\x
> 
> End of recipe.

Thanks, I hope I fixed that.

> Just now I noticed this in the docstring of the variable
> `dnd-open-remote-file-function':
> 
> "‘dnd-open-local-file’ attempts to open a remote file using its UNC name and
> is the  default on MS-Windows.  ‘dnd-open-remote-url’ uses ‘url-handler-mode’
> and is the default except for MS-Windows."
> 
> It sounds as though my scenario has been considered. But it is not
> true now that "‘dnd-open-local-file’ attempts to open a remote file
> using its UNC name".

I think it's true, if the UNC's //SERVER part names a system other
than the local one.  Right?  (And with my changes of a few minutes
ago, the local UNC's should also hopefully work.)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34675; Package emacs. (Sat, 02 Mar 2019 21:20:02 GMT) Full text and rfc822 format available.

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

From: Richard Copley <rcopley <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 34675 <at> debbugs.gnu.org
Subject: Re: bug#34675: 27.0.50; (MS-Windows) DND fails for UNC filename on
 same server
Date: Sat, 2 Mar 2019 21:19:00 +0000
[Message part 1 (text/plain, inline)]
On Sat, 2 Mar 2019 at 18:12, Eli Zaretskii <eliz <at> gnu.org> wrote:

> > From: Richard Copley <rcopley <at> gmail.com>
> > Date: Sat, 2 Mar 2019 12:44:02 +0000
> > Cc: 34675 <at> debbugs.gnu.org
> >
> > 1. In a command prompt window, create a folder "x", and share it as
> > "y", and create a file "z" in the folder "x":
> >
> > mkdir %HOMEDRIVE%%HOMEPATH%\x
> > net share y=%HOMEDRIVE%%HOMEPATH%\x
> > >%HOMEDRIVE%%HOMEPATH%\x\z echo.
> >
> > 2. Run "emacs -Q". Evaluate (system-name) in Emacs and make a note of
> > the result.
> >
> > 3. Open Explorer and enter "\\foo\y" in the address bar, where "foo"
> > is the system name.
> >
> > 4. Drag the file "z" from Explorer and drop it on Emacs. Emacs signals
> > an error, "dnd-open-local-file: Can not read file:///y/z".
> >
> > 5. Clean up:
> >
> > net share y /delete
> > rmdir /s /q %HOMEDRIVE%%HOMEPATH%\x
> >
> > End of recipe.
>
> Thanks, I hope I fixed that.
>

Yes I think so, thanks.


> > Just now I noticed this in the docstring of the variable
> > `dnd-open-remote-file-function':
> >
> > "‘dnd-open-local-file’ attempts to open a remote file using its UNC name
> and
> > is the  default on MS-Windows.  ‘dnd-open-remote-url’ uses
> ‘url-handler-mode’
> > and is the default except for MS-Windows."
> >
> > It sounds as though my scenario has been considered. But it is not
> > true now that "‘dnd-open-local-file’ attempts to open a remote file
> > using its UNC name".
>
> I think it's true, if the UNC's //SERVER part names a system other
> than the local one.  Right?  (And with my changes of a few minutes
> ago, the local UNC's should also hopefully work.)
>

Right, thanks.
[Message part 2 (text/html, inline)]

Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Sun, 03 Mar 2019 03:33:01 GMT) Full text and rfc822 format available.

Notification sent to Richard Copley <rcopley <at> gmail.com>:
bug acknowledged by developer. (Sun, 03 Mar 2019 03:33:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Richard Copley <rcopley <at> gmail.com>
Cc: 34675-done <at> debbugs.gnu.org
Subject: Re: bug#34675: 27.0.50; (MS-Windows) DND fails for UNC filename on
 same server
Date: Sun, 03 Mar 2019 05:32:30 +0200
> From: Richard Copley <rcopley <at> gmail.com>
> Date: Sat, 2 Mar 2019 21:19:00 +0000
> Cc: 34675 <at> debbugs.gnu.org
> 
>  Thanks, I hope I fixed that.
> 
> Yes I think so, thanks.

OK, closing.




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

This bug report was last modified 5 years and 24 days ago.

Previous Next


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