GNU bug report logs - #8259
browse-url-of-dired-file fails to browse . and ..

Previous Next

Package: emacs;

Reported by: Ralph Schleicher <rs <at> ralph-schleicher.de>

Date: Tue, 15 Mar 2011 20:01:02 UTC

Severity: minor

Tags: patch

Done: Chong Yidong <cyd <at> stupidchicken.com>

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 8259 in the body.
You can then email your comments to 8259 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 owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8259; Package emacs. (Tue, 15 Mar 2011 20:01:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ralph Schleicher <rs <at> ralph-schleicher.de>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 15 Mar 2011 20:01:02 GMT) Full text and rfc822 format available.

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

From: Ralph Schleicher <rs <at> ralph-schleicher.de>
To: bug-gnu-emacs <at> gnu.org
Subject: browse-url-of-dired-file fails to browse . and ..
Date: Tue, 15 Mar 2011 20:55:43 +0100
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




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8259; Package emacs. (Sun, 08 May 2011 18:36:02 GMT) Full text and rfc822 format available.

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

From: Chong Yidong <cyd <at> stupidchicken.com>
To: Ralph Schleicher <rs <at> ralph-schleicher.de>
Cc: 8259 <at> debbugs.gnu.org
Subject: Re: bug#8259: browse-url-of-dired-file fails to browse . and ..
Date: Sun, 08 May 2011 14:35:06 -0400
Ralph Schleicher <rs <at> 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.




bug closed, send any further explanations to 8259 <at> debbugs.gnu.org and Ralph Schleicher <rs <at> ralph-schleicher.de> Request was from Chong Yidong <cyd <at> stupidchicken.com> to control <at> debbugs.gnu.org. (Sun, 08 May 2011 18:36:02 GMT) Full text and rfc822 format available.

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

This bug report was last modified 14 years and 21 days ago.

Previous Next


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