* bug#34675: 27.0.50; (MS-Windows) DND fails for UNC filename on same server
@ 2019-02-27 13:41 Richard Copley
2019-03-02 12:01 ` Eli Zaretskii
0 siblings, 1 reply; 6+ messages in thread
From: Richard Copley @ 2019-02-27 13:41 UTC (permalink / raw)
To: 34675
[-- Attachment #1: Type: text/plain, Size: 3299 bytes --]
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))
[-- Attachment #2: Type: text/html, Size: 3687 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#34675: 27.0.50; (MS-Windows) DND fails for UNC filename on same server
2019-02-27 13:41 bug#34675: 27.0.50; (MS-Windows) DND fails for UNC filename on same server Richard Copley
@ 2019-03-02 12:01 ` Eli Zaretskii
2019-03-02 12:44 ` Richard Copley
0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2019-03-02 12:01 UTC (permalink / raw)
To: Richard Copley; +Cc: 34675
> From: Richard Copley <rcopley@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.
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#34675: 27.0.50; (MS-Windows) DND fails for UNC filename on same server
2019-03-02 12:01 ` Eli Zaretskii
@ 2019-03-02 12:44 ` Richard Copley
2019-03-02 18:12 ` Eli Zaretskii
0 siblings, 1 reply; 6+ messages in thread
From: Richard Copley @ 2019-03-02 12:44 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 34675
[-- Attachment #1: Type: text/plain, Size: 3069 bytes --]
On Sat, 2 Mar 2019 at 12:01, Eli Zaretskii <eliz@gnu.org> wrote:
> > From: Richard Copley <rcopley@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)
[-- Attachment #2: Type: text/html, Size: 4195 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#34675: 27.0.50; (MS-Windows) DND fails for UNC filename on same server
2019-03-02 12:44 ` Richard Copley
@ 2019-03-02 18:12 ` Eli Zaretskii
2019-03-02 21:19 ` Richard Copley
0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2019-03-02 18:12 UTC (permalink / raw)
To: Richard Copley; +Cc: 34675
> From: Richard Copley <rcopley@gmail.com>
> Date: Sat, 2 Mar 2019 12:44:02 +0000
> Cc: 34675@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.)
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#34675: 27.0.50; (MS-Windows) DND fails for UNC filename on same server
2019-03-02 18:12 ` Eli Zaretskii
@ 2019-03-02 21:19 ` Richard Copley
2019-03-03 3:32 ` Eli Zaretskii
0 siblings, 1 reply; 6+ messages in thread
From: Richard Copley @ 2019-03-02 21:19 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 34675
[-- Attachment #1: Type: text/plain, Size: 1702 bytes --]
On Sat, 2 Mar 2019 at 18:12, Eli Zaretskii <eliz@gnu.org> wrote:
> > From: Richard Copley <rcopley@gmail.com>
> > Date: Sat, 2 Mar 2019 12:44:02 +0000
> > Cc: 34675@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.
[-- Attachment #2: Type: text/html, Size: 2635 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-03-03 3:32 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-27 13:41 bug#34675: 27.0.50; (MS-Windows) DND fails for UNC filename on same server Richard Copley
2019-03-02 12:01 ` Eli Zaretskii
2019-03-02 12:44 ` Richard Copley
2019-03-02 18:12 ` Eli Zaretskii
2019-03-02 21:19 ` Richard Copley
2019-03-03 3:32 ` Eli Zaretskii
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.