[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to test whether any code runs after same command invocation?
From: |
Michael Heerdegen |
Subject: |
Re: How to test whether any code runs after same command invocation? |
Date: |
Fri, 14 Feb 2014 16:08:06 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
Stefan Monnier <address@hidden> writes:
> > Example: I use some code that propertizes any dired buffer in a way that
> > the mouse tooltip over any directory shows the directory contents.
> > Since that can take a long time for huge directory hierarchies, I want
> > to use a timeout. But if you have marked files you operate on, the code
> > is run multiple times when refreshing the files' lines, so the timeout
>
> Not sure I understand. Do you use after-change-functions, by any
> chance?
I after-advice dired-insert-set-properties.
> Could you use jit-lock instead?
I didn't want to cope with that. Also, this was just an example, I have
other, quite different use cases of the raised issue.
> > Is there a cleverer way?
>
> In general, not that I know.
> You can also use wall-time instead of a counter incremented in
> post-command-hook.
What's that? Don't find it anywhere. Is it a C variable? In that case
I can't use it.
Thanks,
Michael.