From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id iIruFxZguF5xeQAA0tVLHw (envelope-from ) for ; Sun, 10 May 2020 20:12:06 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 0BRUAyRguF41EwAAbx9fmQ (envelope-from ) for ; Sun, 10 May 2020 20:12:20 +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 aspmx1.migadu.com (Postfix) with ESMTPS id 95ED39402D1 for ; Sun, 10 May 2020 20:12:17 +0000 (UTC) Received: from localhost ([::1]:42690 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jXsJ7-0004wz-5N for larch@yhetil.org; Sun, 10 May 2020 16:12:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55038) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jXsIk-0004w0-JV for emacs-orgmode@gnu.org; Sun, 10 May 2020 16:11:54 -0400 Received: from pb-smtp20.pobox.com ([173.228.157.52]:57513) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jXsIi-0002YH-VE for emacs-orgmode@gnu.org; Sun, 10 May 2020 16:11:53 -0400 Received: from pb-smtp20.pobox.com (unknown [127.0.0.1]) by pb-smtp20.pobox.com (Postfix) with ESMTP id B9228C15FA; Sun, 10 May 2020 16:11:50 -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=x5HZEkMYQLVQvvezv7j1tQXRvik=; b=o1t1Hl HBMZWxPfShM+XlkWjhCi4eYF49t86LqUgjrDU1/lfYNGIiyo+15+Mesu3V/xsq3k YkpgbOmXLbCAB6gQXYkQ4IS62DU0tPHfeXRfFHzE3bVWrkbJLapgHG8G9akaJmeM vstSACh8Jz/QKDKOi4Ue1TJ8m5pAvvAQhuC94= Received: from pb-smtp20.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp20.pobox.com (Postfix) with ESMTP id B09EFC15F9; Sun, 10 May 2020 16:11:50 -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=+sHk8w7YxwvNC/Ky18/zDm8zbKPM28a/lI/LQmxrt/s=; b=OaUzxbS7wokmFncgze5kFjx0g29j564cmYPJAsNO7i4sFXv0cHRkM4K1RHY6Nzfjz1P1T75Es2nOUmRY1AIgZgJMavO0FQPABeYMqhHB3YrIcvhJ3QPGj49/mDKhw15W753wwSUI/+fwcUHNUEnZ4JJ0orj23BrtoGes7S0A1Sk= 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 1B2D9C15F5; Sun, 10 May 2020 16:11:48 -0400 (EDT) (envelope-from kyle@kyleam.com) From: Kyle Meyer To: orgmode@pm.me, emacs-orgmode@gnu.org Subject: Re: Possible bug with columnview and active dates In-Reply-To: <87d07bd2nj.fsf@kyleam.com> References: <87d07bd2nj.fsf@kyleam.com> Date: Sun, 10 May 2020 20:11:46 +0000 Message-ID: <87pnbb5z3x.fsf@kyleam.com> MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: 7A66C328-92FA-11EA-884E-B0405B776F7B-24757444!pb-smtp20.pobox.com Received-SPF: pass client-ip=173.228.157.52; envelope-from=kyle@kyleam.com; helo=pb-smtp20.pobox.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/10 16:11:50 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: aspmx1.migadu.com; dkim=pass header.d=pobox.com header.s=sasl header.b=o1t1Hl H; dkim=pass header.d=kyleam.com header.s=mesmtp header.b=OaUzxbS7; dmarc=none; spf=pass (aspmx1.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.53907178763342]; DWL_DNSWL_FAIL(0.00)[kyleam.com:server fail,209.51.188.17:server fail]; R_SPF_ALLOW(-0.20)[+ip4:209.51.188.0/24:c]; IP_REPUTATION_HAM(0.00)[asn: 22989(0.08), country: US(-0.00), ip: 209.51.188.17(-0.54)]; TO_DN_NONE(0.00)[]; MX_GOOD(-0.50)[cached: eggs.gnu.org]; RCPT_COUNT_TWO(0.00)[2]; 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]; URIBL_BLOCKED(0.00)[orgmode.org:url,kyleam.com:dkim,pobox.com:dkim]; FROM_HAS_DN(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[kyleam.com]; HAS_LIST_UNSUB(-0.01)[]; DNSWL_BLOCKED(0.00)[209.51.188.17:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.51.188.17:from]; RCVD_COUNT_SEVEN(0.00)[7]; FORGED_SENDER_MAILLIST(0.00)[] X-TUID: asivC2ZvHCta Kyle Meyer writes: >> According to the docs: >> https://orgmode.org/manual/Special-Properties.html#Special-Properties >> Using DEADLINE or SCHEDULED should not include the angular brackets. > > Thanks for the report. There is certainly a document/code mismatch. > Digging a bit, it seems that brackets started being included quite a > while ago: 8d8ad9838 (Rewrite `org-entry-properties', 2014-09-30). I > didn't spot anything in that commit that suggests that it was an > intended change. While I think it's be fair to consider this a regression, I'm leery of restoring the original behavior of stripping the brackets given how long the current behavior has been around. Instead I think it'd be better to update the documentation and tweak the output on colview's end. However, for the record, when I restored this behavior locally, here were the adjustments needed to make the tests pass. (Of course, restoring the behavior likely introduces other issues that are not caught be the tests, not to mention third-party code that relies on brackets being included.) diff --git a/lisp/org.el b/lisp/org.el index 4d1a6a6b4..18a358c85 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -10817,7 +10817,7 @@ (defun org-auto-repeat-maybe (done-word) ;; a SCHEDULED time-stamp without one is removed, as they are no ;; longer relevant. (save-excursion - (let ((scheduled (org-entry-get (point) "SCHEDULED"))) + (let ((scheduled (format "<%s>" (org-entry-get (point) "SCHEDULED")))) (when (and scheduled (not (string-match-p org-repeat-re scheduled))) (org-remove-timestamp-with-keyword org-scheduled-string)))) ;; Update every time-stamp with a repeater in the entry. @@ -13145,7 +13145,8 @@ (defun org-entry-properties (&optional pom which) (skip-chars-forward " \t") (and (looking-at org-ts-regexp-both) (push (cons (car pair) - (match-string-no-properties 0)) + (match-string-no-properties + (if (equal (car pair) "CLOSED") 0 1))) props))))))) (when specific (throw 'exit props))) (when (or (not specific) diff --git a/testing/lisp/test-org.el b/testing/lisp/test-org.el index 29ac0a8f9..fe07ea7e3 100644 --- a/testing/lisp/test-org.el +++ b/testing/lisp/test-org.el @@ -5201,12 +5201,12 @@ (ert-deftest test-org/entry-properties () (cdr (assoc "CLOSED" (org-entry-properties nil "CLOSED"))))) (should (equal - "<2014-03-04 tue.>" + "2014-03-04 tue." (org-test-with-temp-text "* H\nDEADLINE: <2014-03-04 tue.>" (cdr (assoc "DEADLINE" (org-entry-properties nil "DEADLINE")))))) (should (equal - "<2014-03-04 tue.>" + "2014-03-04 tue." (org-test-with-temp-text "* H\nDEADLINE: <2014-03-04 tue.>" (cdr (assoc "DEADLINE" (org-entry-properties)))))) (should-not @@ -5214,12 +5214,12 @@ (ert-deftest test-org/entry-properties () (cdr (assoc "DEADLINE" (org-entry-properties nil "DEADLINE"))))) (should (equal - "<2014-03-04 tue.>" + "2014-03-04 tue." (org-test-with-temp-text "* H\nSCHEDULED: <2014-03-04 tue.>" (cdr (assoc "SCHEDULED" (org-entry-properties nil "SCHEDULED")))))) (should (equal - "<2014-03-04 tue.>" + "2014-03-04 tue." (org-test-with-temp-text "* H\nSCHEDULED: <2014-03-04 tue.>" (cdr (assoc "SCHEDULED" (org-entry-properties)))))) (should-not