all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* tabulated-list-revert runs hook before re-printing the table
@ 2014-09-14  8:11 Sebastian Wiesner
  2014-09-14 19:20 ` Stefan Monnier
  0 siblings, 1 reply; 5+ messages in thread
From: Sebastian Wiesner @ 2014-09-14  8:11 UTC (permalink / raw)
  To: emacs-devel

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


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

end of thread, other threads:[~2014-09-15  9:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-14  8:11 tabulated-list-revert runs hook before re-printing the table Sebastian Wiesner
2014-09-14 19:20 ` Stefan Monnier
2014-09-14 20:35   ` Sebastian Wiesner
2014-09-14 22:43     ` Stefan Monnier
2014-09-15  9:11       ` Sebastian Wiesner

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.