From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Re: Symbol's function definition is void: org-datetree-find-year-create / autoload org-datetree library? Date: Sat, 19 Mar 2011 14:53:49 +0100 Message-ID: References: <87oc575id0.fsf@fastmail.fm> Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=49191 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q0wbL-0002mm-DB for emacs-orgmode@gnu.org; Sat, 19 Mar 2011 09:53:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q0wbK-0005pA-0H for emacs-orgmode@gnu.org; Sat, 19 Mar 2011 09:53:55 -0400 Received: from mail-ew0-f41.google.com ([209.85.215.41]:54149) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q0wbJ-0005p5-S3 for emacs-orgmode@gnu.org; Sat, 19 Mar 2011 09:53:53 -0400 Received: by ewy9 with SMTP id 9so1216645ewy.0 for ; Sat, 19 Mar 2011 06:53:52 -0700 (PDT) In-Reply-To: <87oc575id0.fsf@fastmail.fm> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Matt Lundin Cc: Org Mode , "Urs Rau (UK)" On 19.3.2011, at 14:51, Matt Lundin wrote: > "Urs Rau (UK)" writes: >=20 >> On latest git version release_7.4-419-g68114f, [Org-mode version 7.4 >> (release_7.4.419.g68114f)] , I am trying to archive to a date-tree = and >> get the error: >>=20 >> Symbol's function definition is void: org-datetree-find-year-create >>=20 >> I found that if I '(load "org-datetree.el")' in the scratch buffer, = it then succeeds.=20 >>=20 >> Does org-datetree not get auto-loaded? >=20 > I mentioned this in a previous email, but I'll elaborate a bit here. > Only one function from org-datetree is autoloaded: > org-datetree-find-date-create. None of the other functions is loaded > until this function is called *or* until you evaluate (require > 'org-datetree).=20 >=20 > To solve the problem, you could either rewrite the defadvice to use > org-datetree-find-date-create or add (require 'org-datetree) to your > emacs. A third possibility it to wrap the defadvice form into=20 (eval-after-load "org-datetree" '(defadvice...... ) This will wait for the time when org-datetree is loaded. Cheers - Carsten >=20 > To change the advice, simply replace the following lines >=20 > --8<---------------cut here---------------start------------->8--- > (org-datetree-find-year-create y) > (org-datetree-find-month-create y m) > (org-datetree-find-day-create y m d) > --8<---------------cut here---------------end--------------->8--- >=20 > with=20 >=20 > --8<---------------cut here---------------start------------->8--- > (org-datetree-find-date-create `(,m ,d ,y)) > --8<---------------cut here---------------end--------------->8--- >=20 >> Also I have searched the *.el files to find the definition of >> "org-datetree-find-year-create" and found inconsistent use of the >> "keep-restriction" check, sometimes it is all lower case, sometimes = it >> is all uppercase, I guess lisp is not case sensitive? >>=20 >> $ find ./ -type f -exec grep -i "keep-restriction" {} /dev/null \;=20 >> ./lisp/org-agenda.el: (date &optional = keep-restriction)) >> ./lisp/org-capture.el: (DATE &optional = KEEP-RESTRICTION)) >> ./lisp/org-datetree.el:(defun org-datetree-find-date-create (date = &optional keep-restriction) >> ./lisp/org-datetree.el:If KEEP-RESTRICTION is non-nil, do not widen = the buffer. >> ./lisp/org-datetree.el: (or keep-restriction (widen)) >=20 > Look at the context in which the uppercase occurs (e.g., a docstring). >=20 > Best, > Matt >=20