emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: No Wayman <iarchivedmywholelife@gmail.com>
To: bugs@gnu.support
Cc: theophilusx@gmail.com, pietru@caramail.com, emacs-orgmode@gnu.org
Subject: Re: Org Capture Menu cannot be fully viewed
Date: Wed, 16 Dec 2020 13:46:11 -0500	[thread overview]
Message-ID: <875z51si6k.fsf@gmail.com> (raw)
In-Reply-To: <X9XigBscC87S/ikS@protected.rcdrun.com>


> 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



  parent reply	other threads:[~2020-12-16 18:49 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-12 18:02 Org Capture Menu cannot be fully viewed pietru
2020-12-12 22:09 ` TRS-80
2020-12-12 22:46   ` pietru
2020-12-12 23:13     ` TRS-80
2020-12-12 23:30       ` pietru
2020-12-13  0:00         ` TRS-80
2020-12-13  0:10           ` pietru
2020-12-13 11:06   ` Jean Louis
2020-12-13 18:28     ` pietru
2020-12-13 20:37       ` Jean Louis
2020-12-13 20:52         ` TRS-80
2020-12-13 21:02         ` pietru
2020-12-13 21:48           ` Jean Louis
2020-12-13 22:08             ` pietru
2020-12-13 22:20             ` pietru
2020-12-13 22:00           ` TRS-80
2020-12-13 22:36             ` pietru
2020-12-13 20:32     ` TEC
2020-12-13 21:43       ` Jean Louis
2020-12-13  0:46 ` Tim Cross
2020-12-13  1:32   ` pietru
2020-12-13  2:08     ` pietru
2020-12-13  3:16       ` TRS-80
2020-12-13  3:49         ` pietru
2020-12-13  4:30           ` TRS-80
2020-12-13  9:58             ` pietru
2020-12-13 16:52             ` Jean Louis
2020-12-13 10:24           ` Jean Louis
2020-12-13 18:41             ` pietru
2020-12-13 20:48               ` TRS-80
2020-12-13  4:57         ` pietru
2020-12-13  9:24           ` Christopher Dimech
2020-12-13 23:08           ` TRS-80
2020-12-14  0:04             ` pietru
2020-12-13  9:44       ` Jean Louis
2020-12-13 18:46         ` Christopher Dimech
2020-12-16 18:46         ` No Wayman [this message]
2020-12-16 16:58       ` No Wayman
2020-12-13 15:12   ` Jean Louis
2020-12-13 18:08     ` pietru
2020-12-13 20:06     ` Tim Cross
2020-12-13 21:37       ` pietru
2020-12-13 21:57       ` Bastien
2020-12-13 22:31         ` pietru
2020-12-13 23:30         ` Jean Louis
2020-12-13 23:52           ` Bastien
2020-12-13 22:34       ` Jean Louis
2020-12-14 12:41 ` Marco Wahl
2020-12-14 13:00   ` pietru
2020-12-14 13:18     ` Marco Wahl
2020-12-14 20:02   ` Org Capture Menu cannot be fully viewed - Results of testing C-n, C-p, C-v pietru
2020-12-16 21:46     ` Marco Wahl
2020-12-16 23:25       ` pietru

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=875z51si6k.fsf@gmail.com \
    --to=iarchivedmywholelife@gmail.com \
    --cc=bugs@gnu.support \
    --cc=emacs-orgmode@gnu.org \
    --cc=pietru@caramail.com \
    --cc=theophilusx@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).