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 SN1pKr9g1l+pdwAA0tVLHw (envelope-from ) for ; Sun, 13 Dec 2020 18:43:11 +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 gK1CJr9g1l89UwAA1q6Kng (envelope-from ) for ; Sun, 13 Dec 2020 18:43:11 +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 6C7A29403EB for ; Sun, 13 Dec 2020 18:43:10 +0000 (UTC) Received: from localhost ([::1]:50520 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1koWKr-0007uL-0d for larch@yhetil.org; Sun, 13 Dec 2020 13:43:09 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:48372) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koWKJ-0007u4-IX for emacs-orgmode@gnu.org; Sun, 13 Dec 2020 13:42:35 -0500 Received: from mout.gmx.net ([212.227.17.22]:36493) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koWKH-0004Tm-GI for emacs-orgmode@gnu.org; Sun, 13 Dec 2020 13:42:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1607884873; bh=Cm/eAdm9QsQUoTFu5gk3XAgqSiVRDKuCMqcZdMP4eEw=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=TzdQmVxeH5t9Ej6poA6QWfmOg8q61DkahGwyD3pV8TboNOGJxYTZ9Bcu5o/tx99gz qikm6lLBCasDzhcIhQemGD86ojFaTgrvSdRV1hvFaOiDRF2Fz4BEcvfyEcWnnUk2rY 48HaSf2PQvwlHytmON+6+lPYz0Cl7ljwrm97s7Bg= 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 19:41:13 +0100 MIME-Version: 1.0 Message-ID: From: pietru@caramail.com To: Jean Louis Subject: Re: Org Capture Menu cannot be fully viewed Content-Type: text/plain; charset=UTF-8 Date: Sun, 13 Dec 2020 19:41:13 +0100 Importance: normal Sensitivity: Normal In-Reply-To: References: <87y2i2ttl7.fsf@gmail.com> X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:hWcKpCC3y/ArvLFzo1w3jZk/upy33roySQDefkUmsHgCxgMGd3LE7BSDOClPupdRvAlbZ mli1TEjx8ZanJiqzhxF/PHrm2sJhOw/WnH/ifmJgs8S+iu3+rEkeyr4NUT5rQ7fATrMn07T9Xlf7 W/Kim90UEWzuX3yW4TOzW9qoeCUSlWNNoJPu93eLWKyK9MShpx1kFNd2JE7nwap6h3VSVIyodYSt FqTpKRUYlkdDEfePktkqBFdETa/z98Xobnx13nCT8VguOzbhcKR1dAxkmIEPxDRGSmVjGoAVb9Z1 AE= X-UI-Out-Filterresults: notjunk:1;V03:K0:4HrXIeS7P5U=:FroeH9hRlEZM5zu/7bR06q tKYPhmCJFQilSoCMaZbKU4+QrQX5OVGI0YbB6K7uiTWPgYFDsHJSxNrvic568P8CNCF4xFZQ6 wSNQVTxmRCgPz3r9IpSPy3eUpC1jhQMmT4IdxnEfnFHB+ZG+oK2i+VXMxHwd0pwmEKI+FEbMn QPCS7S6EocY/LAowzeA+H9wMalzqqZBbthTuKdkMBl5KEDxFqFx/ya7FAgtgg08AVLbAig1Y4 uf91viNb/qTIpwoSgpf0nnG/hFbsH39J9naOgYg4Q9zhVYJIAN4PjJmO4wlwPy+rBALqD8dQZ IbBCcFEGAgERtZo19LyG3GdvhWsQhPa7tjT9Uc5HCm7BFh62rNf6C0sO9+zwtDIkz4j13F2j9 50YHVlAwG9DUh2RS3ADwXBoBhy4JAQkSUezoYC5SXY6eLGhip275RuKx+2T4LBd1XtwmLFGnE Dpv3ug3iyGkWtejmEtKjSloKjndr8jytF7ulcxLXLptgh9lcclhiQQMXoSGJtY//yZwPeCs40 AMY/qHhww0KGTuFS0/BJ/53kEfh+jzxkVhFfm04Qgusm+5uB3k5S8W57XcoDREM5YJqa7hKPz Q8JSd7REXl0L0= Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=212.227.17.22; 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: -0.70 Authentication-Results: aspmx1.migadu.com; dkim=fail (headers rsa verify failed) header.d=gmx.net header.s=badeba3b8450 header.b=TzdQmVxe; dmarc=fail reason="SPF 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: 6C7A29403EB X-Spam-Score: -0.70 X-Migadu-Scanner: scn1.migadu.com X-TUID: qRI4f5Mjcx+x > Sent: Sunday, December 13, 2020 at 11:24 AM > From: "Jean Louis" > To: pietru@caramail.com > Cc: "TRS-80" , emacs-orgmode@gnu.org > Subject: Re: Org Capture Menu cannot be fully viewed > > * pietru@caramail.com [2020-12-13 06:51]: > > > Are there any more to these templates you did not show? > > I was thinking some users will get surprised on this. They may even > say it is not necessary. > > I have 1148 sets where I am capturing different > information. Imagine if I would be spending my time adjusting > what is not adjustable. Or spending time in configuring entries > and system asks me to assign "key" to the template. Which flaming > key?! > > > > Because, (and unless I am missing something) what I see are essentia= lly > > > all the same (and quite simple). You would end up with something li= ke > > > the following in your target file (with the cursor ending up at the = x): > > > > It was an example for long agenda option. Wanted to send a basic one > > without the details that could bother you. The real one will have inf= ormation > > regarding Site_Type [Domestic, Funerary, Water-Related, Settlement]. = But we > > don't have the things in org though. > > It allos speaks loud that you need not a key based filing but semantic > based filing. > > If we have few templates like 5-10 templates, key based filing is > fine. > > If we have 20-50 or 1148 places where to sort captured note than we > need a larger list type of a menu or filtering functions, completing > functions with the semantic search. Haven't ever exceeded 21. > Initially bad design corrupts user's habits to now start thinking of > "keys" instead of thinking of meanings like "domestic" "historical" > "background" and similar. Writing "dom his bac" would probably find > what you mean, and if not, similar candidates could be shown along. > I feel inclined to write a completing read function but on the other > hand I do not find it as a true solution. > > > What sort of thing better than template capture? My basic idea was > > to see what org tools are available, see what kind of problems me > > get to, without asking too much things specific to us. We can then > > work through things ourselves. Perhaps share them with some other > > organisations. > > While your work is totally understandable and logical and reasonable > it obviously cannot be handled with Org capture easily. > > If you would be fine not to use those heading templates, maybe a > simple completion list of files where you wish to capture something > would be enough. It would be beneficial to extend "%:keyword". This way we can capture data from a project file. Someone suggested, getting keyword values from recfiles (defined in Gnu Recutils). That would be quick to accomplish in the field. > ;; Create hash > (setq my-files-hash (make-hash-table)) > > ;; Try putting something into the hash, define your files and their mean= ings > (puthash (intern "One file") "~/tmp/new.org" my-files-hash) > (puthash (intern "Something else") "~/tmp/else.org" my-files-hash) > ;; You could continue feeding various files while only making sure > ;; that they description differ from each other > > ;; Take it back from hash to verify > (gethash (intern "Something else") my-files-hash) > "~/tmp/else.org" > > ;; Construct list of semantic meanings of those files > (hash-table-keys my-files-hash) > =3D> (One\ file Something\ else) > > (defun my-capture () > (interactive) > (let* ((my-files (hash-table-keys my-files-hash)) > (my-files (mapcar #'symbol-name my-files)) > (my-selection (completing-read "File to capture: " my-files)) > (my-selected-file (gethash (intern my-selection) my-files-hash))) > (when selected-file > (find-file selected-file) > (goto-char (point-max)) > (insert "\n") > (insert ** )))) > > Now the function would let you choose semantic description. You > could use ivy-mode for basic relevance search. It would help you > choose "back" and "hist" for some historical background. It would > then open your Org file and move you to the end of it and prepare > heading. > > But it does not include heading templates. When I look into Org > capture I do not find to me expected functional style of > programming so right now I would not know where to start to > implement the template. At least this way you could quickly > choose among large number of files, and insert the entry on the > end of the file. > > I am not sure of Org capture used the built-in Emacs skeleton > templates. But that is something I could rather think of. > > Then I would define various skeleton templates like: > > (define-skeleton my-template-1 > "Prepares template" > nil > "** " (skeleton-read "Heading: ") " > > URL: " (skeleton-read "URL: ") " > ") > > Such can be invoked from M-x my-template-1 > > then something like: > > (puthash (intern "Something else") '("~/tmp/else.org" my-template-1) my-= files-hash) > > would define that the file "Something else" is using the skeleton > template. This way all templates become separate and reusable for variou= s files. > > Then the function would be enhanced: > > (defun my-capture () > (interactive) > (let* ((my-files (hash-table-keys my-files-hash)) > (my-files (mapcar #'symbol-name my-files)) > (my-selection (completing-read "File to capture: " my-files)) > (data (gethash (intern my-selection) my-files-hash)) > (selected-file (car data)) > (template (cadr data))) > (when selected-file > (find-file selected-file) > (goto-char (point-max)) > (insert "\n") > (call-interactively template)))) > > Then by calling my-capture you are semantically choosing where to > file, and you may have unlimited number of files and > corresponding template is also chosen automatically for you. You > may edit templates separately from files. > > It would be trivial to even choose a different template at time > of capturing. I have to take some time to chew into this. > Jean >