From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Graham Smith" Subject: Re: help with modifying a bit of code in .emacs Date: Fri, 14 Dec 2007 09:00:09 +0000 Message-ID: <2c75873c0712140100j205b80dk9bb0f7b0fc7f1963@mail.gmail.com> References: <2c75873c0712131111m5b435f6cp912c2bce3b16f4d6@mail.gmail.com> <5ea706d0712131808w6d7da459i33cedb117e54c668@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1436424970==" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1J36Oz-0001aM-LD for emacs-orgmode@gnu.org; Fri, 14 Dec 2007 04:00:14 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1J36Ox-0001ZP-B8 for emacs-orgmode@gnu.org; Fri, 14 Dec 2007 04:00:11 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J36Ow-0001Z9-Dp for emacs-orgmode@gnu.org; Fri, 14 Dec 2007 04:00:10 -0500 Received: from an-out-0708.google.com ([209.85.132.245]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1J36Ov-0000HP-Mo for emacs-orgmode@gnu.org; Fri, 14 Dec 2007 04:00:10 -0500 Received: by an-out-0708.google.com with SMTP id c25so233064ana.84 for ; Fri, 14 Dec 2007 01:00:09 -0800 (PST) In-Reply-To: <5ea706d0712131808w6d7da459i33cedb117e54c668@mail.gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --===============1436424970== Content-Type: multipart/alternative; boundary="----=_Part_1092_8307589.1197622809030" ------=_Part_1092_8307589.1197622809030 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Chris, Thanks, this looks pretty well what I ended up with after some help off-list (I've only realised it was off list, and thought I had already replied to the list. The code I ended up with is: (setq org-agenda-custom-commands '( ("d" todo #("DELEGATED") nil) ("c" todo #("DONE|DEFERRED|CANCELLED") nil) ("w" todo #("WAITING") nil) ("W" agenda "" ((org-agenda-ndays 21))) ("A" agenda "" ((org-agenda-skip-function (lambda nil (org-agenda-skip-entry-if (quote notregexp) "\\=.*\\[#A\\]"))) (org-agenda-ndays 1) (org-agenda-overriding-header "Today's Priority #A tasks: "))) ("u" alltodo "" ((org-agenda-skip-function (lambda nil (org-agenda-skip-entry-if (quote scheduled) (quote deadline) (quote regexp) "<[^>\n]+>"))) (org-agenda-overriding-header "Unscheduled TODO entries: "))))) Which I think is the same as you suggest. And thanks for the explanations, these were useful. Graham On 14/12/2007, Chris Leyon wrote: > > On Dec 13, 2007 2:11 PM, Graham Smith wrote: > > I have been trying to rewrite the code to avoid the custom-set-variables > in > > .emacs but have finally come unstuck with this bit: > > [...] > > "Invalid read syntax: Invalid string property list" error when launching > > Emacs and narrowed it down to this bit of code. Can anyone point out > where > > this is wrong. The rest of it loads OK, its just this bit which is > failing. > > The #(...) is attempting to set a text property on the string > "DELEGATED". Apparently nil is not valid in this location. See > section 2.3.8.4 in the Elisp info document. Since nil probably means > no property, you can just eliminate the #() syntax. > > Also, your parentheses don't match up; you need extra closing parens > after some entries to make a well-formed list. You probably want to > end up with something like this (not tested but at least it evaluates > without error): > > (setq org-agenda-custom-commands > '(("d" todo ("DELEGATED")) > ("c" todo ("DONE|DEFERRED|CANCELLED")) > ("w" todo ("WAITING")) > ("W" agenda "" ((org-agenda-ndays 21))) > ("A" agenda "" ((org-agenda-skip-function > (lambda nil > (org-agenda-skip-entry-if (quote notregexp) > "\\=.*\\[#A\\]"))) > (org-agenda-ndays 1) > (org-agenda-overriding-header "Today's > Priority #A tasks: "))) > ("u" alltodo "" ((org-agenda-skip-function > (lambda nil > (org-agenda-skip-entry-if (quote > scheduled) (quote deadline) > (quote regexp) > "<[^>\n]+>"))) > (org-agenda-overriding-header "Unscheduled > TODO entries: "))))) > > > Many thanks, > > Graham > > Chris > ------=_Part_1092_8307589.1197622809030 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Chris,

Thanks, this looks pretty well what I ended up with after some help off-list (I've only realised it was off list, and thought I had already replied to the list.

The code I ended up with is:

(setq org-agenda-custom-commands
      '(
        ("d" todo #("DELEGATED") nil)
        ("c" todo #("DONE|DEFERRED|CANCELLED") nil)
        ("w" todo #("WAITING") nil)
        ("W" agenda "" ((org-agenda-ndays 21)))
        ("A" agenda "" ((org-agenda-skip-function
                           (lambda nil (org-agenda-skip-entry-if (quote notregexp) "\\=.*\\[#A\\]")))
                        (org-agenda-ndays 1)
                        (org-agenda-overriding-header "Today's Priority #A tasks: ")))
        ("u" alltodo "" ((org-agenda-skip-function
                          (lambda nil (org-agenda-skip-entry-if (quote scheduled) (quote deadline)
                                                                (quote regexp) "<[^>\n]+>")))
                         (org-agenda-overriding-header "Unscheduled TODO entries: ")))))

Which I think is the same as you suggest. And thanks for the explanations, these were useful.

Graham



On 14/12/2007, Chris Leyon <cleyon@gmail.com> wrote:
On Dec 13, 2007 2:11 PM, Graham Smith <myotisone@gmail.com> wrote:
> I have been trying to rewrite the code to avoid the custom-set-variables in
> .emacs but have finally come unstuck with this bit:
> [...]
> "Invalid read syntax: Invalid string property list" error when launching
> Emacs and narrowed it down to this bit of code. Can anyone point out where
> this is wrong. The rest of it loads OK, its just this bit which is failing.

The #(...) is attempting to set a text property on the string
"DELEGATED".  Apparently nil is not valid in this location.  See
section 2.3.8.4 in the Elisp info document.  Since nil probably means
no property, you can just eliminate the #() syntax.

Also, your parentheses don't match up; you need extra closing parens
after some entries to make a well-formed list.  You probably want to
end up with something like this (not tested but at least it evaluates
without error):

(setq org-agenda-custom-commands
      '(("d" todo ("DELEGATED"))
        ("c" todo ("DONE|DEFERRED|CANCELLED"))
        ("w" todo ("WAITING"))
        ("W" agenda "" ((org-agenda-ndays 21)))
        ("A" agenda "" ((org-agenda-skip-function
                         (lambda nil
                           (org-agenda-skip-entry-if (quote notregexp)
"\\=.*\\[#A\\]")))
                        (org-agenda-ndays 1)
                        (org-agenda-overriding-header "Today's
Priority #A tasks: ")))
        ("u" alltodo "" ((org-agenda-skip-function
                          (lambda nil
                            (org-agenda-skip-entry-if (quote
scheduled) (quote deadline)
                                                      (quote regexp)
"<[^>\n]+>")))
                         (org-agenda-overriding-header "Unscheduled
TODO entries: ")))))

> Many thanks,
> Graham

Chris

------=_Part_1092_8307589.1197622809030-- --===============1436424970== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --===============1436424970==--