From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Cecil Westerhof Newsgroups: gmane.emacs.help Subject: Re: How to get hours from hh:mm Date: Sat, 16 Jun 2007 17:10:48 +0200 Message-ID: <4673fd78$0$326$e4fe514c@news.xs4all.nl> 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> 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 1182008455 10648 80.91.229.12 (16 Jun 2007 15:40:55 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 16 Jun 2007 15:40:55 +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 17:40:54 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 1HzaOQ-0003dl-Rv for geh-help-gnu-emacs@m.gmane.org; Sat, 16 Jun 2007 17:40:50 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HzaOQ-0004tO-JX for geh-help-gnu-emacs@m.gmane.org; Sat, 16 Jun 2007 11:40:50 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!xs4all!transit4.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: KNode/0.8.0 Original-Lines: 27 Original-NNTP-Posting-Host: 213.84.157.201 Original-X-Trace: 1182006649 news.xs4all.nl 326 [::ffff:213.84.157.201]:25556 Original-X-Complaints-To: abuse@xs4all.nl Original-Xref: shelby.stanford.edu gnu.emacs.help:149525 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:45113 Archived-At: 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