emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric Danan <eric.danan@u-cergy.fr>
To: mail@nicolasgoaziou.fr
Cc: emacs-orgmode@gnu.org
Subject: Re: [PATCH] No completion when querying for property value in capture template
Date: Sat, 16 Jun 2018 21:59:40 +0200	[thread overview]
Message-ID: <CAMBH+RbSn=Scsj91esnzkXzEdc7hY4JXpHgMKs73FSni8pVd_A@mail.gmail.com> (raw)
In-Reply-To: <877emykbyo.fsf@nicolasgoaziou.fr>

Thanks.

I did some testing and it seems towork except in one case: if the
template target is of type "file+headline" (I guess "file+olp" etc as
well), the target file has an in-buffer setting "#+PROPERTY PROP_ALL
AAA BBB", and the target entry has a property ":PROP_ALL:  CCC DDD"
overriding the in-buffer setting, then completion is done on "AAA BBB"
whereas it would make more sense to me to do it on "CCC DDD".

It is perhaps not a major issue, but could be a convenient way to
specify different sets of allowed values for different target entries
in the same file (it already works, however, if the target file has no
in-buffer setting for the allowed values). An alternative could be to
allow patterns of the form "%^{prop|allowed1|allowed2|...}p" in the
capture template (that would in fact be even more flexible because it
would allow to specify different sets of allowed values for different
capture templates with the same target entry).

Eric
On Sat, Jun 16, 2018 at 5:06 PM Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
>
> Hello,
>
> Eric Danan <eric.danan@u-cergy.fr> writes:
>
> > 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.
>
> Thank you for the analysis and the patch. As you have guessed, the
> problem is that the property is set in a different buffer than the
> target buffer.
>
> I committed a different solution. Does it fix your problem?
>
> Regards,
>
> --
> Nicolas Goaziou

  reply	other threads:[~2018-06-16 19:59 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     ` [PATCH] " Eric Danan
2018-06-16 15:06       ` Nicolas Goaziou
2018-06-16 19:59         ` Eric Danan [this message]
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+RbSn=Scsj91esnzkXzEdc7hY4JXpHgMKs73FSni8pVd_A@mail.gmail.com' \
    --to=eric.danan@u-cergy.fr \
    --cc=emacs-orgmode@gnu.org \
    --cc=mail@nicolasgoaziou.fr \
    /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).