Shorten Emacs timeout of ~/.emacs read

Posted by user35042 on Server Fault See other posts from Server Fault or by user35042
Published on 2010-09-16T13:17:15Z Indexed on 2011/01/10 6:55 UTC
Read the original article Hit count: 766

Filed under:

My ~/.emacs start-up file is stored in my AFS home directory. Often when I login to a linux machine I will forget to renew my AFS credentials before attempting to edit a local (non-AFS) file with Emacs.

When this happens Emacs will attempt to load ~./emacs but cannot because it is in AFS space where I do not have access. Eventually (after a minute or so) Emacs will give up trying to load ~./emacs and continue. But waiting for Emacs to timeout is annoying (typing Ctrl-Z does not seem to interrupt this timeout).

I want to shorten the amount of time that Emacs waits before giving up. I have tried the suggestion at this site which says to put the following code in the site-start.el file:

(with-timeout (4)
 (load remote-.emacs))

However, when I do that I get the error Error in init file: Symbol's value as variable is void: remote-\.emacs whenever starting Emacs.

How can I shorten this timeout?

© Server Fault or respective owner

Related posts about emacs