all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#8259: browse-url-of-dired-file fails to browse . and ..
@ 2011-03-15 19:55 Ralph Schleicher
  2011-05-08 18:35 ` Chong Yidong
  0 siblings, 1 reply; 2+ messages in thread
From: Ralph Schleicher @ 2011-03-15 19:55 UTC (permalink / raw
  To: 8259

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@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





^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#8259: browse-url-of-dired-file fails to browse . and ..
  2011-03-15 19:55 bug#8259: browse-url-of-dired-file fails to browse . and Ralph Schleicher
@ 2011-05-08 18:35 ` Chong Yidong
  0 siblings, 0 replies; 2+ messages in thread
From: Chong Yidong @ 2011-05-08 18:35 UTC (permalink / raw
  To: Ralph Schleicher; +Cc: 8259

Ralph Schleicher <rs@ralph-schleicher.de> writes:

> 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.

Looks reasonable.  Applied, thanks.





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-05-08 18:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-15 19:55 bug#8259: browse-url-of-dired-file fails to browse . and Ralph Schleicher
2011-05-08 18:35 ` Chong Yidong

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.