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: Alexander Adolf
Subject: Re: columnview dynamic block - different time summing behaviour for EFFORT and CLOCKSUM
Date: Sat, 20 Apr 2024 16:30:48 +0200

Many thanks for your swift response!

Ihor Radchenko <yantar92@posteo.net> writes:

> [...]
> When suggesting #+vindex, I was referring to
> org-columns-dblock-formatter variable.
> [...]
> #+cindex: @samp{formatter}, dynamic block parameter

I see; thanks for explaining. I've added both:

---------------------------- Begin Quote -----------------------------
- =:formatter= ::

  #+cindex: @samp{formatter}, dynamic block parameter
  #+vindex: org-columns-dblock-formatter
  A function to format column view data and insert it into the buffer.
  See the option ~org-columns-dblock-formatter~.
----------------------------- End Quote ------------------------------


> [...]
> I see how. It is because CELL-CONTENT is not the original heading. It is
> the heading name processed with `org-columns--clean-item'.
>
> `org-column--clean-item' removes statistics cookies among other things.
> It actually removes more, leading to some edge cases in your patch:
>
> ** TODO Foo
>
> ** TODO src_elisp{"Hello"} world
>
>
> #+begin: columnview :id global :link t
> | <25>  |      | <3>      |      |
> | ITEM  | TODO | PRIORITY | TAGS |
> |-------+------+----------+------|
> | [[file:/tmp/test.org::*Foo][Foo]]   | TODO | B        |      |
> | [[file:/tmp/test.org::*src_elisp{"Hello"} world][world]] | TODO | B        
> |      |
> #+end:
>
> Note how inline src block is stripped from the link description.

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?

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.

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


Many thanks and looking forward to your thoughts,

  --alexander



reply via email to

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