From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1 with LMTPS id 6IIDN7ciil7IfAAAk0OIDg (envelope-from ) for ; Sun, 05 Apr 2020 18:25:59 +0000 Received: from aspmx2.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id KEO+F7Yiil5cLwAA1q6Kng (envelope-from ) for ; Sun, 05 Apr 2020 18:25:58 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx2.migadu.com (Postfix) with ESMTPS id 46A15683752 for ; Sun, 5 Apr 2020 16:55:40 +0000 (UTC) Received: from localhost ([::1]:50084 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jL8Yd-00076m-4e for larch@yhetil.org; Sun, 05 Apr 2020 12:55:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47608) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jL8Xz-00076U-S9 for emacs-orgmode@gnu.org; Sun, 05 Apr 2020 12:55:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jL8Xy-0004Lf-Ez for emacs-orgmode@gnu.org; Sun, 05 Apr 2020 12:54:59 -0400 Received: from pb-smtp20.pobox.com ([173.228.157.52]:59041) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jL8Xy-0004IG-62 for emacs-orgmode@gnu.org; Sun, 05 Apr 2020 12:54:58 -0400 Received: from pb-smtp20.pobox.com (unknown [127.0.0.1]) by pb-smtp20.pobox.com (Postfix) with ESMTP id F3827B652B for ; Sun, 5 Apr 2020 12:54:54 -0400 (EDT) (envelope-from kyle@kyleam.com) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to :subject:in-reply-to:references:date:message-id:mime-version :content-type; s=sasl; bh=vcqDv4/bZJ/qgWf0NGA98n5noY4=; b=ucc/bq DvCZLKm+N56p5wMoYuLF5Zb+mQ4S3pKIOyQuo2wiWojHctwgiMUlqOZ2Lr/6S1Cd Asiaf0rAdaKSfBEXba2r4dqF9Rh4g37uKgEH/pCgqKENUNgZICNuoo4KYFI8kedi ni1v3RvdpMdAqpqOA/QpKFthdckvXo9tzSnSw= Received: from pb-smtp20.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp20.pobox.com (Postfix) with ESMTP id EC345B652A for ; Sun, 5 Apr 2020 12:54:54 -0400 (EDT) (envelope-from kyle@kyleam.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=kyleam.com; h=from:to:subject:in-reply-to:references:date:message-id:mime-version:content-type; s=mesmtp; bh=m/68WQgTWYMDUriTWW9uQSyDJ2Uy31mDU01DR1HmMEU=; b=QX6G7uvO72N3te9IEUzEBxmz+NDUwjyM38vcR5JBgjMf8qpoANxhzn+aLiaf5z17dP6Kys4CiBDVqqrG8/1nR+6my9Qy2QRgBx6tg5R864jtMlkoN6E+wJAhvKhF7S64cAd4lcHdI46gWNNofI3vf6uL9zntSL0NuiLL4fRkQGg= Received: from localhost (unknown [45.33.91.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp20.pobox.com (Postfix) with ESMTPSA id 706E5B6529 for ; Sun, 5 Apr 2020 12:54:52 -0400 (EDT) (envelope-from kyle@kyleam.com) From: Kyle Meyer To: emacs-orgmode@gnu.org Subject: Re: Do something useful with ".+" and hours repeaters In-Reply-To: <87k12uavau.fsf@nicolasgoaziou.fr> References: <87k12uavau.fsf@nicolasgoaziou.fr> Date: Sun, 05 Apr 2020 16:54:50 +0000 Message-ID: <87wo6t27qd.fsf@kyleam.com> MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: 2B4461C2-775E-11EA-B42B-B0405B776F7B-24757444!pb-smtp20.pobox.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 173.228.157.52 X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 X-Spam-Score: -1.21 Authentication-Results: aspmx2.migadu.com; dkim=pass header.d=pobox.com header.s=sasl header.b=ucc/bq D; dkim=pass header.d=kyleam.com header.s=mesmtp header.b=QX6G7uvO; dmarc=none; spf=pass (aspmx2.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Scan-Result: default: False [-1.21 / 13.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; GENERIC_REPUTATION(0.00)[-0.58546559829886]; R_SPF_ALLOW(-0.20)[+ip4:209.51.188.0/24]; IP_REPUTATION_HAM(0.00)[asn: 22989(0.33), country: US(-0.01), ip: 209.51.188.17(-0.59)]; TO_DN_NONE(0.00)[]; MX_GOOD(-0.50)[cached: eggs.gnu.org]; DKIM_TRACE(0.00)[pobox.com:+,kyleam.com:+]; MAILLIST(-0.20)[mailman]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:22989, ipnet:209.51.188.0/24, country:US]; MID_RHS_MATCH_FROM(0.00)[]; TAGGED_FROM(0.00)[larch=yhetil.org]; FROM_NEQ_ENVFROM(0.00)[kyle@kyleam.com,emacs-orgmode-bounces@gnu.org]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[pobox.com:s=sasl,kyleam.com:s=mesmtp]; FROM_HAS_DN(0.00)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[emacs-orgmode@gnu.org]; DMARC_NA(0.00)[kyleam.com]; HAS_LIST_UNSUB(-0.01)[]; RCPT_COUNT_ONE(0.00)[1]; RCVD_COUNT_SEVEN(0.00)[8]; FORGED_SENDER_MAILLIST(0.00)[] X-TUID: 2H+ryI/TecgS Nicolas Goaziou writes: > WDYT? Makes sense to me. I have one nitpick on the actual change: > + ;; Shift starting date to today, or now if > + ;; repeater is by hours. > + (if (equal what "h") > + (org-timestamp-change > + (floor (/ (- (org-time-stamp-to-now ts t)) 60)) > + 'minute) You could use floor's DIVISOR argument: (floor (- (org-time-stamp-to-now ts t)) 60) Many such spots in Emacs's tree have been adjusted by Paul Eggert, and the ones touching Org files have been ported back.