From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nathan Neff Subject: Re: Basic Q: Display specific property in custom agenda view Date: Thu, 26 Sep 2019 00:06:20 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000003c965605936db694" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:33416) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iDLyg-0008LD-AC for emacs-orgmode@gnu.org; Thu, 26 Sep 2019 01:06:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iDLyd-0003Rq-Ti for emacs-orgmode@gnu.org; Thu, 26 Sep 2019 01:06:05 -0400 Received: from mail-io1-f45.google.com ([209.85.166.45]:38050) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iDLyc-0003Qa-Te for emacs-orgmode@gnu.org; Thu, 26 Sep 2019 01:06:03 -0400 Received: by mail-io1-f45.google.com with SMTP id u8so3118308iom.5 for ; Wed, 25 Sep 2019 22:06:02 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode --0000000000003c965605936db694 Content-Type: text/plain; charset="UTF-8" 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))) On Wed, Sep 25, 2019 at 11:16 PM Nathan Neff wrote: > > On Wed, Sep 25, 2019 at 7:12 PM Nathan Neff 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 >> > --0000000000003c965605936db694 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Got it!=C2=A0 Now, all I need to do is ad= d the cool ":" functionality
where a "= :" is appended to the result if there is a result :-) =C2=A0

Using %-12:(njn-get-proj-property)<= /div>
doesn't work like %-12:c :-(

;; Return PROJ property or category property
(defun njn-g= et-proj-property()
=C2=A0 (or (org-entry-get (point) "PROJ&q= uot; t)=C2=A0
=C2=A0 =C2=A0 =C2=A0 (org-get-category)))

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

<snip>


=



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

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


=
I found an example here:
htt= ps://lists.gnu.org/archive/html/emacs-orgmode/2016-04/msg00402.html

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

Thanks for any advice
--Nate
--0000000000003c965605936db694--