all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Basic Q: Display specific property in custom agenda view
@ 2019-09-26  0:12 Nathan Neff
  2019-09-26  4:16 ` Nathan Neff
  0 siblings, 1 reply; 5+ messages in thread
From: Nathan Neff @ 2019-09-26  0:12 UTC (permalink / raw)
  To: emacs-orgmode

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

Hello all,

My apologies for not finding this in the docs, but I'm trying to define a
simple custom agenda view that is exactly the same as the default day week
view,
except the only difference is displaying a property called FOO instead of
the CATEGORY
property.

I think it's simply a matter of setting org-agenda-prefix-format to
something
other than the default:  " %i %-12:c%?-12t% s" but I can't find the exact
function to call
in place of %i.  I would think there's something like
%(get-property-of-heading(FOO))

Thanks for any advice
--Nate

[-- Attachment #2: Type: text/html, Size: 781 bytes --]

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

* Re: Basic Q: Display specific property in custom agenda view
  2019-09-26  0:12 Basic Q: Display specific property in custom agenda view Nathan Neff
@ 2019-09-26  4:16 ` Nathan Neff
  2019-09-26  5:06   ` Nathan Neff
  0 siblings, 1 reply; 5+ messages in thread
From: Nathan Neff @ 2019-09-26  4:16 UTC (permalink / raw)
  To: emacs-orgmode

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

On Wed, Sep 25, 2019 at 7:12 PM Nathan Neff <nathan.neff@gmail.com> wrote:

> Hello all,
>
> My apologies for not finding this in the docs, but I'm trying to define a
> simple custom agenda view that is exactly the same as the default day week
> view,
> except the only difference is displaying a property called FOO instead of
> the CATEGORY
> property.
>
>
I found an example here:
https://lists.gnu.org/archive/html/emacs-orgmode/2016-04/msg00402.html

Thanks,
--Nate


> I think it's simply a matter of setting org-agenda-prefix-format to
> something
> other than the default:  " %i %-12:c%?-12t% s" but I can't find the exact
> function to call
> in place of %i.  I would think there's something like
> %(get-property-of-heading(FOO))
>
> Thanks for any advice
> --Nate
>

[-- Attachment #2: Type: text/html, Size: 1739 bytes --]

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

* Re: Basic Q: Display specific property in custom agenda view
  2019-09-26  4:16 ` Nathan Neff
@ 2019-09-26  5:06   ` Nathan Neff
  2019-09-26  5:27     ` Fraga, Eric
  0 siblings, 1 reply; 5+ messages in thread
From: Nathan Neff @ 2019-09-26  5:06 UTC (permalink / raw)
  To: emacs-orgmode

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

Got it!  Now, all I need to do is add the cool ":" functionality
where a ":" is appended to the result if there is a result :-)

Using %-12:(njn-get-proj-property)
doesn't work like %-12:c :-(

;; Return PROJ property or category property
(defun njn-get-proj-property()
  (or (org-entry-get (point) "PROJ" t)
      (org-get-category)))

  (setq org-agenda-custom-commands
     '(
     ("A" agenda "" (
        (org-agenda-span 'day)
          (org-agenda-prefix-format " %-12(njn-get-proj-property) %?-12t%
s")
         (org-agenda-include-inactive-timestamps nil)))

<snip>





On Wed, Sep 25, 2019 at 11:16 PM Nathan Neff <nathan.neff@gmail.com> wrote:

>
> On Wed, Sep 25, 2019 at 7:12 PM Nathan Neff <nathan.neff@gmail.com> wrote:
>
>> Hello all,
>>
>> My apologies for not finding this in the docs, but I'm trying to define a
>> simple custom agenda view that is exactly the same as the default day
>> week view,
>> except the only difference is displaying a property called FOO instead of
>> the CATEGORY
>> property.
>>
>>
> I found an example here:
> https://lists.gnu.org/archive/html/emacs-orgmode/2016-04/msg00402.html
>
> Thanks,
> --Nate
>
>
>> I think it's simply a matter of setting org-agenda-prefix-format to
>> something
>> other than the default:  " %i %-12:c%?-12t% s" but I can't find the exact
>> function to call
>> in place of %i.  I would think there's something like
>> %(get-property-of-heading(FOO))
>>
>> Thanks for any advice
>> --Nate
>>
>

[-- Attachment #2: Type: text/html, Size: 3192 bytes --]

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

* Re: Basic Q: Display specific property in custom agenda view
  2019-09-26  5:06   ` Nathan Neff
@ 2019-09-26  5:27     ` Fraga, Eric
  2019-09-27  8:30       ` Nathan Neff
  0 siblings, 1 reply; 5+ messages in thread
From: Fraga, Eric @ 2019-09-26  5:27 UTC (permalink / raw)
  To: Nathan Neff; +Cc: emacs-orgmode

On Thursday, 26 Sep 2019 at 00:06, Nathan Neff wrote:
> Got it!  Now, all I need to do is add the cool ":" functionality
> where a ":" is appended to the result if there is a result :-)

Maybe something like

;; Return PROJ property or category property
(defun njn-get-proj-property()
  (if (org-entry-get (point) "PROJ" t)
      (concat (org-get-category) ":")
    ""))

(untested)
-- 
Eric S Fraga via Emacs 27.0.50, Org release_9.2.4-401-gfabd6d

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

* Re: Basic Q: Display specific property in custom agenda view
  2019-09-26  5:27     ` Fraga, Eric
@ 2019-09-27  8:30       ` Nathan Neff
  0 siblings, 0 replies; 5+ messages in thread
From: Nathan Neff @ 2019-09-27  8:30 UTC (permalink / raw)
  To: Fraga, Eric; +Cc: emacs-orgmode

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

Thanks Eric, this does it!

On Thu, Sep 26, 2019 at 12:27 AM Fraga, Eric <e.fraga@ucl.ac.uk> wrote:

> On Thursday, 26 Sep 2019 at 00:06, Nathan Neff wrote:
> > Got it!  Now, all I need to do is add the cool ":" functionality
> > where a ":" is appended to the result if there is a result :-)
>
> Maybe something like
>
> ;; Return PROJ property or category property
> (defun njn-get-proj-property()
>   (if (org-entry-get (point) "PROJ" t)
>       (concat (org-get-category) ":")
>     ""))
>
> (untested)
> --
> Eric S Fraga via Emacs 27.0.50, Org release_9.2.4-401-gfabd6d
>

[-- Attachment #2: Type: text/html, Size: 1007 bytes --]

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

end of thread, other threads:[~2019-09-27  8:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-26  0:12 Basic Q: Display specific property in custom agenda view Nathan Neff
2019-09-26  4:16 ` Nathan Neff
2019-09-26  5:06   ` Nathan Neff
2019-09-26  5:27     ` Fraga, Eric
2019-09-27  8:30       ` Nathan Neff

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.