From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: steve-humphreys@gmx.com Newsgroups: gmane.emacs.help Subject: ELisp - Making a list from a function returning a number Date: Thu, 17 Dec 2020 12:42:13 +0100 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5738"; mail-complaints-to="usenet@ciao.gmane.io" To: Help Gnu Emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Dec 17 12:42:52 2020 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kprgI-0001Na-Lq for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 17 Dec 2020 12:42:50 +0100 Original-Received: from localhost ([::1]:42436 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kprgH-00049C-NH for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 17 Dec 2020 06:42:49 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49004) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kprfm-000456-A3 for help-gnu-emacs@gnu.org; Thu, 17 Dec 2020 06:42:18 -0500 Original-Received: from mout.gmx.net ([212.227.17.22]:42039) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kprfj-0008VW-Vc for help-gnu-emacs@gnu.org; Thu, 17 Dec 2020 06:42:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1608205333; bh=Uk9k9Rj/A2wb27qvXQAfb8myRDOKrEKOLodp+V1cDSs=; h=X-UI-Sender-Class:From:To:Subject:Date; b=ldy5n055Zwu+pn2Rzk8WlCfU0DGTzWeeM/ngxejWHqL9x459m6UnXikwr0OcyI1Of dp0H2bd3DmtSUR1dAu3bpblLImQUIcFfJLhanOvPllU9DYN7PyP6s/xHljmKkzM8a2 IjkrDn3zTwWGBHsPNN1LdHrfR+PvOFnBVOaWGsv8= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [213.165.168.94] ([213.165.168.94]) by web-mail.gmx.net (3c-app-mailcom-bs11.server.lan [172.19.170.179]) (via HTTP); Thu, 17 Dec 2020 12:42:13 +0100 Importance: normal Sensitivity: Normal X-Priority: 3 X-Provags-ID: V03:K1:9n8g9Qq+KSg3rlclIsqvy46X3hcOLrpRD/d45+IvOvhkz70kYCtdALYCyDfgqhDubI4CJ PmKw3YyrS1cw6Pb9KFOWtpO8RlMp9ok+UOOr+kgwMJI53Vmp9MeG3sd4gdqwETiS2pa3o2vZlVkf Ui8YJNiiN6mKbcz094ERaIo5CGcDl2mfGaWWVU7/pTzKZzerpcEOfKiEfSlGbywbJ/KrAjIqhlaE fhqsfGe0rI0SUwPoBwqtpUk18JOYbFqMtFGk+MN/5x19fLPM0m4wEji7vY+at2h08tiv9Nj5mfoz Mw= X-UI-Out-Filterresults: notjunk:1;V03:K0:TdvuNhMQGZI=:ioMEWgt6UJv0CcIqdDpVIQ ce47qgaQz5vy5YxcGle+0aMqx3CNFshwPt5dnMd8g8bVwlACiDsQXAH2XJK6/QLjP+EZtjGVS fI6pTr7wrJEpIepeqdva8Ei+u13xtoj86MsAQ6HiBFjeFrqUwv7oUM/vQTjjkwVVHbjCBzImq 4l8H2w/hd2WxTAvoCaauu6wTkL3skJyNX8we18my5PTGPh7PzpSTxwOLilgQTBL9IeVNhPuku +S9UkHLxkpetr8ypum70YVY03+p3ZDMXEsZrS2F9vJk8kE+DJhsDtBEMSo6V5/WP1mIitPrGF FaHZROJJZMtYFiJxfupUtWbQZOHymYgm/PxKWBw3FfLcLtV9YqpWTxgKehirF2yDdU/ybDIqn fk5oXBnthmwg/wT4xc69Jwp9b8f9ghvuMYUJrN+FOkqG/v8r/+IzYi74FEdjiHL1hjMf1kxt/ 3pylg/ZdHqDq8GebVSZM5YmYpzn+d07eYQ6YJzWtciY+3rzMpy3vFXtOBfepz4nxjsDEXiSx2 MFg8gqoCAwgz8CDFAyvjLdmtgI6qK0Z9AZ9ER+Hz8e05LTIsZA5AuX5+swjR3Fre1n2Bt9CyB uIuR9T93xX50g= Received-SPF: pass client-ip=212.227.17.22; envelope-from=steve-humphreys@gmx.com; helo=mout.gmx.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:126462 Archived-At: I have written a function to return time as a number so I can set the temp= oral grid in org-agenda. I was previously using number-sequence until someone fount a problem. Now= I have timfutur to give me the next time (time interval "tsk" after time "tim") (tim (number-sequence tstr tend tskp)) So what I have remaining to do is to make a list of numbers representing t= he times when the agenda grids are displayed. (defun timfutur (tim tsk) (let* ( (thr (/ tim 100)) (tmn (- tim (* thr 100))) (tinc_mn (+ tmn tsk)) (tinc_hr (/ (+ tmn tsk) 60)) (tinc_mn (- tinc_mn (* tinc_hr 60))) (thr_futur (* (+ thr tinc_hr) 100)) (tmn_futur tinc_mn) (tim_out (+ thr_futur tmn_futur)) ) ;; --- body of let ---- tim_out )) ; function returns last form