emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* History list for %^{...} in capture
@ 2016-05-20 16:11 Phil Hudson
  2016-05-26 15:55 ` Aaron Ecay
  0 siblings, 1 reply; 3+ messages in thread
From: Phil Hudson @ 2016-05-20 16:11 UTC (permalink / raw)
  To: emacs-orgmode

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: History list for %^{...} in capture
  2016-05-20 16:11 History list for %^{...} in capture Phil Hudson
@ 2016-05-26 15:55 ` Aaron Ecay
  2016-05-26 21:58   ` Philip Hudson
  0 siblings, 1 reply; 3+ messages in thread
From: Aaron Ecay @ 2016-05-26 15:55 UTC (permalink / raw)
  To: Phil Hudson, emacs-orgmode

Hi Phil,

2016ko maiatzak 20an, Phil Hudson-ek idatzi zuen:
> 
> 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.

[...]

> 
> WDYT? Good idea? Too complex? Too "busy"? Useful? Not useful?

IMO, it’s very busy, and for a scenario that’s likely to be of use in
only a small number of circumstances.  I think it would be better to
just use a %(...) construct to call an elisp function which does the
completion exactly as you desire for your own usecase.

-- 
Aaron Ecay

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: History list for %^{...} in capture
  2016-05-26 15:55 ` Aaron Ecay
@ 2016-05-26 21:58   ` Philip Hudson
  0 siblings, 0 replies; 3+ messages in thread
From: Philip Hudson @ 2016-05-26 21:58 UTC (permalink / raw)
  To: Phil Hudson, emacs orgmode-mailinglist

OK, that's what was shown in that foregoing discussion I mentioned. In
which case, I guess it would be a good idea to copy that
implementation to Worg, or rather copy it to a github repo and link to
that from Worg. Or would it be better going into /contrib? Or its own
ELPA package?

Can't remember whose implementation it was ATM. I'll go back, find it,
and ask them off-list.

(Sorry for top-posting. I'm stuck with GMail for the moment).

On 26 May 2016 at 16:55, Aaron Ecay <aaronecay@gmail.com> wrote:
> Hi Phil,
>
> 2016ko maiatzak 20an, Phil Hudson-ek idatzi zuen:
>>
>> 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.
>
> [...]
>
>>
>> WDYT? Good idea? Too complex? Too "busy"? Useful? Not useful?
>
> IMO, it’s very busy, and for a scenario that’s likely to be of use in
> only a small number of circumstances.  I think it would be better to
> just use a %(...) construct to call an elisp function which does the
> completion exactly as you desire for your own usecase.
>
> --
> Aaron Ecay



-- 
Phil Hudson                   http://hudson-it.ddns.net
@UWascalWabbit                 PGP/GnuPG ID: 0x887DCA63

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-05-26 21:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-20 16:11 History list for %^{...} in capture Phil Hudson
2016-05-26 15:55 ` Aaron Ecay
2016-05-26 21:58   ` Philip Hudson

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).