What is here missing is `org-capture-by-completing-read' so that
user may select among many various capture templates.

Compensating for initial bad design is expensive effort.

Are you suggesting something like this?:

#+begin_src emacs-lisp
(defun +org-capture-read (&optional arg)
 "completing read interface for org-capture template selection.
ARG is passed to `org-capture'."
 (let (parent)
   (when-let* ((templates
                (mapcar (lambda (template)
                          (let* ((keys (car template))
                                 (parentkeys (car parent)))
                            (if (= (length template) 2)
(progn (setq parent template) nil) (cons (concat (when (and parentkeys (string-prefix-p parentkeys keys)) (concat (cadr parent) "/"))
                                            (cadr template))
                                    keys))))
                        org-capture-templates))
               (selection (alist-get
                           (completing-read "capture template: "
(mapcar #'car (delq nil templates))
                                            nil 'require-match)
                           templates
                           nil nil
                           #'string=)))
     (org-capture arg selection))))
#+end_src emacs-lisp


Reply via email to