[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: delay with close tab
- From: Katsumi Yamaoka <yamaoka@xxxxxxx>
- Date: Wed, 16 Oct 2013 18:44:43 +0900
- X-ml-name: emacs-w3m
- X-mail-count: 12193
- References: <87y55wpt9m.fsf@xxxxxxxxxxxxxxxxxxxxxxxxxxx> <b4mtxgje1mx.fsf@xxxxxxx> <87txgj457m.fsf@xxxxxxx> <b4miowzdrnn.fsf@xxxxxxx> <87iowy4gbt.fsf@xxxxxxx> <87d2n6njwj.fsf@xxxxxx> <87iowycavr.fsf@xxxxxxxxxxxxxxxxxxxxxxxxxxx> <8761syhwdf.fsf@xxxxxx> <87bo2qc8fr.fsf@xxxxxxxxxxxxxxxxxxxxxxxxxxx> <87siw2gf26.fsf@xxxxxx>
In [emacs-w3m : No.12189] Michael Heerdegen wrote:
[...]
>> (run-at-time 0.1 nil
>> (lambda (buffer)
>> (when (buffer-live-p buffer)
>> (with-current-buffer buffer
>> (setq w3m-tab-timer nil)
>> ;; (when (and (eq (selected-window)
>> ;; (get-buffer-window buffer))
>> ;; w3m-process-queue)
>> ;; (inline (w3m-force-window-update)))
>> (w3m-force-window-update))))
>> current)
>>
>> with the one line (second last) added and the four old
>> removed (commentated out)?
> Indeed!
>> In that case, *YES*, that seems to have done it!
> That's good news. Then we have at least a hint what the problem is. I
> think the mistake is that the code assumes that there has already a
> redisplay being performed. Hoping Yamaoka has an idea how to fix this
> cleanly.
Uhm, so far I didn't reproduce the tabs persisting problem.
Moreover `w3m-force-window-update' there seems unnecessary at
least for Emacs 24.3.50 on Cygwin (office) and Fedora 19 (home).
But that's ok. I've applied Michael's patch. Thanks. Let us
test it.
Though I don't recall why I added `w3m-force-window-update' there
(ten years ago!), it was probably for fixing a similar problem.
Michael's patch might hint a redisplay problem of Emacs. I mean,
a function, that sees the appearance of buffer and window, might
not necessarily work as expected if it runs a bit earlier than
the next Emacs's redisplay period or a process runs then. Using
(sit-for 0) was an old trick for such a case, though it can't be
readily used since it likely stops an asynchronous process.
Perhaps all might have already been fixed in Emacs of the bleeding
edge, though. ;)