GNU bug report logs -
#8259
browse-url-of-dired-file fails to browse . and ..
Previous Next
Full log
View this message in rfc822 format
Hi,
browse-url-of-dired-file signals an error if the user attempts to
browse one of the special file names '.' or '..'. I see no reason
why it should not be possible to browse these file names like any
other directory file name. Below is a patch together with a change
log entry.
2011-03-11 Ralph Schleicher <rs <at> ralph-schleicher.de>
* net/browse-url.el (browse-url-of-dired-file): Enable browsing
of special file names `.' and `..'.
--- emacs-23.3/lisp/net/browse-url.el.orig 2011-01-08 12:45:14 +0100
+++ emacs-23.3/lisp/net/browse-url.el 2011-03-11 11:42:23 +0100
@@ -756,7 +756,10 @@
(defun browse-url-of-dired-file ()
"In Dired, ask a WWW browser to display the file named on this line."
(interactive)
- (browse-url-of-file (dired-get-filename)))
+ (let ((tem (dired-get-filename t t)))
+ (if (null tem)
+ (error "No file on this line")
+ (browse-url-of-file (expand-file-name tem default-directory)))))
;;;###autoload
(defun browse-url-of-region (min max)
--
Ralph
This bug report was last modified 14 years and 22 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.