From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Cannot use org-mode and remember templates Date: Fri, 17 Jul 2009 11:26:35 -0400 Message-ID: <2988.1247844395@gamaville.dokosmarshall.org> References: <6683149f0907160338kf3f6564t6dc313ffd1e4353d@mail.gmail.com> <13661.1247754819@gamaville.dokosmarshall.org> <6683149f0907160932h223df5fem75f8365b8960f908@mail.gmail.com> <18562.1247764069@gamaville.dokosmarshall.org> <6683149f0907170703n24dbccch4d41fbbdf6bfb480@mail.gmail.com> Reply-To: nicholas.dokos@hp.com Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MRpM2-0007u3-Bm for emacs-orgmode@gnu.org; Fri, 17 Jul 2009 11:28:10 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MRpLx-0007mR-7Q for emacs-orgmode@gnu.org; Fri, 17 Jul 2009 11:28:09 -0400 Received: from [199.232.76.173] (port=60015 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MRpLx-0007mK-3z for emacs-orgmode@gnu.org; Fri, 17 Jul 2009 11:28:05 -0400 Received: from vms173011pub.verizon.net ([206.46.173.11]:44541) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MRpLw-0002lY-MU for emacs-orgmode@gnu.org; Fri, 17 Jul 2009 11:28:04 -0400 Received: from gamaville.dokosmarshall.org ([98.110.172.159]) by vms173011.mailsrvcs.net (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPA id <0KMX007A0MVTUUJ3@vms173011.mailsrvcs.net> for emacs-orgmode@gnu.org; Fri, 17 Jul 2009 10:26:23 -0500 (CDT) In-reply-to: Message from Frank Rust of "Fri\, 17 Jul 2009 16\:03\:00 +0200." <6683149f0907170703n24dbccch4d41fbbdf6bfb480@mail.gmail.com> 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: Frank Rust Cc: emacs-orgmode@gnu.org Frank Rust wrote: > Thanks to all for the hints so far but unfortunately the setting for "org= -time-stamp-rounding-minutes" did not solve my problem. >=20 What does C-h v org-time-stamp-rounding-minutes say? In fact, it might be better to evaluate it in the backtrace buffer itself: when you get the error, go to the backtrace buffer, type `e' which should give you an ``Eval: '' prompt in the echo area and then type ``org-time-stamp-rounding-minutes''. You see, the function that gets the error, org-current-time, is very short and simple: ,---- | (defun org-current-time () | "Current time, possibly rounded to `org-time-stamp-rounding-minutes'." | (if (> (car org-time-stamp-rounding-minutes) 1) | (let ((r (car org-time-stamp-rounding-minutes)) | (time (decode-time))) | (apply 'encode-time | (append (list 0 (* r (floor (+ .5 (/ (float (nth 1 time)) r))))) | (nthcdr 2 time)))) | (current-time))) `---- so there is not that much that can go wrong: the error message pretty much says we are trying to apply a function that takes a list as argument to something that is not a list: car is one such function. That's why I still think that the org-time-stamp-rounding-minutes variable is at fault. Are you setting it like this: (setq org-time-stamp-rounding-minutes '(0 5)) in your .emacs? BTW, what version of orgmode are you using? Thanks, Nick > Here is an actual backtrace: >=20 > Debugger entered--Lisp error: (wrong-type-argument listp 5) > =C2=A0 org-current-time() > =C2=A0 (or org-overriding-default-time (org-current-time)) > =C2=A0 (let* ((entry ...) (ct ...) (dct ...) (ct1 ...) (tpl ...) (plist-p= ...) (file ...) (headline ...) (v-c ...) (v-x ...) (v-t ...) (v-T ...) (v-= u ...) > (v-U ...) (v-i ...) (v-a ...) (clipboards ...) (v-A ...) (v-n user-full-n= ame) (v-k ...) (v-K ...) v-I (org-startup-folded nil) (org-inhibit-startup = t) > org-time-was-given org-end-time-was-given x prompt completions char time = pos default histvar) (when (functionp file) (setq file ...)) (when (and file > ...) (setq file ...)) (setq org-store-link-plist (append ... org-store-li= nk-plist)) (unless tpl (setq tpl "") (message "No template") (ding) (sit-for > 1)) (erase-buffer) (insert (substitute-command-keys ...)) (insert tpl) (g= oto-char (point-min)) (while (re-search-forward "%\\([tTuUaiAcxkKI]\\)" nil= t) > (when ... ...) (replace-match ... t t)) (goto-char (point-min)) (while (r= e-search-forward "%\\[\\(.+\\)\\]" nil t) (let ... ... ... ...)) (goto-char > (point-min)) (while (re-search-forward "%\\((.+)\\)" nil t) (goto-char ..= .) (let ... ... ...)) (when plist-p (goto-char ...) (while ... ...)) (let (= ...) > (org-mode) (org-remember-mode 1)) (if (and file ... ...) (org-set-local .= .. file)) (if headline (org-set-local ... headline)) (goto-char (point-min)) > (while (re-search-forward "%^\\({\\([^}]*\\)}\\)?\\([gGtTuUCLp]\\)?" nil = t) (setq char ... prompt ...) (goto-char ...) (replace-match "") (setq > completions nil default nil) (when prompt ...) (cond ... ... ... ... ... = ...)) (goto-char (point-min)) (if (re-search-forward "%\\?" nil t) > (replace-match "") (and ... ...))) > =C2=A0 (if org-remember-templates (let* (... ... ... ... ... ... ... ... = ... ... ... ... ... ... ... ... ... ... ... ... ... v-I ... ... org-time-wa= s-given > org-end-time-was-given x prompt completions char time pos default histvar= ) (when ... ...) (when ... ...) (setq org-store-link-plist ...) (unless tpl= ... > ... ... ...) (erase-buffer) (insert ...) (insert tpl) (goto-char ...) (wh= ile ... ... ...) (goto-char ...) (while ... ...) (goto-char ...) (while ...= ... > ...) (when plist-p ... ...) (let ... ... ...) (if ... ...) (if headline .= ..) (goto-char ...) (while ... ... ... ... ... ... ...) (goto-char ...) (if= ... > ... ...)) (let (...) (org-mode) (org-remember-mode 1))) > =C2=A0 org-remember-apply-template() > =C2=A0 run-hooks(text-mode-hook remember-mode-hook) > =C2=A0 apply(run-hooks (text-mode-hook remember-mode-hook)) > =C2=A0 run-mode-hooks(remember-mode-hook) > =C2=A0 remember-mode() > =C2=A0 remember(nil) > =C2=A0 call-interactively(remember nil nil) >=20 > I hope this helps. >=20 > Thanks and regards, > Frank >=20 > On Thu, Jul 16, 2009 at 7:07 PM, Nick Dokos wrote: >=20 > Frank Rust wrote: >=20=20=20=20 > > Debugger entered--Lisp error: (wrong-type-argument listp 5) > > =C2=A0 org-current-time() > > =C2=A0 org-remember-apply-template() > > =C2=A0 run-hooks(text-mode-hook remember-mode-hook) > > =C2=A0 apply(run-hooks (text-mode-hook remember-mode-hook)) > > =C2=A0 run-mode-hooks(remember-mode-hook) > > =C2=A0 remember-mode() > > =C2=A0 remember(nil) > > =C2=A0 call-interactively(remember nil nil) > > > > =C2=A0 > > > > Debugger entered--Lisp error: (wrong-type-argument listp 5) > > =C2=A0 org-current-time() > > > > ... > > > > I hope this helps. > > p >=20=20=20=20 > In this case, no, because Seb Vauban nailed the cause (he must have > recently polished his crystal ball, so he did not need a backtrace at > all): org-time-stamp-rounding-minutes should be a list of two numbers. >=20=20=20=20 > In general, however, a bug report with a backtrace and uncompiled code > makes things much easier: from your backtrace, anybody (with some > knowledge of lisp) can see what the problem is - no crystal ball > required. >=20=20=20=20 > Thanks, > Nick >=20 > _______________________________________________ > Emacs-orgmode mailing list > Remember: use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode