]> code.delx.au - gnu-emacs/commitdiff
* net/browse-url.el (browse-url):
authorMichael Albinus <michael.albinus@gmx.de>
Tue, 13 May 2014 08:54:08 +0000 (10:54 +0200)
committerMichael Albinus <michael.albinus@gmx.de>
Tue, 13 May 2014 08:54:08 +0000 (10:54 +0200)
Use `unhandled-file-name-directory' when setting `default-directory',
in order to circumvent stalled remote connections.

Fixes: debbugs:17425
lisp/ChangeLog
lisp/net/browse-url.el

index 3cfb50cafd094daf34619a41a63a044b1d81d9e5..803ef1f60b2fbd1a0f7671dc2bc0bb990a33bf34 100644 (file)
@@ -1,3 +1,9 @@
+2014-05-13  Michael Albinus  <michael.albinus@gmx.de>
+
+       * net/browse-url.el (browse-url):
+       Use `unhandled-file-name-directory' when setting `default-directory',
+       in order to circumvent stalled remote connections.  (Bug#17425)
+
 2014-05-12  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * emacs-lisp/nadvice.el (advice--interactive-form): Don't get fooled
        Remove HISTFILE and HISTSIZE; it's too late to set them here.
        Add :version entry.
        (tramp-open-shell): Do not let-bind `tramp-end-of-output'.
-       Add "HISTSIZE=/dev/null" to the shell's env arguments.  Do not send
+       Add "HISTFILE=/dev/null" to the shell's env arguments.  Do not send
        extra "PSx=..." commands.
        (tramp-maybe-open-connection): Setenv HISTFILE to /dev/null.
        (Bug#17295)
index 33f4eda9604815f8744f73f19b932643869765f6..9644a509b2203740ced7c17b8ba6258aa2a5a3e7 100644 (file)
@@ -807,15 +807,15 @@ first, if that exists."
   (interactive (browse-url-interactive-arg "URL: "))
   (unless (called-interactively-p 'interactive)
     (setq args (or args (list browse-url-new-window-flag))))
+  (when (and url-handler-mode (not (file-name-absolute-p url)))
+    (setq url (expand-file-name url)))
   (let ((process-environment (copy-sequence process-environment))
        (function (or (and (string-match "\\`mailto:" url)
                           browse-url-mailto-function)
                      browse-url-browser-function))
        ;; Ensure that `default-directory' exists and is readable (b#6077).
-       (default-directory (if (and (file-directory-p default-directory)
-                                   (file-readable-p default-directory))
-                              default-directory
-                            (expand-file-name "~/"))))
+       (default-directory (or (unhandled-file-name-directory default-directory)
+                              (expand-file-name "~/"))))
     ;; When connected to various displays, be careful to use the display of
     ;; the currently selected frame, rather than the original start display,
     ;; which may not even exist any more.