From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.help Subject: Re: How to get hours from hh:mm Date: Sat, 16 Jun 2007 18:16:49 +0200 Message-ID: <87ps3veuxa.fsf@escher.local.home> References: <467136b6$0$69886$e4fe514c@news.xs4all.nl> <878xamk6bb.fsf@thalassa.lan.informatimago.com> <46714963$0$328$e4fe514c@news.xs4all.nl> <873b0uie6z.fsf@thalassa.lan.informatimago.com> <4673fd78$0$326$e4fe514c@news.xs4all.nl> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1182010682 17335 80.91.229.12 (16 Jun 2007 16:18:02 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 16 Jun 2007 16:18:02 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Jun 16 18:18:01 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HzayN-00017Q-9h for geh-help-gnu-emacs@m.gmane.org; Sat, 16 Jun 2007 18:17:59 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HzayM-0003FR-OC for geh-help-gnu-emacs@m.gmane.org; Sat, 16 Jun 2007 12:17:58 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Hzay7-0003Eu-7K for help-gnu-emacs@gnu.org; Sat, 16 Jun 2007 12:17:43 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Hzay5-0003Ea-R6 for help-gnu-emacs@gnu.org; Sat, 16 Jun 2007 12:17:42 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hzay5-0003EX-Nm for help-gnu-emacs@gnu.org; Sat, 16 Jun 2007 12:17:41 -0400 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Hzay5-0000P7-7m for help-gnu-emacs@gnu.org; Sat, 16 Jun 2007 12:17:41 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1Hzaxk-000510-R5 for help-gnu-emacs@gnu.org; Sat, 16 Jun 2007 18:17:20 +0200 Original-Received: from i577bf45b.versanet.de ([87.123.244.91]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 16 Jun 2007 18:17:20 +0200 Original-Received: from Stephen.Berman by i577bf45b.versanet.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 16 Jun 2007 18:17:20 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 34 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: i577bf45b.versanet.de User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:45115 Archived-At: On Sat, 16 Jun 2007 17:10:48 +0200 Cecil Westerhof wrote: > Alexis Roda wrote: >> Something like this could be helpful: >> >> (defun time100(time) >> (let ((timelist (split-string time ":"))) >> (+ (string-to-number (car timelist)) >> (/ (string-to-number (cadr timelist)) >> 60.0)))) > > I tried this: > > (defun getMinutes(time) > (interactive "sDuration: ") > (let ((timelist (split-string time ":"))) > (+  > (string-to-number (car timelist)) >       (/  > (string-to-number (cadr timelist)) >         60.0 > ) > ) > ) > ) > > When I dan give M-x getMinutes and on the prompt give: 00:18, I get: > Symbol's function definition is void: let Somehow your version contains nobreak space characters starting right after `let'. If you change all of those to normal space characters, the function works fine. Steve Berman