emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Christophe Schockaert <R3vLibre@citadels.eu>
To: Markus Heller <hellerm2@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Displaying property values in agenda search result
Date: Tue, 15 Mar 2016 22:06:54 +0100	[thread overview]
Message-ID: <871t7be9ht.fsf@artlab.createcnix.lan> (raw)
In-Reply-To: <loom.20160314T231801-149@post.gmane.org>


Markus Heller writes:

> Hello,
>
> how can I display property values in the agenda, more specifically, in 
> the results of an agenda search?
>
> [...]
>
> I search using the following in my .emacs as part of a custom agenda 
> command:
>
> 	      ("i" "Text here" tags "CATEGORY=\"foo\""
> 	       ((org-agenda-overriding-header "Header here")))
Hi,


Well, I am a newcomer to this list, and I wish to say that I really
enjoy Org-Moding stuffs :)

I have many things to tweak, and surely questions to come...

But it seems I can give some input there.
I think I am doing something close to what you are trying to achieve.

In my custom agenda, I have edited the displayed content to show a
property "Loc" when I have actions that occur at a certain location,
like a meeting or rendez-vous.

I defined the entry that way, using the "%(expression)" specifier in "org-agenda-prefix-format" :

<excerpt src="org-agenda-custom-commands">
(agenda ""
   ((org-agenda-prefix-format " %i %-12:c%?-12t%(if (setq loc (org-entry-get (point) \"Loc\")) (concat \"[Loc:\" loc \"] \") \"\")% s")))
</excerpt>


The output looks like:

<excerpt src="agenda output">
Wednesday  16 March 2016
  FunnyStuff:  12:30-13:30 [Loc:Somewhere] NEXT Something to do
</excerpt>


I think you should be able to do the same for a "search" entry, the
default "org-agenda-prefix-format" value for "search" is " %i %-12:c"
(see the help for the variable), you could adjust it to include you
property value.

So, with the column view answer from Herbert, you get two options.

I hope one will suit your needs,
Regards,

Christophe


> This search displays Some Task and Some subtask as expected, but how can 
> I also display 1234 as value of the property Project for both Some Task 
> as well as Some subtask?
>
> Not sure if this is relevant, but my .emacs includes
>
> (setq org-use-property-inheritance (quote ("Project")))
>
> Thanks
> Markus

-- 
--------------->  mailto:R3vLibre@citadels.eu
Once it's perfectly aimed, the flying arrow goes straight to its target.
Thus, don't worry when things go right.
There will be enough time to worry about if they go wrong.
Then, it's time to fire a new arrow towards another direction.
Don't sink.  Adapt yourself !  The archer has to shoot accurately and quickly.
[Words of Erenthar, the bowman ranger] <---------------<<<<

  parent reply	other threads:[~2016-03-15 21:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-14 22:24 Displaying property values in agenda search result Markus Heller
2016-03-15 17:02 ` Herbert Sitz
2016-03-15 20:58   ` Markus Heller
2016-03-15 21:06 ` Christophe Schockaert [this message]
2016-03-16 21:49   ` Markus Heller

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=871t7be9ht.fsf@artlab.createcnix.lan \
    --to=r3vlibre@citadels.eu \
    --cc=emacs-orgmode@gnu.org \
    --cc=hellerm2@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).