emacs-orgmode
[Top][All Lists]
Advanced

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

Re: columnview dynamic block - different time summing behaviour for EFFO


From: Ihor Radchenko
Subject: Re: columnview dynamic block - different time summing behaviour for EFFORT and CLOCKSUM
Date: Tue, 23 Apr 2024 16:35:15 +0000

Alexander Adolf <alexander.adolf@condition-alpha.com> writes:

>>> +                          (let ((search (org-link-heading-search-string 
>>> raw)))
>>> +                            (org-link-make-string
>>> +                             (if (not (buffer-file-name)) search
>>> +                               (format "file:%s::%s" (buffer-file-name) 
>>> search))
>>> +                             cleaned))
>>
>> This will unconditionally generate file: links, even when the dynamic
>> block only refers to headings in the same buffer. The clock tables do
>> use internal links when appropriate (see `org-clock-get-table-data').
>
> Um, actually it does exactly the same as `org-clock-get-table-data'
> (from where I borrowed the code snippet): it generates file: links in
> buffers visiting files, and local links in buffers not visiting any
> file.
>
> Perhaps you were looking at a test case in which
> `org-clock-get-table-data' gets called in an Org buffer that is not
> visiting any file?

Nope. I was writing a test case (the one I shared) and noticed that
file: links are generated. Then, I misread what org-clock does.
You don't need to do anything other than adjusting the test example I
shared to use file: links.

>> If you can, please add some more tests like mine checking
>> `org-columns--clean-item'.
>> [...]
>
> Thanks for the springboard hint to get started with adding tests, which
> I'm happy to do, of course.
>
> Is there any way for me to run a specific subset of the tests only, for
> instance "make test colview", or similar?

make test BTEST_RE="test-org-colview/dblock"
# the same, but do not re-compile Org mode
make test-dirty BTEST_RE="test-org-colview/dblock"

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
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

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