emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master e442879 1/3: Make the url file: handler be less cle


From: Lars Ingebrigtsen
Subject: [Emacs-diffs] master e442879 1/3: Make the url file: handler be less clever
Date: Fri, 13 Apr 2018 18:18:36 -0400 (EDT)

branch: master
commit e442879b5a963a6eb37403fe09f476e7ee8e0f55
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>

    Make the url file: handler be less clever
    
    * doc/misc/url.texi (file/ftp): Remove mention of the
    url-directory-index-file variable, which is no longer consulted.
    
    * lisp/url/url-file.el (url-file-build-filename): Remove the DWIM
    code from the file: handler (bug#30195): It would look for
    index.html in a directory if we asked it to fetch the directory.
    Determining what to do in a directory should be left up to the
    programs that use this low-level library.  If the library decides
    to load a different file than we specified, then things start
    falling apart, as demonstrated by this bug report.
---
 doc/misc/url.texi    |  5 -----
 etc/NEWS             | 10 +++++++++-
 lisp/url/url-file.el | 11 -----------
 3 files changed, 9 insertions(+), 17 deletions(-)

diff --git a/doc/misc/url.texi b/doc/misc/url.texi
index fb0a55b..8967c71 100644
--- a/doc/misc/url.texi
+++ b/doc/misc/url.texi
@@ -571,11 +571,6 @@ if it has the file suffix @file{.z}, @file{.gz}, @file{.Z},
 hard-coded, and cannot be altered by customizing
 @code{jka-compr-compression-info-list}.)
 
address@hidden url-directory-index-file
-This option specifies the filename to look for when a @code{file} or
address@hidden URL specifies a directory.  The default is
address@hidden  If this file exists and is readable, it is viewed.
-Otherwise, Emacs visits the directory using Dired.
 @end defopt
 
 @node info
diff --git a/etc/NEWS b/etc/NEWS
index e8383b7..d29a513 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -540,7 +540,15 @@ For instance, if /etc/mailcap has an entry for image/gif, 
that one
 will be chosen even if you have an entry for image/* in your
 ~/.mailcap file.  But with the new method, entries from ~/.mailcap
 overrides all system and Emacs-provided defaults.  To get the old
-method back, set `mailcap-prefer-mailcap-viewers' to nil
+method back, set `mailcap-prefer-mailcap-viewers' to nil.
+
+
+** URL
+
+*** The file: handler no longer looks for index.html in directories if
+you ask it for a file:///dir URL.  Since this is a low-level library,
+such decisions (if they are to be made at all) are left to
+higher-level functions.
 
 
 +++
diff --git a/lisp/url/url-file.el b/lisp/url/url-file.el
index 4fac406..92edd99 100644
--- a/lisp/url/url-file.el
+++ b/lisp/url/url-file.el
@@ -142,17 +142,6 @@ to them."
             (not (string-match "/\\'" filename)))
        (setf (url-filename url) (format "%s/" filename)))
 
-
-    ;; If it is a directory, look for an index file first.
-    (if (and (file-directory-p filename)
-            url-directory-index-file
-            (setq pos-index (expand-file-name url-directory-index-file 
filename))
-            (file-exists-p pos-index)
-            (file-readable-p pos-index))
-       (setq filename pos-index))
-
-    ;; Find the (possibly compressed) file
-    (setq filename (url-file-find-possibly-compressed-file filename))
     filename))
 
 ;;;###autoload



reply via email to

[Prev in Thread] Current Thread [Next in Thread]