From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id KEW8OgJGlmMKcgAAbAwnHQ (envelope-from ) for ; Sun, 11 Dec 2022 22:05:07 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id wDizOgJGlmPyLwAAauVa8A (envelope-from ) for ; Sun, 11 Dec 2022 22:05:06 +0100 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 B565538239 for ; Sun, 11 Dec 2022 22:05:06 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p4TUg-0007T8-0c; Sun, 11 Dec 2022 16:04:18 -0500 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 1p4TUd-0007Sv-L5 for emacs-orgmode@gnu.org; Sun, 11 Dec 2022 16:04:15 -0500 Received: from mail-yb1-xb2b.google.com ([2607:f8b0:4864:20::b2b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p4TUc-0002N5-6I for emacs-orgmode@gnu.org; Sun, 11 Dec 2022 16:04:15 -0500 Received: by mail-yb1-xb2b.google.com with SMTP id c140so11487852ybf.11 for ; Sun, 11 Dec 2022 13:04:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=GpqrPZhCrIO2RM14LbMRQ4FDtclKoLuWfnUcyIooliM=; b=mqcBMR8tLXuglCFfZkVtqjrWmSOH/JTKzZsZwpy/Zm1j+wMTxprPh1yqCfiisToezp bP2ldW1AnOJtrM56U2Q25A3uItAdFd+hfjgvguyiJb4XCMDvIsznDUTGPfh0dIBpDw3p HLerxHmPJ0BDzozJGkXyCttc6Uu+k2zukTelFXHakPtO5pIEtFoiLu4uyOpu2ZQrLq9N GMZh9ov6QDBLBwNzwz9gwWSnyX79Th5kZf7z6/DOC+Em4+4CRJxO5Kf6mhobGbU94izH vnpP0YLZe3IKmQ0PgmjHyG2stQn5vPBmuf0d8a/Uqe4FDn9OkmQ2mVmpqCICdTaAw1Jw lXpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=GpqrPZhCrIO2RM14LbMRQ4FDtclKoLuWfnUcyIooliM=; b=ErOug83Tife2IHJkjEUWdeHlwWL2Cgq/LZozc/r++N0+ehRibWFQtnhFx0qXXJL2NI IryrwTw6D6ZV25KICzGkzqvKpmIKccFRsFj/7Md0Q85RVogtVcJVm/12YHNnHftcoqdQ nCMjbjEUMXAVrV4qMulRFYQkhDODVSdynKs2I9jI8/BmeZZsrhzW4ibdkuiFmW9Any4s xfLb/VFkDJJyy6RE8govOsF/Ec0oVVXFFZR8uHrLbF3OrpWp9UuqpMlHi7e71O3p34vx oD5DC6z4n5jxW1wjMzWZdE1KEdsyECYsJ9bazmY6gr6YmsK9WNGiueCTYPBizUJ8PelM s4qw== X-Gm-Message-State: ANoB5plJDSGEWIqe/4GEXJoy39Dajtc9FJv4JAdM4zxcBxZwuusCudFM NDAgyWC0l3SJi3gcVTcMqxI/Gso3p60FJgyWE/o= X-Google-Smtp-Source: AA0mqf4OoLEJY1zcw7NQWzEm5nE3cOcdrWiHskXErbgA0e6dxyNaUKnCw9fDH7GYBWFPp/vdMPVwNECn1wl/AFbuxuA= X-Received: by 2002:a25:1e55:0:b0:6f6:648:510b with SMTP id e82-20020a251e55000000b006f60648510bmr49343438ybe.637.1670792652922; Sun, 11 Dec 2022 13:04:12 -0800 (PST) MIME-Version: 1.0 References: <87leni86l5.fsf@localhost> <87wn6yl2hj.fsf@localhost> In-Reply-To: <87wn6yl2hj.fsf@localhost> From: Tom Gillespie Date: Sun, 11 Dec 2022 13:04:01 -0800 Message-ID: Subject: Re: [PATCH] lisp/org-expiry.el: Account for org-time-stamp-formats To: Ihor Radchenko Cc: emacs-orgmode Content-Type: multipart/mixed; boundary="00000000000092605b05ef93bafb" Received-SPF: pass client-ip=2607:f8b0:4864:20::b2b; envelope-from=tgbugs@gmail.com; helo=mail-yb1-xb2b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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-Country: US X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1670792706; 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=GpqrPZhCrIO2RM14LbMRQ4FDtclKoLuWfnUcyIooliM=; b=mhUoHcEUlCJVp3wTvXXnA3AVJ+BzAD7Nh0ZoPRjBUHgRZI0J7uOfP9ZuyD3WTmq61KQKQW V8L9Z+HmP8hL1Mb7/vly2Ax2RvK4uegmWt3eX1FKPK3jsucW+PLEpOusne2cLrQVP2T0aR eTQL/wOy40lAijNw42EaxwNcXx94b9vxER9nK2ePG1pF58obHvhilrwfCOo53VMajesJhf 192UO4v104dCk9w8aoIAnT5XJodszb3yaVj1o19DY36YFbEZ4jFnlGH0CJTNlL3fSvkthj dM7mgjSQfxEdEJr7Z5n9g7FY+dgb0iTsB1FfROa4FJKHKvtlXdD1IpFumFj0tw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=mqcBMR8t; 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=gmail.com ARC-Seal: i=1; s=key1; d=yhetil.org; t=1670792706; a=rsa-sha256; cv=none; b=LQAClJ9MoE61IXgjAlkZcrMbwc2jm3XwEQYU7fiD3WKOmP5Jctme7ifbJuscMA9RRNeBFU PmC13Bdh3rK1gzLzvH40wfogJI/ockmzX7dA48jZGGdfFUUOCO9JIJVEY2QBmtaSyz20Ud 98JKOPcq1umzXqLBjeC/BPtA/o7Xzah685FmnlK4l5S+YUscDs/FPcQ2tcSvIswtSpkiX7 TrVQJjNAALhCtSDljPf7xVII9LfKL2+UXote4v7jnay0JGVR9YsdA4Q0gd6JR8yWjyHQ/V nKKaqgTgO7dKtWcreJCTugjsVABxMrdah3thcNAV4WQ0K8ZhQr1NNvZjC4F9OA== X-Migadu-Spam-Score: -6.60 X-Spam-Score: -6.60 X-Migadu-Queue-Id: B565538239 X-Migadu-Scanner: scn0.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=mqcBMR8t; 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=gmail.com X-TUID: V0zXfbvqCnTH --00000000000092605b05ef93bafb Content-Type: text/plain; charset="UTF-8" Looks like string-replace doesn't support that notation, so both too aggressive and without sufficient control. I've switched to replace-regexp-in-string which does what we want. Here's the updated patch. --00000000000092605b05ef93bafb Content-Type: text/x-patch; charset="US-ASCII"; name="0001-lisp-org-expiry.el-Account-for-org-time-stamp-format.patch" Content-Disposition: attachment; filename="0001-lisp-org-expiry.el-Account-for-org-time-stamp-format.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_lbjusqn80 RnJvbSAxMmNhMjk5NjVlODY3YWNkNjRmZWNhZWNkMTRmMmY3NGU5MGQ3ZTk5IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBUb20gR2lsbGVzcGllIDx0Z2J1Z3NAZ21haWwuY29tPgpEYXRl OiBTdW4sIDQgRGVjIDIwMjIgMDE6MDI6MzUgLTA4MDAKU3ViamVjdDogW1BBVENIXSBsaXNwL29y Zy1leHBpcnkuZWw6IEFjY291bnQgZm9yIG9yZy10aW1lLXN0YW1wLWZvcm1hdHMKIHJlZmFjdG9y CgoqIGxpc3Avb3JnLWV4cGlyeS5lbCAob3JnLWV4cGlyeS1pbnNlcnQtY3JlYXRlZCkKKG9yZy1l eHBpcnktaW5zZXJ0LWV4cGlyeSk6IHRpbWVzdGFtcCBmb3JtYXRzIGRyb3BwZWQgZGVsaW1pdGVy cyBzbyBhCnNsaWdodCBtb2RpZmljYXRpb24gaXMgcmVxdWlyZWQgZm9sbG93aW5nIG9yZyBjb21t aXQKZTNhN2MwMTg3NG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ikKKyAgICAgICAgICAgICAg ICAgICAgICAoZm9ybWF0LXRpbWUtc3RyaW5nCisgICAgICAgICAgICAgICAgICAgICAgIChyZXBs YWNlLXJlZ2V4cC1pbi1zdHJpbmcgIlxcKF48XFx8PiRcXCkiICIiCisgICAgICAgICAgICAgICAg ICAgICAgIChjZHIgb3JnLXRpbWUtc3RhbXAtZm9ybWF0cykpKSkKKyAgICAgICAgICAgICAgICAg ICAgIj4iKSkKICAgICAgIDs7IG1heWJlIHRyYW5zZm9ybSB0byBpbmFjdGl2ZSB0aW1lc3RhbXAK ICAgICAgIChpZiBvcmctZXhwaXJ5LWluYWN0aXZlLXRpbWVzdGFtcHMKIAkgIChzZXRxIHRpbWVz dHIgKGNvbmNhdCAiWyIgKHN1YnN0cmluZyB0aW1lc3RyIDEgLTEpICJdIikpKQpAQCAtMzIwLDEw ICszMjMsMTMgQEAgYW5kIGluc2VydCB0b2RheSdzIGRhdGUuIgogICAgIChzZXRxIGQtdGltZSAo aWYgZCAob3JnLXRpbWUtc3RyaW5nLXRvLXRpbWUgZCkKIAkJICAgKGN1cnJlbnQtdGltZSkpKQog ICAgIChzZXRxIGQtaG91ciAoZm9ybWF0LXRpbWUtc3RyaW5nICIlSDolTSIgZC10aW1lKSkKLSAg ICAoc2V0cSB0aW1lc3RyIChpZiB0b2RheQotCQkgICAgICAoZm9ybWF0LXRpbWUtc3RyaW5nIChj ZHIgb3JnLXRpbWUtc3RhbXAtZm9ybWF0cykpCi0JCSAgICAoY29uY2F0ICI8IiAob3JnLXJlYWQt ZGF0ZQotCQkJCSBuaWwgbmlsIG5pbCBuaWwgZC10aW1lIGQtaG91cikgIj4iKSkpCisgICAgKHNl dHEgdGltZXN0ciAoY29uY2F0ICI8IgorICAgICAgICAgICAgICAgICAgICAgICAgICAoaWYgdG9k YXkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChmb3JtYXQtdGltZS1zdHJpbmcKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAocmVwbGFjZS1yZWdleHAtaW4tc3RyaW5nICJc XChePFxcfD4kXFwpIiAiIgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChjZHIgb3Jn LXRpbWUtc3RhbXAtZm9ybWF0cykpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIChvcmct cmVhZC1kYXRlIG5pbCBuaWwgbmlsIG5pbCBkLXRpbWUgZC1ob3VyKSkKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgIj4iKSkKICAgICA7OyBtYXliZSB0cmFuc2Zvcm0gdG8gaW5hY3RpdmUgdGlt ZXN0YW1wCiAgICAgKGlmIG9yZy1leHBpcnktaW5hY3RpdmUtdGltZXN0YW1wcwogCShzZXRxIHRp bWVzdHIgKGNvbmNhdCAiWyIgKHN1YnN0cmluZyB0aW1lc3RyIDEgLTEpICJdIikpKQotLSAKMi4z Ny40Cgo= --00000000000092605b05ef93bafb--