help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Avoiding `(require 'ob-tangle)`?


From: Thorsten Jolitz
Subject: Re: Avoiding `(require 'ob-tangle)`?
Date: Tue, 25 Mar 2014 15:32:18 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Tim Visher <address@hidden> writes:

> I've customized `org-babel-tangle-lang-exts` and whenever I start up
> emacs and hit an org file, I bork out.
>
> I've tried adding `(autoload 'org-babel-tangle-lang-exts "ob-tangle")`
> but it doesn't seem to have the effect of loading that variable, I
> assume because it's a defcustom and not a defun.
>
> Can I avoid requiring the whole thing?

I use idle-require for org and w3m in my init.el:

,------------------------------------------------------------------
| ;; ** Idle Require
| 
| ;; load elisp libraries while Emacs is idle
| (if (require 'idle-require nil t)
|     (progn
|       (setq idle-require-symbols
|             '(w3m org))
| 
|       ;; loaded
|       (setq idle-require-idle-delay 5)
| 
|       ;; time in seconds between automatically loaded functions
|       (setq idle-require-load-break 3)
| 
|       ;; load unloaded autoload functions when Emacs becomes idle
|       (idle-require-mode 1)
| 
|       (defun try-idle-require (feature)
|         (when (locate-library (symbol-name feature))
|           (idle-require feature))))
| 
|   (defun try-idle-require (feature)
|     (when (locate-library (symbol-name feature))
|       (require feature))))
`------------------------------------------------------------------

Maybe thats useful in this case too?

-- 
cheers,
Thorsten




reply via email to

[Prev in Thread] Current Thread [Next in Thread]