Nicolas Goaziou writes: > Hello, > > stardiviner writes: > >> The re-generated patch is in attachment. > > Thank you! :) > >> --- >> doc/org-manual.org | 9 ++++++--- >> etc/ORG-NEWS | 14 ++++++++++++++ >> lisp/org-clock.el | 5 +++++ >> lisp/org-colview.el | 6 +++++- >> lisp/org-keys.el | 6 ++---- >> lisp/org.el | 46 +++++++++++++++++++++++++++++++++++++++++++++ > > You forgot to mark removed functions, e.g., `org-clock-report', as > obsolete in "org-compat.el". > >> Org supports /dynamic blocks/ in Org documents. They are inserted >> with begin and end markers like any other code block, but the contents >> -are updated automatically by a user function. For example, {{{kbd(C-c >> -C-x C-r)}}} inserts a dynamic table that updates the work time (see >> -[[*Clocking Work Time]]). >> +are updated automatically by a user function. You can use dispatch >> +command ~org-dynamic-block-insert-dispatch~, which is bind to >> +keybinding {{{kbd(C-c C-x i)}}} by default. > > which is bound to {{{kbd(C-c C-x i)}}} by default. > > Don't forget the #+kindex and #+findex entries above. Done, I have not really looked the "doc/org-manual.org" seriously. So have not realized need to add #+kindex and #findex. Added now. > >> +(defcustom org-dynamic-block-parameters nil >> + "An alist of properties that defines all the Org dynamic blocks." > > What is the key of the alist? The possible keywords for the plist? This > should appear in the docstring. I improved the docstring. It should be clear now. > > So far, only :function is supported. If there is no plan for extending > that, maybe a plain alist, e.g., ("type" . function) should suffice? > I.e., isn't mimicking `org-link-set-parameters' a bit too much? WDYT? > Indeed, I mimicked `org-link-set-parameters' almost all. About this, I originally just lazy, now I have a thought about this alist of plist design, I think adding snippet-like text template string. This idea is still coarse. I will update this idea in my org agenda todo list. And I have another reason, I think use same structure can make user feel comfortable, because it is same as `org-link-set-parameters`. It's a good reason. If you this is acceptable, I think I would like to keep this. >> +(defun org-dynamic-block-insert-dblock (dblock-type) >> + "Select and insert an Org type dynamic block DBLOCK-TYPE. > > Insert a dynamic block of type DBLOCK-TYPE. Modified. > >> +This is a dispatching function which prompts for the type of >> +dynamic block to insert." > > When used interactively, select the dynamic block types among defined > types, per `org-dynamic-block-set-parameters'. Dito > > Also, once we agree on the design, would you mind writing some tests? About test, would you allow me to write it later? I remember I watched the org clock dynamic block test once, the literal string is complex, and I remember I used to wrote a test about similar thing. Make me feel hard. Give me a little time. I will add it. I promise. Can you merge this at first? (Keep this commit behind, to merge all new commits, might need to solve conflicts, Huu.....) WDYT? > > Regards, :) I found you're kind than I think. If I'm wrong, don't tell me. At last, present my updated patch. Merry Christmas.