[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to avoid loading file when just testing if function is bound?
From: |
Sebastien Vauban |
Subject: |
Re: How to avoid loading file when just testing if function is bound? |
Date: |
Mon, 02 Apr 2012 13:54:46 +0200 |
User-agent: |
Gnus/5.130004 (Ma Gnus v0.4) Emacs/24.0.94 (windows-nt) |
Hello Peter,
Peter Münster wrote:
> On Mon, Apr 02 2012, Sebastien Vauban wrote:
>
>> The problem is that if Org is not yet loaded, the above code does load it
>> (because `org-clocking-p' is autoloaded) -- and that takes a while... and I
>> just wanted to exit Emacs...
>
> Perhaps `featurep' can help here.
Adjusted code block:
--8<---------------cut here---------------start------------->8---
(if (and (featurep 'org-clock)
(org-clocking-p)
(y-or-n-p "You are currently clocking time, clock out? "))
(org-clock-out)
t))
--8<---------------cut here---------------end--------------->8---
When reading your proposition, I thought it should be it... but no. It still
loads Org whenever quitting Emacs (before doing anything).
Any other idea?
Best regards,
Seb
--
Sebastien Vauban
Re: How to avoid loading file when just testing if function is bound?, Michael Albinus, 2012/04/02
Message not available