Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: add :link (allow disabling link) #49

Closed
pedro-nonfree opened this issue Mar 6, 2025 · 10 comments
Closed

feature: add :link (allow disabling link) #49

pedro-nonfree opened this issue Mar 6, 2025 · 10 comments

Comments

@pedro-nonfree
Copy link

pedro-nonfree commented Mar 6, 2025

Now I am trying to generate a project management file in PDF, and I would like to render a kanban with certain tasks, but without link

I saw that it's reasonable thing to have:

@gizmomogwai
Copy link
Owner

Hi @pedro-nonfree, thanks for the suggestion. Without the links its not possible to interact with the org-kanban table anymore but thats also something that you do not want. I could try to add a :link nil option (defaulting to t). would that work for you?

@gizmomogwai
Copy link
Owner

Hi @pedro-nonfree, please check the latest master state. I added now a parameter called :plaintext that can be not added to the parameter list (and then defaults to nil) or added with t or nil to the parameter list.
When t it generates heading only links. Not sure if I generate the heading text as you would like (e.g. for very long headings), but please have a look then we can improve the implementation.

@gizmomogwai
Copy link
Owner

p.s. sorry for the late reply, was in vacation :)

@pedro-nonfree
Copy link
Author

pedro-nonfree commented Mar 11, 2025

hey @gizmomogwai, I hope you came refreshed from your vacation. Oh, thank you for accepting the feature and providing a first implementation. I tested it now, as I found some issues I will reopen it (I cannot open it, but I suggest opening it, or should we continue in a new ticket-iteration?).

I thought it would be more convenient to say :link t (t by default), because is what other dynamic blocks are calling it for this behavior

works as expected this way:

#+BEGIN: kanban :plaintext t
#+END

shortener does not work, it shows the entire text:

#+BEGIN: kanban :layout ("…" . 15) :plaintext t
#+END

@gizmomogwai gizmomogwai reopened this Mar 12, 2025
@gizmomogwai
Copy link
Owner

gizmomogwai commented Mar 12, 2025

I do understand ... the reason for the naming is, that i do not want to change the default behavior, and plaintext when not set is nil -> no change in the behavior of existing tables, but when link is not set its nil -> and by default no table anymore gets a link ... i think i could do it like that, but then every normal table would need :link t in the definition. i wonder how others are implementing it pbly with a combination of plist-member and plist-get -> will fix this.

will fix the layout thing for sure (thanks for testing).

@pedro-nonfree
Copy link
Author

pedro-nonfree commented Mar 12, 2025

Thanks for reopening the issue :)

Yes, do not change the default behavior and take care of the users :)

Hence, argument default behavior would be :link t by default, so you need to explicitly say :link nil to the equivalent of :plaintext t thing.

You are experiencing the same problem as org-ql

For consistency with Org's clock table dynamic blocks, we should probably name the property :link and use :link nil to disable the links. See (info "(org) The clock table").

@gizmomogwai
Copy link
Owner

yes .. i read that ... i just wondered if its worth having additional code vs. using the same name as org-ql or org-clock ...
but you convinced me now, it will be a little more code, but also a little more consistent. lets see how it looks in the end.

@gizmomogwai
Copy link
Owner

also somehow defaulting to t when something is not there is a little counter intuitive, but i see the benefit.

@gizmomogwai
Copy link
Owner

gizmomogwai commented Mar 12, 2025

@pedro-nonfree : please give it another shot ... now its back to :link t/nil with default to t + fixed the layouting/cutting off in link: nil mode.

@pedro-nonfree
Copy link
Author

@pedro-nonfree : please give it another shot ... now its back to :link t/nil with default to t + fixed the layouting/cutting off in link: nil mode.

works nice! thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants