5 inline replies
On 2025-03-16 13:18, Ihor Radchenko wrote:
pinmacs <pinm...@cas.cat> writes:
Maybe we can arrange Org to leave manually added affiliated keywords as
is when updating the dblock, similar to what colview does.
Another idea is https://list.orgmode.org/orgmode/871qaer7bo.fsf@localhost/
2/4
Regretably I could not try the patch, is it because I am using 9.7.10
?
Maybe. The patch is against the development branch (main).
1/5 (I hope "soon" I might be able to configure a switch between stable
and development, thanks for the indication)
[1]. looks like a nice proposal, that's a neat patch. I only see a
problem that some of the affiliated keywords might refer to identify a
specific element, such as NAME, then, that would cause ID collisions?
That's exactly why the patch asks users to list which affiliated
keywords to copy over. It does not help with #+name, of course.
2/5 OK, I realized that I did not get on the first time, yes, #+name is
a corner case; a problematic one (the need of the name to chain dblocks
vs the name for the exports)
I also discovered that there is a bug or inconsistency when using the
column-view dblock with the patch: it generates duplicates on each
processing, see attached file example dblock-example.org, and compare
the processing of my-table-name0 vs my-table-name1. In fact, current
column-view already preserves all affiliated keywords you put on table,
maybe that is something we want for all dblocks, not just for column-view
That's what makes me think it's better to have something general on
preserving that kind of keywords for the generated elements; that helps
in terms of export
#+NAME: my dynamic-block
#+begin: clocktable :scope file :maxlevel 2 :org-dblock-prepend
(:attr_latex)
#+NAME: my dynamic-block
#+CAPTION: Clock summary at [2024-01-18 Thu 16:23]
| Headline | Time |
|------------+---------|
| *Total time* | *0h 0min* |
#+end:
Maybe we can use similar idea and allow users to list the affiliated
keywords (or regexps matching the keyword names) to keep. Then, after
updating the dynamic block, if some affiliated keywords have been
removed, they are re-added. WDYT?
3/5 I think that's better, but consider also WDYT about expanding the
column-view keyword-affiliation preservation to all dblocks
[1] I would like to switch easily between different orgmode versions
nightly, etc.; any suggestion? Something like ~(use-package org :ensure
nil :vc (:url "https://git.savannah.gnu.org/cgit/emacs/org-mode.git"
:rev :newest))~ and then ~git checkout~ here and there?
You can install Org mode from git as described in
https://orgmode.org/manual/Installation.html#Using-Org_0027s-git-repository-1
and switch branches as needed.
:vc should do something similar.
4/5 Yes, I will try that way "soon"...
Coming back to the org syntax, I suspect that the table rows are not an
exception, #+NAME before table rows is specifically what I am using to
identify the table, and what does not work when there is in the middle
the dynamic block
May you elaborate?
4/4
In html export (maybe other exporters too), the ~#+NAME: mytable~
results in, some html such as ~<table id="mytable" border="2"
cellspacing="0" cellpadding="6" rules="groups" frame="hsides">~; that
way, you can identify the table with CSS and Javascript
There are other ways to achieve the same thing: ~#+ATTR_HTML: :id
somefixedid~ exports to ~<table id="somefixedid" border="2"
cellspacing="0" cellpadding="6" rules="groups" frame="hsides">~
Sure, but it is for the whole table, and you appear to be talking about
table rows.
5/5 It is fine for the whole table, I don't need for the table rows
#+TODO: TODO DONE
#+COLUMNS: %TODO(State) %CUSTOM_ID(ID) %ITEM(Task) %RESPONSIBLE
# #+EXPORT_FILE_NAME: /tmp/org-kanban
#+TITLE: org-kanban html example
#+AUTHOR: Name
#+ATTR_HTML: :id abstract
#+begin_abstract
In this example I test different dynamic blocks and its linking
#+end_abstract
#+OPTIONS: prop:t toc:nil tags:not-in-toc d:(not "BACKLINKS" not "TRACE")
#+LANGUAGE: en
#+TOC: headlines 3
run these exports to test:
#+name: sourceblock_created_2025-03-12_14-06-44
#+begin_src emacs-lisp
(org-dblock-update t)
(org-html-export-to-html)
(org-gfm-export-to-markdown)
#+end_src
* Panel
** columnview
column view already preserves, so with the patch duplicates
#+BEGIN: columnview :id global :match "TODO={.+}-TODO=\"QUIT\"-TODO=\"DONE\"" :link t :org-dblock-prepend (:name)
#+name: my-table-name0
#+apsfi: apsji
#+CAPTION: Table with columnview
| State | ID | Task | RESPONSIBLE |
|-------+----+---------+-------------|
| TODO | T1 | [[file:/home/music/org-extra/projects-2025/2025_5_mejorac/2025-03-27_affiliated-keyword/dblock-example.org::*My task][My task]] | Laura |
| TODO | T2 | [[file:/home/music/org-extra/projects-2025/2025_5_mejorac/2025-03-27_affiliated-keyword/dblock-example.org::*Task2][Task2]] | Anna |
#+END:
here you see the duplication one time per processing
#+name: my-table-name1
#+BEGIN: columnview :id global :match "TODO={.+}-TODO=\"QUIT\"-TODO=\"DONE\"" :link t :org-dblock-prepend (:name)
#+name: my-table-name1
#+CAPTION: Table with columnview
| State | ID | Task | RESPONSIBLE |
|-------+----+---------+-------------|
| TODO | T1 | [[file:/path/to/dblock-example.org::*My task][My task]] | Laura |
| TODO | T2 | [[file:/path/to/dblock-example.org::*Task2][Task2]] | Anna |
#+END:
#+name: my-table-name2
#+begin: clocktable :scope file :maxlevel 2 :org-dblock-prepend (:name)
#+name: my-table-name2
#+CAPTION: Clock summary at [2025-03-27 Thu 17:04]
| Headline | Time |
|------------+------|
| Total time | 0:00 |
#+END:
* Active Tasks
** TODO My task
:PROPERTIES:
:RESPONSIBLE: Laura
:CUSTOM_ID: T1
:END:
Content
Content
Content
Content
Content
Content
Content
Content
Content
Content
Content
Content
Content
Content
Content
Content
Content
Content
Content
Content
Content
Content
Content
Content
Content
Content
Content
Content
Content
Content
Content
Content
Content
** TODO Task2
:PROPERTIES:
:RESPONSIBLE: Anna
:CUSTOM_ID: T2
:END:
Content
Content
Content
Content
Content
Content
Content
Content
Content
Content
Content
Content
Content
Content
Content
Content
Content
Content
Content
Content
Content
Content
Content
Content
** DONE Task3
CLOSED: [2025-03-12 Wed 13:17]
:PROPERTIES:
:CUSTOM_ID: T3
:END:
Content
Content
Content
Content
Content