From mboxrd@z Thu Jan 1 00:00:00 1970 From: Phil Hudson Subject: History list for %^{...} in capture Date: Fri, 20 May 2016 17:11:55 +0100 Message-ID: <8760u86a1s.fsf@quiz.hudson-it.ddns.net> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36801) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b3n28-0007k1-Qk for emacs-orgmode@gnu.org; Fri, 20 May 2016 12:12:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b3n22-0005Fn-Ps for emacs-orgmode@gnu.org; Fri, 20 May 2016 12:12:15 -0400 Received: from mail-wm0-x233.google.com ([2a00:1450:400c:c09::233]:38427) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b3n22-0005Fa-4t for emacs-orgmode@gnu.org; Fri, 20 May 2016 12:12:10 -0400 Received: by mail-wm0-x233.google.com with SMTP id n129so89521265wmn.1 for ; Fri, 20 May 2016 09:12:09 -0700 (PDT) Received: from quiz.hudson-it.ddns.net.quiz.hudson-it.ddns.net (82-71-5-38.dsl.in-addr.zen.co.uk. [82.71.5.38]) by smtp.gmail.com with ESMTPSA id k62sm5280555wmb.7.2016.05.20.09.12.08 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 May 2016 09:12:08 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org Arising from a discussion here a couple of weeks ago, I'm thinking about how best to add a history list to org-capture's current %^{prompt|default|choice2|...|choiceN} escape syntax. Here's my thinking so far. %^{prompt|'histList} %^{prompt|default|'histList} %^{prompt|default|choiceToPrepend|...|'histList|choiceToAppend|...} Note the quote distinguishing the variable name. Effectively the third example means: merge choices "default" and "choiceTo*" into 'histList, prepending or appending each choice (if it is not already an element of `histList') according to whether it occurs before or after 'histList. Usually we would not expect prepending and appending, just the prompt, default and history list as in the second example. However, this form might be useful for pre-populating an otherwise empty list. I've identified the place in the code where the changes would need to be coded, but I thought I should get your ideas before I dive in. Effectively something similar is being done behind the scenes already and then discarded; I would just be bringing it into the light of day and making it persistent across calls. WDYT? Good idea? Too complex? Too "busy"? Useful? Not useful? -- Phil Hudson http://hudson-it.ddns.net @UWascalWabbit PGP/GnuPG ID: 0x887DCA63