[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [FR] multiple column view definition
From: |
Ihor Radchenko |
Subject: |
Re: [FR] multiple column view definition |
Date: |
Wed, 06 Mar 2024 10:53:50 +0000 |
Slawomir Grochowski <slawomir.grochowski@gmail.com> writes:
>> It looks like you are asking for a way to choose between multiple column
>> specs when building column view. And that you have a very specific idea
>> how to implement it. However, the details of the idea are elusive to me.
>> May you elaborate?
>
> Sure.
>
> We have two COLUMNS definition:
>
> * 2024
> :PROPERTIES:
> :COLUMNS: %ITEM(B) %TEST(B column)
> :COLUMNS: %ITEM(A) %TEST(A column)
> :END:
This is ambiguous in Org mode property syntax. You cannot specify
property multiple times like this. No wonder you are getting undefined
and unexpected behaviour.
> ...
> Or maybe someone has a better idea how to implement the functionality
> 'multiple column view definition'?
What you might do is hack `org-columns-get-format' to not default to
`org-columns-default-format', but instead ask user about the column
format to be used. For example, you can utilize
`org-property-get-allowed-values' and prompt user about the column
format to choose. Then, COLUMNS_ALL property may store multiple allowed
formats like:
* 2024
:PROPERTIES:
:COLUMNS_ALL: "%ITEM(B) %TEST(B column)"
:COLUMNS_ALL+: "%ITEM(A) %TEST(A column)"
:END:
--
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>