[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to call a function on every directory change (in dired)?
From: |
Xah Lee |
Subject: |
Re: How to call a function on every directory change (in dired)? |
Date: |
Wed, 08 Dec 2010 15:30:11 -0000 |
User-agent: |
G2/1.0 |
On Sep 28, 5:55 am, Marc Mientki <mien...@nonet.com> wrote:
> Am 28.09.2010 14:37, schrieb Marc Mientki:
>
> > Maybe is defadvice on dired-find-file a solution??
>
> Yes, I know, I talk to myself. However, this could also be interesting
> to others. So I post my solution:
>
> The advice idea was right! It works:
>
> (defun foo ()
> (message "--> hoho: current directory: %s" (dired-current-directory)))
>
> (defadvice dired-find-file (after foo)
> "Call foo each time on directory entry in dired."
> (foo))
>
> (ad-activate 'dired-find-file)
>
> regards
> Marc
Hi Marc Would you be interested To write a guest blog on my website on
this problem. Thanks.
Feel free to contact me privately.
Xah