From: Kyle Meyer <email@example.com> To: firstname.lastname@example.org, email@example.com Subject: Re: Possible bug with columnview and active dates Date: Sun, 10 May 2020 20:11:46 +0000 [thread overview] Message-ID: <firstname.lastname@example.org> (raw) In-Reply-To: <email@example.com> 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
next prev parent reply other threads:[~2020-05-10 20:12 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-05-10 15:29 Org Mode 2020-05-10 19:13 ` Kyle Meyer 2020-05-10 20:11 ` Kyle Meyer [this message] 2020-05-10 20:55 ` Kyle Meyer 2020-05-11 6:59 ` Nicolas Goaziou 2020-05-11 13:24 ` Kyle Meyer 2020-05-12 2:08 ` [PATCH] colview: Display active time stamps as inactive Kyle Meyer 2020-05-13 2:51 ` Kyle Meyer 2020-05-13 8:01 ` Nicolas Goaziou 2020-05-10 21:31 ` [PATCH] manual: Fix special property descriptions for DEADLINE/SCHEDULED Kyle Meyer
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style List information: https://www.orgmode.org/ * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --subject='Re: Possible bug with columnview and active dates' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Code repositories for project(s) associated with this inbox: https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).