emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Displaying property values in agenda search result
@ 2016-03-14 22:24 Markus Heller
  2016-03-15 17:02 ` Herbert Sitz
  2016-03-15 21:06 ` Christophe Schockaert
  0 siblings, 2 replies; 5+ messages in thread
From: Markus Heller @ 2016-03-14 22:24 UTC (permalink / raw)
  To: emacs-orgmode

Hello,

how can I display property values in the agenda, more specifically, in 
the results of an agenda search?

Consider the following example:

* Some Project
:PROPERTIES:
:Project:  1234
:END:
** TODO Some Task
:PROPERTIES:
:CATEGORY: foo
:END:
*** NEXT Some subtask

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

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

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

* Re: Displaying property values in agenda search result
  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
  1 sibling, 1 reply; 5+ messages in thread
From: Herbert Sitz @ 2016-03-15 17:02 UTC (permalink / raw)
  To: emacs-orgmode

Markus Heller <hellerm2 <at> gmail.com> writes:

> 
> Hello,
> 
> how can I display property values in the agenda, more specifically, in 
> the results of an agenda search?
> 

I think the straigtforward way would be to use column view, and set up your
column view to show, in your case, the PROJECT property.

See, sect. 10.8 of the manual, "Using column view in the agenda":
http://orgmode.org/manual/Agenda-column-view.html#Agenda-column-view

as well as reviewing the basic column view info and directions for setup in
sect 7.5, "Column view":
http://orgmode.org/manual/Column-view.html#Column-view

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

* Re: Displaying property values in agenda search result
  2016-03-15 17:02 ` Herbert Sitz
@ 2016-03-15 20:58   ` Markus Heller
  0 siblings, 0 replies; 5+ messages in thread
From: Markus Heller @ 2016-03-15 20:58 UTC (permalink / raw)
  To: emacs-orgmode

Herbert Sitz <hesitz <at> gmail.com> writes:

> 
> Markus Heller <hellerm2 <at> gmail.com> writes:
> 
> > 
> > Hello,
> > 
> > how can I display property values in the agenda, more specifically, 
in 
> > the results of an agenda search?
> > 
> 
> I think the straigtforward way would be to use column view, and set up 
your
> column view to show, in your case, the PROJECT property.
> 
> See, sect. 10.8 of the manual, "Using column view in the agenda":
> http://orgmode.org/manual/Agenda-column-view.html#Agenda-column-view
> 
> as well as reviewing the basic column view info and directions for 
setup in
> sect 7.5, "Column view":
> http://orgmode.org/manual/Column-view.html#Column-view
> 

Thanks for the suggestion, but column view is *not* what I'm after.  I 
was able to tweak my approach a bit to make it workable.

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

* Re: Displaying property values in agenda search result
  2016-03-14 22:24 Displaying property values in agenda search result Markus Heller
  2016-03-15 17:02 ` Herbert Sitz
@ 2016-03-15 21:06 ` Christophe Schockaert
  2016-03-16 21:49   ` Markus Heller
  1 sibling, 1 reply; 5+ messages in thread
From: Christophe Schockaert @ 2016-03-15 21:06 UTC (permalink / raw)
  To: Markus Heller; +Cc: emacs-orgmode


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] <---------------<<<<

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

* Re: Displaying property values in agenda search result
  2016-03-15 21:06 ` Christophe Schockaert
@ 2016-03-16 21:49   ` Markus Heller
  0 siblings, 0 replies; 5+ messages in thread
From: Markus Heller @ 2016-03-16 21:49 UTC (permalink / raw)
  To: emacs-orgmode

Christophe Schockaert <R3vLibre <at> citadels.eu> writes:

> 
> 
> Markus Heller writes:
> 
> > Hello,
> >
> > how can I display property values in the agenda, more specifically, 
in 
> > the results of an agenda search?
> >
> > [...]
> >

[...]

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

[...] 

org-agenda-prefix-format is exactly what I was looking for.

Thank you very much!

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

end of thread, other threads:[~2016-03-16 21:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2016-03-16 21:49   ` Markus Heller

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