[Top][All Lists]

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

Respect `url-show-status' for all types of status messages

From: Diane Murray
Subject: Respect `url-show-status' for all types of status messages
Date: Thu, 23 Nov 2006 02:11:32 +0100

Even though `url-show-status' is non-nil, URL displays the percentage
of total bytes transferred as messages.  This can block the
minibuffer, especially when the file to retrieve is large or the
connection is slow.  Since the documentation for the variable states
"Whether to show a running total of bytes transferred", I assume this
is a bug and have provided a patch.

2006-11-23  Diane Murray  <address@hidden>

        * url-http.el (url-http-content-length-after-change-function):
        Use `url-lazy-message'.

        * url-util.el (url-display-percentage): Only show a message if
        `url-show-status' is non-nil.

Index: url-http.el
RCS file: /cvsroot/emacs/emacs/lisp/url/url-http.el,v
retrieving revision 1.43
diff -u -r1.43 url-http.el
--- url-http.el 15 Nov 2006 23:29:43 -0000      1.43
+++ url-http.el 23 Nov 2006 00:43:30 -0000
@@ -819,7 +819,7 @@
        ;; Found the end of the document!  Wheee!
        (url-display-percentage nil nil)
-       (message "Reading... done.")
+       (url-lazy-message "Reading... done.")
        (if (url-http-parse-headers)
Index: url-util.el
RCS file: /cvsroot/emacs/emacs/lisp/url/url-util.el,v
retrieving revision 1.14
diff -u -r1.14 url-util.el
--- url-util.el 31 Jul 2006 21:36:42 -0000      1.14
+++ url-util.el 23 Nov 2006 00:47:33 -0000
@@ -244,12 +244,13 @@
 (defun url-display-percentage (fmt perc &rest args)
-  (if (null fmt)
-      (if (fboundp 'clear-progress-display)
-         (clear-progress-display))
-    (if (and (fboundp 'progress-display) perc)
-       (apply 'progress-display fmt perc args)
-      (apply 'message fmt args))))
+  (when url-show-status
+    (if (null fmt)
+       (if (fboundp 'clear-progress-display)
+           (clear-progress-display))
+      (if (and (fboundp 'progress-display) perc)
+         (apply 'progress-display fmt perc args)
+       (apply 'message fmt args)))))
 (defun url-percentage (x y)

reply via email to

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