emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric Danan <eric.danan@u-cergy.fr>
To: "Jérémie Juste" <jeremiejuste@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [PATCH] No completion when querying for property value in capture template
Date: Fri, 8 Jun 2018 22:29:25 +0200	[thread overview]
Message-ID: <CAMBH+RZW3mXVb5zfT4ZD-SPQQgrHuGUV1tmm9UyOHGwneLug=Q@mail.gmail.com> (raw)
In-Reply-To: <CAMBH+RYCa_avzh_O6-A+dnTkXahtRT8k-Lg83TSueOd2u2zfuA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1602 bytes --]

OK I think I understand why it doesn't work. I'm attaching a simple
patch that hopefully solves the issue. I've put comments in the commit
message. Please let me know if anything is not clear or if you see
issues.

Eric

On Thu, Jun 7, 2018 at 11:18 PM Eric Danan <eric.danan@u-cergy.fr> wrote:
>
> Thanks.
>
>> As far as I know it is not currently possible to get property
>> auto-completion from the property list of the file itself.
>
>
> I don't understand: when I call "org-set-property" directly from the file (C-c C-x p), it does get all the property values in the file and proposes them for completion. I am probably missing your pint, could I ask you to explain?
>
> Only when I use the "%^{prop}p" capture template element are the values not offered. I don't understand why because looking at the code of "org-capture-fill-template", it seems to simply call "org-set-property" for this element.
>
>> but you could still make use of the stock property in the template and auto-complete
>> from there
>>
>> For instance:
>>
>> ("T" "TEST" entry (file+headline"/tmp/test.org" "drill")
>>         "** TEST  \n :PROPERTIES:\n :Effort: %^{prompt|0:10|0:20|0:30|1:00|2:00|3:00}\n :END: \n %^{PROMPT} " )
>>
>> see the rest of the thread for more details http://lists.gnu.org/archive/html/emacs-orgmode/2011-10/msg01339.html
>
>
> Yes I've read the rest of the thread, but that's not always feasible. In my use case, the property values are titles of academic journals, I can't list them all inside a "%^{prompt}" template element, I need them to be fetched from the file.
>
> Thanks again.
>
> Eric

[-- Attachment #2: 0001-org-capture.el-Offer-property-value-completions-in-c.patch --]
[-- Type: application/x-patch, Size: 2331 bytes --]

  reply	other threads:[~2018-06-08 20:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-07 13:05 No completion when querying for property value in capture template Eric Danan
2018-06-07 15:21 ` Jeremie Juste
2018-06-07 21:18   ` Eric Danan
2018-06-08 20:29     ` Eric Danan [this message]
2018-06-16 15:06       ` [PATCH] " Nicolas Goaziou
2018-06-16 19:59         ` Eric Danan
2018-06-16 21:24           ` Nicolas Goaziou
2018-06-17  9:33             ` Eric Danan

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='CAMBH+RZW3mXVb5zfT4ZD-SPQQgrHuGUV1tmm9UyOHGwneLug=Q@mail.gmail.com' \
    --to=eric.danan@u-cergy.fr \
    --cc=emacs-orgmode@gnu.org \
    --cc=jeremiejuste@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).