[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Tracing the cause of a delay in find-file()
From: |
Drew Adams |
Subject: |
RE: Tracing the cause of a delay in find-file() |
Date: |
Tue, 4 May 2010 10:06:57 -0700 |
Hi Per,
> Which hooks are triggered (run before or after) by find-file other
> than find-file-hook?
C-u M-x apropos-variable
Then look for `file'.
Or, in Icicles, `C-h v hook S-SPC file'.
I see these:
find-file-hook
find-file-hooks
find-file-not-found-hooks
local-write-file-hooks
makefile-mode-hook
tramp-handle-file-local-copy-hook
write-file-hooks
Of course, there are other hooks that deal with files - the various `save'
hooks, for instance. Again, `apropos-variable' or Icicles is your friend.
> I have added a few features and suddenly opening a file has become
> annoyingly slow (delays and couple of seconds for large files) and I
> am seeking its cause. I have already verified that it isn't related to
> font-lock-mode.
As always, binary search is your friend for this. Cut your .emacs in half by
commenting or narrowing, then by quarters, eighths, etc. You will find the
culprit in no time.