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

Re: delay with close tab



On Tue, Oct 15 2013, Katsumi Yamaoka wrote:

[...]

>> Something i don't fully understand is why you need to rely on a
>> background process to update the tab line in this case: couldn't
>> w3m-delete-buffer just trigger an immediate refresh of the tab line right
>> after killing the buffer? (it knows for sure that it's been modified).
>
> That would be a good idea.  Does this advice do the trick?
>
> (defadvice w3m-delete-buffer (after update-tab-bar activate)
>   "Update tab bar right after deleting a tab."
>   (when (eq major-mode 'w3m-mode)
>     (setq w3m-tab-timer nil)
>     (w3m-tab-line)))

Hmm... not really: i still can see the old tab for a fraction of a
second there, after the buffer is gone and a new one selected.  I
couldn't tell for sure if it's faster than before, but maybe it is.  So
it seems that that time is spent by `w3m-tab-line` to do its job (i have
~20 tabs open, in case that matters), not waiting on idle timers...

jao
-- 
The folly of mistaking a paradox for a discovery, a metaphor for a proof, a
torrent of verbiage for a spring of capital truths, and oneself for an
oracle, is inborn in us.
 -Paul Valery, poet and philosopher (1871-1945)