all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Tracing the cause of a delay in find-file()
@ 2010-03-12 10:58 Nordlöw
  2010-05-04 17:06 ` Drew Adams
  2010-05-07  4:38 ` Kevin Rodgers
  0 siblings, 2 replies; 3+ messages in thread
From: Nordlöw @ 2010-03-12 10:58 UTC (permalink / raw)
  To: help-gnu-emacs

Which hooks are triggered (run before or after) by find-file other
than find-file-hook?
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.

Thanks in advance,
Per Nordlöw


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

* RE: Tracing the cause of a delay in find-file()
  2010-03-12 10:58 Tracing the cause of a delay in find-file() Nordlöw
@ 2010-05-04 17:06 ` Drew Adams
  2010-05-07  4:38 ` Kevin Rodgers
  1 sibling, 0 replies; 3+ messages in thread
From: Drew Adams @ 2010-05-04 17:06 UTC (permalink / raw)
  To: 'Nordlöw', help-gnu-emacs

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.





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

* Re: Tracing the cause of a delay in find-file()
  2010-03-12 10:58 Tracing the cause of a delay in find-file() Nordlöw
  2010-05-04 17:06 ` Drew Adams
@ 2010-05-07  4:38 ` Kevin Rodgers
  1 sibling, 0 replies; 3+ messages in thread
From: Kevin Rodgers @ 2010-05-07  4:38 UTC (permalink / raw)
  To: help-gnu-emacs

Nordlöw wrote:
> Which hooks are triggered (run before or after) by find-file other
> than find-file-hook?
> 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.

You could try profiling find-file (see the Commentary in elp.el, then
M-x elp-instrument-function).

-- 
Kevin Rodgers
Denver, Colorado, USA





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

end of thread, other threads:[~2010-05-07  4:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-12 10:58 Tracing the cause of a delay in find-file() Nordlöw
2010-05-04 17:06 ` Drew Adams
2010-05-07  4:38 ` Kevin Rodgers

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.