Karthik Chikmagalur <karthikchikmaga...@gmail.com> writes: > As discussed in the last Org meetup, I would like to write a CAPF that > provides completions and annotations when typing in keywords provided by > (loaded) Org libraries. The annotations providing inline documentation > require this information to be available in the Elisp file. > > My understanding is that babel header-args are available in defvars like > > (defvar org-babel-header-args:sqlite > '((db . :any) > ... > "Sqlite specific header args.") > > and that the documentation for these cannot be included in the same > variable as the cons-cell structure and the :any symbols have special > meanings.
Yup. We may simply define a new special variable like, (defvar org-babel-header-arg-docs:sqlite '((db "...." (header "....") ...)) "Description of sqlite-specific header arguments.") and global (defvar org-babel-header-args-docs ...) As I said during the meetup, this design is (hopefully) temporary. Sooner or later, I hope to switch things to ox.el-like backend definition like `org-export-define-backend'. But that may or may not happen, so we should not wait for it. It would also be nice to add documentation for export options, just like for header arguments. That documentation could also be used in the completion. (for #+EXPORT_KEYWORD and #+OPTIONS: foo:val) -- 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>