GNU bug report logs - #16558
24.3.50; w32-shell-execute does not open url behind proxy

Previous Next

Package: emacs;

Reported by: "Stefan-W. Hahn" <info <at> s-hahn.de>

Date: Sun, 26 Jan 2014 19:26:02 UTC

Severity: normal

Found in version 24.3.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 16558 in the body.
You can then email your comments to 16558 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#16558; Package emacs. (Sun, 26 Jan 2014 19:26:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Stefan-W. Hahn" <info <at> s-hahn.de>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 26 Jan 2014 19:26:02 GMT) Full text and rfc822 format available.

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

From: "Stefan-W. Hahn" <info <at> s-hahn.de>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3.50; w32-shell-execute does not open url behind proxy
Date: Sun, 26 Jan 2014 11:58:19 +0100
In GNU Emacs 24.3.50.1 (i686-pc-mingw32)
 of 2014-01-19 on LEG570
Repository revision: 116068 eggert <at> cs.ucla.edu-20140119085053-vie4mrd7nf78r4y9
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --enable-checking 'CFLAGS=-O0 -g3' CPPFLAGS=-DGLYPH_DEBUG=1'

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


Because of commit 0c082e1484a3 (git://git.sv.gnu.org/emacs.git), which fixes
bug #16252, I ran into a problem when calling w32-shell-execute or
browse-url on a url (http/https).

Because I have to work behind a NTLM proxy I have to authenticate and
therfor I use Internet Explorer.

Because of the fix in the above commit w32-shell-execute (and also
browse-url) now call Ffile_exists_p on the url. This is translated into
url-file-exists-p, which tries to load the url; this does not work because
of the proxy. (And if this works, when not having a proxy, the file ist
loaded, and then the Interne Explorer is called on the same url; double
loading).

To solve this for me I set:

  (put 'file-exists-p 'url-file-handlers 'ignore)

I'm not sure if this is the right solution in all cases.

With kind regards,
Stefan

-- 
Stefan-W. Hahn                          It is easy to make things.
                                        It is hard to make things simple.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16558; Package emacs. (Sun, 26 Jan 2014 19:47:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: "Stefan-W. Hahn" <info <at> s-hahn.de>
Cc: 16558 <at> debbugs.gnu.org
Subject: Re: bug#16558: 24.3.50;
 w32-shell-execute does not open url behind proxy
Date: Sun, 26 Jan 2014 21:46:38 +0200
> Date: Sun, 26 Jan 2014 11:58:19 +0100
> From: "Stefan-W. Hahn" <info <at> s-hahn.de>
> 
> Because of commit 0c082e1484a3 (git://git.sv.gnu.org/emacs.git), which fixes
> bug #16252, I ran into a problem when calling w32-shell-execute or
> browse-url on a url (http/https).
> 
> Because I have to work behind a NTLM proxy I have to authenticate and
> therfor I use Internet Explorer.
> 
> Because of the fix in the above commit w32-shell-execute (and also
> browse-url) now call Ffile_exists_p on the url. This is translated into
> url-file-exists-p, which tries to load the url; this does not work because
> of the proxy. (And if this works, when not having a proxy, the file ist
> loaded, and then the Interne Explorer is called on the same url; double
> loading).
> 
> To solve this for me I set:
> 
>   (put 'file-exists-p 'url-file-handlers 'ignore)
> 
> I'm not sure if this is the right solution in all cases.

Would it help in your case to disable file handlers when calling
Ffile_exists_p?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16558; Package emacs. (Mon, 27 Jan 2014 17:12:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: "Stefan-W. Hahn" <stefan.hahn <at> s-hahn.de>
Cc: 16558 <at> debbugs.gnu.org
Subject: Re: bug#16558: 24.3.50;
 w32-shell-execute does not open url behind proxy
Date: Mon, 27 Jan 2014 19:11:28 +0200
> Date: Mon, 27 Jan 2014 18:07:37 +0100
> From: "Stefan-W. Hahn" <stefan.hahn <at> s-hahn.de>
> Cc: 16558 <at> debbugs.gnu.org
> 
> > > To solve this for me I set:
> > > 
> > >   (put 'file-exists-p 'url-file-handlers 'ignore)
> > > 
> > > I'm not sure if this is the right solution in all cases.
> > 
> > Would it help in your case to disable file handlers when calling
> > Ffile_exists_p?
> 
> I'm not sure what you mean. I tried:
> 
> (defun my-browse-url (url)
>  (let ((file-name-handler-alist nil))
>    (w32-shell-execute nil url)))
> 
> this works for my case where I can change the code around the calls to
> w32-shell-execute or browse-url.
> 
> But what to do with calls to this in other code?
> 
> Or do you mean to change file-name-handler-alist and to remove
> the "https?":
> 
>  ("\\`\\(https?\\|ftp\\|file\\|nfs\\)://" . url-file-handler)

I meant to disable file handlers inside w32-shell-execute, on the C
level, so that the call to Ffile_exists_p fails for URLs.  Would that
make your use case work again?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16558; Package emacs. (Mon, 27 Jan 2014 17:25:01 GMT) Full text and rfc822 format available.

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

From: "Stefan-W. Hahn" <stefan.hahn <at> s-hahn.de>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 16558 <at> debbugs.gnu.org
Subject: Re: bug#16558: 24.3.50; w32-shell-execute does not open url behind
 proxy
Date: Mon, 27 Jan 2014 18:07:37 +0100
Mail von Eli Zaretskii, Sun, 26 Jan 2014 at 21:46:38 +0200:

Hello,

> > To solve this for me I set:
> > 
> >   (put 'file-exists-p 'url-file-handlers 'ignore)
> > 
> > I'm not sure if this is the right solution in all cases.
> 
> Would it help in your case to disable file handlers when calling
> Ffile_exists_p?

I'm not sure what you mean. I tried:

(defun my-browse-url (url)
 (let ((file-name-handler-alist nil))
   (w32-shell-execute nil url)))

this works for my case where I can change the code around the calls to
w32-shell-execute or browse-url.

But what to do with calls to this in other code?

Or do you mean to change file-name-handler-alist and to remove
the "https?":

 ("\\`\\(https?\\|ftp\\|file\\|nfs\\)://" . url-file-handler)

With kind regards,
Stefan


-- 
Stefan-W. Hahn                          It is easy to make things.
                                        It is hard to make things simple.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16558; Package emacs. (Mon, 27 Jan 2014 17:32:02 GMT) Full text and rfc822 format available.

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

From: "Stefan-W. Hahn" <stefan.hahn <at> s-hahn.de>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 16558 <at> debbugs.gnu.org
Subject: Re: bug#16558: 24.3.50; w32-shell-execute does not open url behind
 proxy
Date: Mon, 27 Jan 2014 18:31:04 +0100
Mail von Eli Zaretskii, Mon, 27 Jan 2014 at 19:11:28 +0200:

Hello,

> I meant to disable file handlers inside w32-shell-execute, on the C
> level, so that the call to Ffile_exists_p fails for URLs.  Would that

Oh, but this is your domain.

> make your use case work again?

I think so, because you added the call to Ffile_exists_p in your change
(commit 0c082e14). The call to Fexpand_file_name is no problem, it was
already there before your change.

Another use case where a call to Ffile_exists_p does not make any sense is
when calling i.e. outlook with a message id (the url looks like:
   Outlook:00000000EFABE93C5C7E4947B0D4C936C001637FE4782400
) what I do from within org-mode.

Kind regards,
Stefan

-- 
Stefan-W. Hahn                          It is easy to make things.
                                        It is hard to make things simple.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16558; Package emacs. (Mon, 27 Jan 2014 17:55:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: "Stefan-W. Hahn" <stefan.hahn <at> s-hahn.de>
Cc: 16558 <at> debbugs.gnu.org
Subject: Re: bug#16558: 24.3.50;
 w32-shell-execute does not open url behind proxy
Date: Mon, 27 Jan 2014 19:53:46 +0200
> Date: Mon, 27 Jan 2014 18:31:04 +0100
> From: "Stefan-W. Hahn" <stefan.hahn <at> s-hahn.de>
> Cc: 16558 <at> debbugs.gnu.org
> 
> > make your use case work again?
> 
> I think so, because you added the call to Ffile_exists_p in your change
> (commit 0c082e14). The call to Fexpand_file_name is no problem, it was
> already there before your change.

OK, I will make that change soon.

> Another use case where a call to Ffile_exists_p does not make any sense is
> when calling i.e. outlook with a message id (the url looks like:
>    Outlook:00000000EFABE93C5C7E4947B0D4C936C001637FE4782400
> ) what I do from within org-mode.

Alas, there's no way to know if a string names a file, except by
trying to access it as a file.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16558; Package emacs. (Sat, 01 Feb 2014 09:26:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: stefan.hahn <at> s-hahn.de
Cc: 16558 <at> debbugs.gnu.org
Subject: Re: bug#16558: 24.3.50;
 w32-shell-execute does not open url behind proxy
Date: Sat, 01 Feb 2014 11:24:55 +0200
> Date: Mon, 27 Jan 2014 19:53:46 +0200
> From: Eli Zaretskii <eliz <at> gnu.org>
> Cc: 16558 <at> debbugs.gnu.org
> 
> > Date: Mon, 27 Jan 2014 18:31:04 +0100
> > From: "Stefan-W. Hahn" <stefan.hahn <at> s-hahn.de>
> > Cc: 16558 <at> debbugs.gnu.org
> > 
> > > make your use case work again?
> > 
> > I think so, because you added the call to Ffile_exists_p in your change
> > (commit 0c082e14). The call to Fexpand_file_name is no problem, it was
> > already there before your change.
> 
> OK, I will make that change soon.

Done in trunk revision 116230, please see if your problem is now
solved.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16558; Package emacs. (Sun, 09 Feb 2014 08:55:02 GMT) Full text and rfc822 format available.

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

From: "Stefan-W. Hahn" <info <at> s-hahn.de>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 16558 <at> debbugs.gnu.org
Subject: Re: bug#16558: 24.3.50; w32-shell-execute does not open url behind
 proxy
Date: Sun, 9 Feb 2014 09:35:11 +0100
Mail von Eli Zaretskii, Sat, 01 Feb 2014 at 11:24:55 +0200:

Good morning,

> Done in trunk revision 116230, please see if your problem is now
> solved.

I tested this on windows with r116242. It works for my use case.

Thanks.
Stefan

-- 
Stefan-W. Hahn                          It is easy to make things.
                                        It is hard to make things simple.




Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Sun, 09 Feb 2014 16:26:05 GMT) Full text and rfc822 format available.

Notification sent to "Stefan-W. Hahn" <info <at> s-hahn.de>:
bug acknowledged by developer. (Sun, 09 Feb 2014 16:26:07 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: "Stefan-W. Hahn" <info <at> s-hahn.de>
Cc: 16558-done <at> debbugs.gnu.org
Subject: Re: bug#16558: 24.3.50;
 w32-shell-execute does not open url behind proxy
Date: Sun, 09 Feb 2014 18:25:39 +0200
> Date: Sun, 9 Feb 2014 09:35:11 +0100
> From: "Stefan-W. Hahn" <info <at> s-hahn.de>
> Cc: 16558 <at> debbugs.gnu.org
> 
> Mail von Eli Zaretskii, Sat, 01 Feb 2014 at 11:24:55 +0200:
> 
> Good morning,
> 
> > Done in trunk revision 116230, please see if your problem is now
> > solved.
> 
> I tested this on windows with r116242. It works for my use case.

Thanks, closing.




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

This bug report was last modified 10 years and 72 days ago.

Previous Next


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