From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sylvain Beucler Subject: Re: Bug: symbol function's definition is null : signum [7.5] Date: Sat, 16 Apr 2011 11:30:31 +0200 Message-ID: <20110416093031.GA19027@perso.beuc.net> References: <20110413080410.GA3112@perso.beuc.net> <20159.1302907251@alphaville.americas.hpqcorp.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([140.186.70.92]:36760) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QB1pu-0007BA-Sk for emacs-orgmode@gnu.org; Sat, 16 Apr 2011 05:30:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QB1pt-0002Pu-L9 for emacs-orgmode@gnu.org; Sat, 16 Apr 2011 05:30:38 -0400 Received: from smtp03.smtpout.orange.fr ([80.12.242.125]:26455 helo=smtp.smtpout.orange.fr) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QB1pt-0002Pl-Ds for emacs-orgmode@gnu.org; Sat, 16 Apr 2011 05:30:37 -0400 Content-Disposition: inline In-Reply-To: <20159.1302907251@alphaville.americas.hpqcorp.net> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Nick Dokos Cc: emacs-orgmode@gnu.org On Fri, Apr 15, 2011 at 06:40:51PM -0400, Nick Dokos wrote: > Sylvain Beucler wrote: > > > When using S- to modify a date with an our range in Org 7.5, I get > > "symbol function's definition is null : signum". > > > > E.g. <2011-03-10 jeu. 10:30-11:30> > > > > It appears that (org-modify-ts-extra) is using this function, but > > unlike in CL isn't not an elisp built-in :) > > > > As a work-around I added an internal defun: > > (defun org-modify-ts-extra (s pos n dm) > > "Change the different parts of the lead-time and repeat fields in timestamp." > > (defun signum (x) > > (cond > > ((> x 0) 1) > > ((< x 0) -1) > > ((= x 0) 0))) > > [...] > > > > What version of emacs are you using? > > For emacs 24 at least, it's defined in cl-extra.el (which is distributed > with emacs itself). That in turn is loaded when cl is loaded and there > are plenty of places where org does a (require 'cl), e.g. when loading > org.el or org-agenda.el; but it may be that you have found a path in > that does not do so, however unlikely that scenario is. > > So you can probably resolve the problem by adding a (require 'cl) > somewhere in your .emacs. But if you can, it would be worthwhile to > figure out how you end up in that situation, so the (require 'cl) can be > added to the appropriate place. > > If you are using emacs 23 or earlier, the above might not be applicable, > but you probably can still resolve the problem the same way: adding a > (require 'cl) in your .emacs. If that does not resolve it, then adding a > (require 'cl-extra) as well should certainly do so. I use 23.2.1 (http://packages.debian.org/squeeze/emacs). Adding (require 'el) works. I tried on another box with the same Emacs (23.2.1 - http://packages.debian.org/wheezy/emacs) and Org, roughly the same configuration, and I can't reproduce the problem, so it's a bit of a mystery for me. Thanks for your answer. -- Sylvain