* url-dired.el requires w3
@ 2007-11-21 3:33 Diane Murray
2007-11-21 14:54 ` Stefan Monnier
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Diane Murray @ 2007-11-21 3:33 UTC (permalink / raw)
To: emacs-devel
(url-retrieve-synchronously "ftp://ftp.gnu.org/") opens a dired buffer
in `url-dired-minor-mode'. Pressing RET on a file there calls
`url-dired-find-file', yet url-dired-find-file uses `w3-fetch' and
`w3-open-local' which are not part of Emacs. The following patch
changes it to use `find-file'. w3 has its own w3-dired.el file, so
users of w3 will still have that functionality.
* url-dired.el: Don't require w3-fetch and w3-open-local.
(url-dired-find-file): Use `find-file'. Doc fix.
(url-dired-find-file-mouse, url-dired-minor-mode): Doc fix.
Index: url-dired.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/url/url-dired.el,v
retrieving revision 1.10.2.1
diff -u -r1.10.2.1 url-dired.el
--- url-dired.el 25 Jul 2007 04:18:22 -0000 1.10.2.1
+++ url-dired.el 21 Nov 2007 03:16:55 -0000
@@ -24,8 +24,6 @@
;;; Code:
-(autoload 'w3-fetch "w3")
-(autoload 'w3-open-local "w3")
(autoload 'dired-get-filename "dired")
(defvar url-dired-minor-mode-map
@@ -41,22 +39,19 @@
(make-variable-buffer-local 'url-dired-minor-mode)
(defun url-dired-find-file ()
- "In dired, visit the file or directory named on this line, using Emacs-W3."
+ "In dired, visit the file or directory named on this line."
(interactive)
(let ((filename (dired-get-filename)))
- (cond ((string-match "/\\(.*@.*\\):\\(/.*\\)" filename)
- (w3-fetch (concat "file://" (match-string 1 filename) (match-string 2 filename))))
- (t
- (w3-open-local filename)))))
+ (find-file filename)))
(defun url-dired-find-file-mouse (event)
- "In dired, visit the file or directory name you click on, using Emacs-W3."
+ "In dired, visit the file or directory name you click on."
(interactive "@e")
(mouse-set-point event)
(url-dired-find-file))
(defun url-dired-minor-mode (&optional arg)
- "Minor mode for directory browsing with Emacs-W3."
+ "Minor mode for directory browsing."
(interactive "P")
(cond
((null arg)
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: url-dired.el requires w3
2007-11-21 3:33 url-dired.el requires w3 Diane Murray
@ 2007-11-21 14:54 ` Stefan Monnier
2007-11-21 17:17 ` Diane Murray
2007-11-22 2:26 ` Richard Stallman
2007-11-28 8:28 ` Glenn Morris
2 siblings, 1 reply; 8+ messages in thread
From: Stefan Monnier @ 2007-11-21 14:54 UTC (permalink / raw)
To: Diane Murray; +Cc: emacs-devel
> (url-retrieve-synchronously "ftp://ftp.gnu.org/") opens a dired buffer
> in `url-dired-minor-mode'. Pressing RET on a file there calls
> `url-dired-find-file', yet url-dired-find-file uses `w3-fetch' and
> `w3-open-local' which are not part of Emacs. The following patch
> changes it to use `find-file'. w3 has its own w3-dired.el file, so
> users of w3 will still have that functionality.
> * url-dired.el: Don't require w3-fetch and w3-open-local.
> (url-dired-find-file): Use `find-file'. Doc fix.
> (url-dired-find-file-mouse, url-dired-minor-mode): Doc fix.
It's good to remove this dependency on W3, but `find-file' will not work
unless the user enabled url-handler-mode.
Stefan
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: url-dired.el requires w3
2007-11-21 14:54 ` Stefan Monnier
@ 2007-11-21 17:17 ` Diane Murray
2007-11-21 18:15 ` Stefan Monnier
0 siblings, 1 reply; 8+ messages in thread
From: Diane Murray @ 2007-11-21 17:17 UTC (permalink / raw)
To: Stefan Monnier; +Cc: emacs-devel
>> * url-dired.el: Don't require w3-fetch and w3-open-local.
>> (url-dired-find-file): Use `find-file'. Doc fix.
>> (url-dired-find-file-mouse, url-dired-minor-mode): Doc fix.
> It's good to remove this dependency on W3, but `find-file' will not
> work unless the user enabled url-handler-mode.
I thought so, too, at first, but the filenames are in tramp/ange-ftp
format: "/anonymous@ftp.gnu.org:/README". The old code changed remote
filenames into URLs so that `w3-fetch' could deal with them.
Diane Murray
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: url-dired.el requires w3
2007-11-21 17:17 ` Diane Murray
@ 2007-11-21 18:15 ` Stefan Monnier
2007-11-24 16:25 ` Diane Murray
0 siblings, 1 reply; 8+ messages in thread
From: Stefan Monnier @ 2007-11-21 18:15 UTC (permalink / raw)
To: Diane Murray; +Cc: emacs-devel
>>> * url-dired.el: Don't require w3-fetch and w3-open-local.
>>> (url-dired-find-file): Use `find-file'. Doc fix.
>>> (url-dired-find-file-mouse, url-dired-minor-mode): Doc fix.
>> It's good to remove this dependency on W3, but `find-file' will not
>> work unless the user enabled url-handler-mode.
> I thought so, too, at first, but the filenames are in tramp/ange-ftp
> format: "/anonymous@ftp.gnu.org:/README". The old code changed remote
> filenames into URLs so that `w3-fetch' could deal with them.
Hmm.. indeed url-dired isn't what I thought. The file needs
a `commentary' section to explain what it does (and intends to do).
It seems it's only used via url-find-file-dired called from url-file (in
url-file.el). Is that right?
Stefan
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: url-dired.el requires w3
2007-11-21 3:33 url-dired.el requires w3 Diane Murray
2007-11-21 14:54 ` Stefan Monnier
@ 2007-11-22 2:26 ` Richard Stallman
2007-11-25 1:32 ` Diane Murray
2007-11-28 8:28 ` Glenn Morris
2 siblings, 1 reply; 8+ messages in thread
From: Richard Stallman @ 2007-11-22 2:26 UTC (permalink / raw)
To: Diane Murray; +Cc: emacs-devel
What happens with your change if the user has installed w3 but it is
not loaded into Emacs?
Would it be correct to use browse-url rather than w3?
browse-url is always included in Emacs.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: url-dired.el requires w3
2007-11-22 2:26 ` Richard Stallman
@ 2007-11-25 1:32 ` Diane Murray
0 siblings, 0 replies; 8+ messages in thread
From: Diane Murray @ 2007-11-25 1:32 UTC (permalink / raw)
To: rms; +Cc: emacs-devel
> What happens with your change if the user has installed w3 but it is
> not loaded into Emacs?
I don't quite understand what you're asking here. My change removes
all w3 dependency.
> Would it be correct to use browse-url rather than w3?
> browse-url is always included in Emacs.
Since url-dired is used for ftp and file URLs only, and ange-ftp and
tramp take care of such remote directories and files, I think it's
unnecessary to hand things off to a web browser via browse-url. In
fact, the directories are under ange-ftp or tramp's control already -
`url-find-file-dired' uses `find-file' to open the directory, and only
`RET' and `mouse-2' are redefined in `url-dired-minor-mode'.
Diane Murray
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: url-dired.el requires w3
2007-11-21 3:33 url-dired.el requires w3 Diane Murray
2007-11-21 14:54 ` Stefan Monnier
2007-11-22 2:26 ` Richard Stallman
@ 2007-11-28 8:28 ` Glenn Morris
2 siblings, 0 replies; 8+ messages in thread
From: Glenn Morris @ 2007-11-28 8:28 UTC (permalink / raw)
To: Diane Murray; +Cc: emacs-devel
Diane Murray wrote:
> * url-dired.el: Don't require w3-fetch and w3-open-local.
> (url-dired-find-file): Use `find-file'. Doc fix.
> (url-dired-find-file-mouse, url-dired-minor-mode): Doc fix.
Thanks; installed.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2007-11-28 8:28 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-21 3:33 url-dired.el requires w3 Diane Murray
2007-11-21 14:54 ` Stefan Monnier
2007-11-21 17:17 ` Diane Murray
2007-11-21 18:15 ` Stefan Monnier
2007-11-24 16:25 ` Diane Murray
2007-11-22 2:26 ` Richard Stallman
2007-11-25 1:32 ` Diane Murray
2007-11-28 8:28 ` Glenn Morris
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.