From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id oI9TO9XaDmb1OgAAqHPOHw:P1 (envelope-from ) for ; Thu, 04 Apr 2024 18:52:38 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id oI9TO9XaDmb1OgAAqHPOHw (envelope-from ) for ; Thu, 04 Apr 2024 18:52:38 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=JeRXIwOM; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1712249557; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=qVCcomS0f54YZd1PG09My9TNYGRJX9qdeJyIFgf7ENA=; b=oOGPR+rqqnn7XYl75P5xfQ+kTjUlF0iyIl5ULbVRuADhY9B8gAKOpAt/Rifakotiin+0e9 qAMnn5LPaPzIwhxc0OnpU9fVmZxJT5lqMiknmwy9Pn6qfA88fXouDY7D2XQ8I2CJeg9/pi j0Y0YFseH0yD/fDBzmEBJTfJdCgyhi3QY1MvBQvBcEWz8fCxwzPk1JMfgI1AFIssrTfhaV KyBMTv46m+zPIqQH+sVy0Xrpkcfnub5yhpfhGI46APqcRdU4qmWbPTP0oufkqT4cRZCUlf j4TsGKEKYkBc8e8YIbyI4oi9p1sTgKHLCFTEvkVDtnKemw/RKvKUAlTKn/VsEQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1712249557; a=rsa-sha256; cv=none; b=adVmvZOJFXvEI0jq7S+fjJ+15iw2xvFOaGcEt4dfJ/vRHlKGGPxfDzImO5rk3xSmnDm5DG UGjJ9bd9Y3VDLiOZ8UI+KrPmKvxKTxMH/o9IDSlsPviyiQ6wKMs3l4HsP4KFkfxZ1ci/pH Tt8tXEOWdB4+7jpk8g0kgtNLKuGQBT1i/HviNjiGTmJczpiw2LTR/hctVLj7scZjoVLMNh 6IGdp3ZM48CYGqYqg5g4z5CfmdwYEa05iWwJ19wQT+6H2YVGT5DVJwDgvCpfAfExPckhXK SOfyvYHNNa6blv1/S+5iMFRrITQckQ/XO5jGL8lxeEzsv3xmlWKST/2ztJ1p1Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=JeRXIwOM; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net 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 aspmx1.migadu.com (Postfix) with ESMTPS id D587D1BC45 for ; Thu, 4 Apr 2024 18:52:37 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rsQJV-0002K4-81; Thu, 04 Apr 2024 12:51:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rsQJT-0002Jn-70 for emacs-orgmode@gnu.org; Thu, 04 Apr 2024 12:51:43 -0400 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rsQJR-0001CE-1g for emacs-orgmode@gnu.org; Thu, 04 Apr 2024 12:51:42 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 1648B240027 for ; Thu, 4 Apr 2024 18:51:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1712249499; bh=1MbSv8ANmx2VMnqmLz1FTmId5Abl4VZG8mqp1YTLBlk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=JeRXIwOMjWFbf11Nb7vLx21NipHkMbT26A+s7cpJSmE0Z4/cvx7ZjycRYnNo2r0CE ScSbVDFDcwoImwrugN3PI8AcOZHBgDTHTjOB+ZP7I9UgWJdtypRlSbTcgADNb9sXwO nOEiS9UqSTQ9a6982B1S83u89CJ0ae83XNWbxVqw3GEIIp3FbZcqT/VWP54Zyzugk5 73RLXqKhPnHgPZ6rfBtzSF+Hygrjkdgmw++bAfBUXfGeGosXBjE4q+ic/eekEZrVO5 F/6kmOBrza9w02UpOTukGvX6GwgxecJA9KQ/t0TX48DOVQa91Xk1JPG/gUxORBujm3 7cP5NIxIi35Dw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4V9SLy2qb3z9rxF; Thu, 4 Apr 2024 18:51:38 +0200 (CEST) From: Ihor Radchenko To: Morgan Smith Cc: emacs-orgmode@gnu.org Subject: Re: [PATCH] lisp/org-element.el: Add repeater-deadline support to org-element In-Reply-To: References: Date: Thu, 04 Apr 2024 16:51:51 +0000 Message-ID: <87ttkht6jc.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -7.07 X-Spam-Score: -7.07 X-Migadu-Queue-Id: D587D1BC45 X-Migadu-Scanner: mx12.migadu.com X-TUID: g3epbp2llSV0 Morgan Smith writes: > I would like to add some features to org-habit (something I have tried > unsuccessfully in the past). Before I do that, I would like to switch > org-habit over to the org-element api. Before I do that, I would like to > extend org-element to support the org-habit syntax. > > Let me know what you think! All the tests pass on my machine. This is a welcome addition. Thanks! Please also add etc/ORG-NEWS entry - it is org-element API change. In addition to changes in Org git, you also need to update https://orgmode.org/worg/org-syntax.html#Timestamps and https://orgmode.org/worg/dev/org-element-api.html (the page source is at https://git.sr.ht/~bzg/worg) > + (string-match > + "\\([.+]?\\+\\)\\([0-9]+\\)\\([hdwmy]\\)/?\\([0-9]+\\)?\\([hdwmy]\\)?" This will match timestamps like <2012-03-29 Thu +1y2y>. You may instead use shy group \(?:...\)? around the whole /2y regexp match. (Or even rewrite the regexp via rx for better readability, while we are on it). > + (let ((deadline-value (org-element-property :repeater-deadline-value timestamp)) > + (deadline-unit (org-element-property :repeater-deadline-unit timestamp))) This is slightly confusing, because "deadline" has multiple meanings in Org. repeater-deadline-value/unit would be more readable as the variable name. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at