From: Sebastian Wiesner <swiesner@lunaryorn.com>
To: emacs-devel@gnu.org
Subject: tabulated-list-revert runs hook before re-printing the table
Date: Sun, 14 Sep 2014 10:11:56 +0200 [thread overview]
Message-ID: <90477E42-EBBE-4EA6-A680-7D90591C12B7@lunaryorn.com> (raw)
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
next reply other threads:[~2014-09-14 8:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-14 8:11 Sebastian Wiesner [this message]
2014-09-14 19:20 ` tabulated-list-revert runs hook before re-printing the table Stefan Monnier
2014-09-14 20:35 ` Sebastian Wiesner
2014-09-14 22:43 ` Stefan Monnier
2014-09-15 9:11 ` Sebastian Wiesner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=90477E42-EBBE-4EA6-A680-7D90591C12B7@lunaryorn.com \
--to=swiesner@lunaryorn.com \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).