Alexander Adolf writes: > Ihor Radchenko writes: > >> [...] >> Calling `org-columns--clean-item' is a must to create a valid table. > > True. > > Additionally, it would seem advisable to call `org-quote-vert' on the > data, too, as `org-columns--clean-item' does not take care of vertical > bars? This is done in a previous step in `org-columns--capture-view', > however, so that the vertical bars get converted to "\vert" before the > formatting function gets called. > > `org-link-heading-search-string', and `org-link-make-string' (both > called from the formatting function _after_ `org-columns--clean-item') > OTOH take care of the link's path and description parts being > appropriate for a link. It would make sense then to include `org-quote-vert' call into `org-columns--clean-item' then. > Kindly find updated patches below. I hope to have succeeded in > addressing all your comments; that was my intention at least. Thanks! > (defun org-columns--capture-view (maxlevel match skip-empty exclude-tags format local) > "Get the column view of the current buffer. >... > +When LOCAL is non-nil, only capture headings in current subtree. When > +LINK is non-nil, item headlines will be linked to their origins. Looks like you removed the LINK parameter, but forgot to remove its description from the docstring. > + (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'). I am attaching a patch containing test case making sure that internal links are generated when appropriate. The test case is failing with the latest version of your patch. If you can, please add some more tests like mine checking `org-columns--clean-item'.