[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: show a blank page while waiting for a new page after switching back to *w3m* buffer
- From: Katsumi Yamaoka <yamaoka@xxxxxxx>
- Date: Mon, 06 Apr 2015 17:20:07 +0900
- X-ml-name: emacs-w3m
- X-mail-count: 12432
- References: <87bnj4mvos.fsf@xxxxxxxxxxx> <877ftp7w7y.fsf@xxxxxxxxxxx>
In [emacs-w3m : No.12430]
On Mon, 06 Apr 2015 11:48:49 +0800, 積丹尼 wrote:
> Perhaps test with a slow net connection to see what I am talking about.
I emulated a slow connection by adding `(sleep-for 3)' at
the beginning of `w3m-process-start-process', and found (perhaps)
the problem of the advice function. It blanks out the page buffer
as fast as Emacs can, however the buffer won't be redisplayed until
the network process starts. This version forces Emacs to redisplay
the buffer immediately:
(defadvice w3m-retrieve-and-render (before clear-display-while-reading
"Clear the current display while reading a new page."
(let ((inhibit-read-only t))
(insert-char ?\n (/ (window-height) 2))
(insert-char ? (max 0 (/ (- (window-width) (length url) 11) 2)))
(insert "Reading " url "...")
To test this, delete the advice I wrote before and restart Emacs.