unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Respect `url-show-status' for all types of status messages
@ 2006-11-23  1:11 Diane Murray
  2006-11-23  8:42 ` Magnus Henoch
  0 siblings, 1 reply; 2+ messages in thread
From: Diane Murray @ 2006-11-23  1:11 UTC (permalink / raw)


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  <disumu@x3y2z1.net>

	* 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 @@
       (progn
 	;; 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)
 	    (url-http-activate-callback)))))
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 @@
 
 ;;;###autoload
 (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)))))
 
 ;;;###autoload
 (defun url-percentage (x y)

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

* Re: Respect `url-show-status' for all types of status messages
  2006-11-23  1:11 Respect `url-show-status' for all types of status messages Diane Murray
@ 2006-11-23  8:42 ` Magnus Henoch
  0 siblings, 0 replies; 2+ messages in thread
From: Magnus Henoch @ 2006-11-23  8:42 UTC (permalink / raw)


Diane Murray <disumu@x3y2z1.net> writes:

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

Committed.  Thanks!

Magnus

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

end of thread, other threads:[~2006-11-23  8:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-23  1:11 Respect `url-show-status' for all types of status messages Diane Murray
2006-11-23  8:42 ` Magnus Henoch

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).