Alexander Adolf <alexander.ad...@condition-alpha.com> writes: > Ah, `org-column--clean-item'; well spotted! > > Two observations: > > 1) As is now, I'm generating the links in the data collection function > `org-columns--capture-view'. As `org-column--clean-item' is called > from code that runs after the data collection, > `org-column--clean-item' was probably never designed to be able to > handle strings containing links. That it still did sort of "the right > thing" seems more luck than anything else?
There is a difference between what `org-columns--clean-item' does and stripping link paths. `org-columns--clean-item' is cleaning up the results for insertion into a table specifically. This is only meaningful in dynamic block, but not in the traditional column view where nothing is actually written to buffer - the columns are displayed on top of the existing headings. Calling `org-columns--clean-item' is a must to create a valid table. In contrast, the purpose of `org-link-display-format' is purely visual - to not make the collected titles way too long. Also, it has no effect when there is a custom `org-columns-modify-value-for-display-function' (see `org-columns--displayed-value'). > 2) Considering what happens when I do `org-store-link' and > `org-insert-link', it would seem more advisable to: > > a) move the link generation to the new formatting function > (re-removing it from `org-columns--capture-view'); > > b) pass the "cleaned" string to `org-link-make-string' as both, the > link and the description parameter. I do not recall seeing `org-store-link' in the patches you submitted. So, I am not sure what you are talking about. May you elaborate? >> We should probably also change org-clock to use >> `org-columns--clean-item'. >> [...] > > As a separate patch, or as a third commit to the patch we are discussing > now? Up to you. -- 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>