Björn Kettunen <[email protected]> writes:

>> I think I got something. I wrote a function that merges table with
>> matching file-names as keys based of the description in
>> org-clock-get-table-data.
>>
>> The result is very similar to what file-with-archives for a single file
>> did before the patch.
>> I.e. headings from main file and archive are not merged.
>>
>>
>> I haven't updated the documentation or removed any of the commented out
>> code.
>>
>> I'm mostly looking for feedback on how the merge table data function is
>> called
>> and on the function itself.

I see several issues. For example, you are assuming that Org files
always have .org extension. That's not necessarily the case.
Also, you are trying to merge everything at the same time, from a full
list of tables. I think you can do it much simpler.
Instead of (setq files (org-add-archive-files files)), you can call
org-add-archive-files one by one. That way, you will have readily
available list of archive file name that you can group. Merging within
the same group will be much, much easier - just sum up total file time,
and append the data.

-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>

Reply via email to