Ihor Radchenko <[email protected]> writes:

> 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.

OK what's the best approach to this? Maybe using org-agenda-file-regexp?

> 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.

I think you're right when it comes to the heuristics here, it's easier
and more reliable that way but the merging of the table data itself is
largely the same. The reason why I merged the data this way was that
the table data is gathered further below.

The merge table data function can largely stay the
same but the determination of what has to be merged should be adjusted.

Reply via email to