[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] [PATCH] Update statistic cookies when archiving

From: Jay Kamat
Subject: Re: [O] [PATCH] Update statistic cookies when archiving
Date: Sun, 03 Sep 2017 12:28:39 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)


> Be warned that we're in a feature-freeze phase. It will have to wait for
> Org 9.1 before being merged.

Sounds good to me!

>> +        ;; Go to parent, even if no children exist
> Nitpick: Missing final dot.
>> +        (org-up-heading-safe)
>> +        ;; Update cookie of parent
> Ditto.
>> +        (org-update-statistics-cookies nil)))
>>      (message "Subtree archived %s"
>>               (if (eq this-buffer buffer)
>>                   (concat "under heading: " heading)
>> @@ -470,6 +476,9 @@ Archiving time is retained in the ARCHIVE_TIME node 
>> property."
>>      (outline-hide-subtree)
>>      (org-cycle-show-empty-lines 'folded)
>>      (goto-char pos)))
>> +    (when org-provide-todo-statistics
>> +      ;; update todo statistics of parent
> Ditto. Missing capital, too.
>> +      (org-update-parent-todo-statistics))
>>      (org-reveal)
>>      (if (looking-at "^[ \t]*$")
>>      (outline-next-visible-heading 1))))


> Could you provide some tests and an ORG-NEWS entry? For the latter, you
> can start a new "Version 9.2" top heading.


I'm not sure if I did the tests 'correctly' though. I placed them in
test-org-element.el since there was a little bit of archive based
testing there, is there a better place to put them? I couldn't find any
file for org-archive testing. Maybe I'll write some more archive tests

+    (should (string=
+             (org-element-property :title (org-element-at-point))
+             "Top [0%]")))
Is there a better way to extract the status cookie percentage from the
header? I couldn't find anything in (org-element-property)'s output.


Attachment: 0001-org-archive.el-Update-statistic-cookies-when-archivi.patch
Description: Text Data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]