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]. 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.

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

> [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.

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

-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
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>

Reply via email to