[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
tabulated-list-revert runs hook before re-printing the table
From: |
Sebastian Wiesner |
Subject: |
tabulated-list-revert runs hook before re-printing the table |
Date: |
Sun, 14 Sep 2014 10:11:56 +0200 |
Hello,
tabulated-list-mode implements a custom `revert-buffer-function' named
`tabulated-list-revert', which does not run the standard `after-revert-hook`
function as far as I can see.
Instead, it has its own hook `tabulated-list-revert-hook', but this hook runs
*before* the list is re-printed with `tabulated-list-print'.
Hence, the hook still works on the “old” list, before it is updated.
What is the rationale for this? When does the hook make sense in its current
implementation?
Wouldn't it be rather more useful to run the hook *after* re-printing the error
list, so that the hook can work with the newly refreshed list?
My use case was to automatically resize a custom tabulated-list-mode to fit its
contents after every update. Currently that doesn't seem possible…
Thank you
Sebastian Wiesner
- tabulated-list-revert runs hook before re-printing the table,
Sebastian Wiesner <=