From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id /BikF82X1l9OJAAA0tVLHw (envelope-from ) for ; Sun, 13 Dec 2020 22:38:05 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id eE5OE82X1l9LfgAA1q6Kng (envelope-from ) for ; Sun, 13 Dec 2020 22:38:05 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id D64979404C4 for ; Sun, 13 Dec 2020 22:38:01 +0000 (UTC) Received: from localhost ([::1]:36328 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1koa08-0001fz-Pk for larch@yhetil.org; Sun, 13 Dec 2020 17:38:00 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:41360) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koZzL-0001e6-L7 for emacs-orgmode@gnu.org; Sun, 13 Dec 2020 17:37:11 -0500 Received: from mout.gmx.net ([212.227.15.19]:50085) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koZzC-0005f3-2l for emacs-orgmode@gnu.org; Sun, 13 Dec 2020 17:37:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1607898973; bh=YA8MyrddbZP2cefvwwA9wtgM9v99dbY6KaM5QRvMBzI=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=Vo42inELpgBlYTRkYmwUej4MjI2K40UyM9B1dacvJ310Mvay91YEOyRdjln4tiy0e /hqrzX5Tiz/Hgky+mUI1BpRu1FN+UC6eeylQJ+Ly1sGzMizdFhUXc3JgqcxhDUNZLO 8vyXjxupy3Tp3U9CFEleRAe2PDdoUnf13tfgXzjg= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [213.165.168.94] ([213.165.168.94]) by web-mail.gmx.net (3c-app-mailcom-bs09.server.lan [172.19.170.177]) (via HTTP); Sun, 13 Dec 2020 23:36:13 +0100 MIME-Version: 1.0 Message-ID: From: pietru@caramail.com To: TRS-80 Subject: Re: Org Capture Menu cannot be fully viewed Content-Type: text/plain; charset=UTF-8 Date: Sun, 13 Dec 2020 23:36:13 +0100 Importance: normal Sensitivity: Normal In-Reply-To: References: X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:iEfgY8EuAgoqf+FDtVmCGYyZvM1fyMoGTxnisF6bsPPNEA8PzUW5HcacnjL/IwRd684eF WZs24qGZySr36dgu84K2S1wZIQS4GXs0B8xg6dYWEWbl6BfT3vYFeU65pTadIRt794M/KJCqjduk k4hfS5Y+H4+M+tN57G0XfxUX4LNIzdS+7Z0bEzTtByupbKUi8Huy2EC8n1kG7JEdjMJhiaQ43Lm2 x++7HSdwbcRDlQEKVJVMaxJHr/2/oIANXL0620lU4Q6E++R7VYeyxikE/YGIc9r5oW38UhzI2ksT z4= X-UI-Out-Filterresults: notjunk:1;V03:K0:JRAayTDZqpU=:O9FigeUbQbG/Z/SQbipFcV mdDqMbXicwSps46hl/m+J5LXZ4g8PG114frcQxaJMS8AidoiLdYU3yQWRy/Szw4VAO0BOO90e Eip6wsvxeQLZs6LmQmjxvj6RK1zwrZf8FCGsFESH1R/ELklpYwF7j9wu66qb1/bMpslmACadq P2qd0oS0JgGLSG9+xrvhJEB7HCHefE4MaZsvwVw18QY1FNjuaznZAu2iR+4xaItq6w2vKdJJj 4OP/FHVfrvolc1MXsxqe7L/pUenICobVqmd6pKkmEhO8SW8KYwcbqKrJHsgHZ0Pm7e9EOCLDX c2HmPcwop4CX9M/WpiREgwKMsbm4hFKGb+KRe8N7Vcw0hiFmLDPrSIzPDHGV4JyDeoJlBBFOI YEqfnZQyaYoypw7lGmfELEVjwcSsPMxvvTcmUTeGnWMNu3yVxuqnrMgBv/E0pDpq+Qv1MPj+y WkpoTzjf4xQe1WOwjihys89zYXbI7McfC0o+WoGWgwNe2Pr1bJeXllkjJhYqjQs3+k6qNQc2C EAWGQwFI4QsPBG3u9pjY9CnIWSjsUkMS2B9nvm5dXDvvfpedt2csqVz423GEyu0zmYc5TcdAB 6EX2tt2FTDSIo= Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=212.227.15.19; envelope-from=pietru@caramail.com; helo=mout.gmx.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -1.90 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmx.net header.s=badeba3b8450 header.b=Vo42inEL; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=caramail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: D64979404C4 X-Spam-Score: -1.90 X-Migadu-Scanner: scn1.migadu.com X-TUID: +1G0hCy8yCAN > Sent: Sunday, December 13, 2020 at 11:00 PM > From: "TRS-80" > To: emacs-orgmode@gnu.org > Subject: Re: Org Capture Menu cannot be fully viewed > > On 2020-12-13 16:02, pietru@caramail.com wrote: > > > > Would that apply with respect to inserting long headings or > > descriptions in org file? > > Yes. If you have not used completing-read, just play around with it a > bit and you will very quickly see how it works. It takes a list (Elisp > data type) as input, on which you can do narrowing selection as you > type. > > Ivy was one of recommendations which I can second, I prefer it's more > intuitive (to me) interaction style and support for native > completing-read format. But there are (many) others, too. > > > Example: > > > > ;; "Site_SubType: > > ;; [1a] Settlement > Encampment > > ;; [1a] Settlement > Hamlet or Village > > ;; [1a] Settlement > Town or City > > [...] > > However to make it even simpler to use / maintain your candidate lists, > I would just put them in a simple plain text file, aligned to left > margin. Example: > > File name: Site_SubType > > [1a] Settlement > Encampment > [1a] Settlement > Hamlet or Village > [1a] Settlement > Town or City That would be my way to attack it, by storing any pre-defined things with a field and a value in a record master file. > Then you need a function to read from plain text file with your "list" > of candidates, and turn that into an (Elisp data type) list: > > #+begin_src emacs-lisp > > (defun my-file-to-list (file) > "Read FILE and return it as a list of strings. > > List items will be split upon newlines." > (with-temp-buffer > (insert-file-contents file) > (split-string (buffer-string) "\n" t))) > > #+end_src > > You then use the above function (with filename argument) for your > candidate list in completing-read. Modifying Jean Louis' earlier > example, it now becomes: > > #+begin_src emacs-lisp > > (completing-read "Choose: " > (my-file-to-list "/path/to/Site_SubType")) > > #+end_src > > You can even use this to fill in Org Properties. Or you can use Org > Properties similar native completion, although by default that only uses > whatever values already exist in the buffer (which therefore could be > "none"), instead of your specified controlled vocabulary file as I used > above. I (by far) prefer the controlled vocabulary method, for lots of > reasons. > > Cheers, > TRS-80 > >