emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Daniel Clemente <n142857@gmail.com>
To: Carsten Dominik <dominik@science.uva.nl>
Cc: emacs-orgmode@gnu.org
Subject: Re: org-agenda-filter-by-tag doesn't work with custom effort property
Date: Wed, 25 Feb 2009 18:32:29 +0100	[thread overview]
Message-ID: <87myca4e36.fsf@CPU107.opentrends.net> (raw)
In-Reply-To: <CF9A0095-2981-4EE0-8EE1-5B226098580C@uva.nl> (Carsten Dominik's message of "Wed, 25 Feb 2009 13:51:21 +0100")

El dc, feb 25 2009, Carsten Dominik va escriure:
> On Feb 24, 2009, at 3:52 PM, Daniel Clemente wrote:
>
>>
>>  Hi, I would like to contribute 1 byte to org-mode; it's an "a":
>>
>>
>> --- a/lisp/org-agenda.el
>> +++ b/lisp/org-agenda.el
>> @@ -4407,7 +4407,7 @@ to switch to narrowing."
>> 		    (lambda (x) (if (cdr x) (char-to-string (cdr x)) ""))
>> 		    alist ""))
>> 	(efforts (org-split-string
>> -		  (or (cdr (assoc (concat org-effort-property "_ALL")
>> +		  (or (cadr (assoc (concat org-effort-property "_ALL")
>> 				  org-global-properties))
>> 		      "0 0:10 0:30 1:00 2:00 3:00 4:00 5:00 6:00 7:00 8:00"
>
> I don't think this is correct.
>
> What are the symptoms of the problem you encounter?

  Before describing the problem: the (or ) was taking either the (cdr ) or "0 0:10…". But cdr always return a list (not a string), so if the cdr is used, the result will be a list, and this is wrong because it org-split-string expects a string, not a list.

  The problem can be reproduced with:
1. C-c a
2. a
3. /

  I get:
Debugger entered--Lisp error: (wrong-type-argument stringp ("0 0:10 0:30 1:00 2:00 3:00 4:00 5:00 6:00 12:00 18:00 24:00 30:00"))
  string-match("[ \f	\n…]+" ("0 0:10 0:30 1:00 2:00 3:00 4:00 5:00 6:00 12:00 18:00 24:00 30:00") 0)
  org-split-string(("0 0:10 0:30 1:00 2:00 3:00 4:00 5:00 6:00 12:00 18:00 24:00 30:00"))
  org-agenda-filter-by-tag(nil)
  call-interactively(org-agenda-filter-by-tag nil nil)



  I'm using:
(add-to-list 'org-global-properties '("Effort_ALL" "0 0:10 0:30 1:00 2:00 3:00 4:00 5:00 6:00 12:00 18:00 24:00 30:00"))

  org-mode 6.21b (from Emacs from Bazaar of 24-2-2009)


-- Daniel

  reply	other threads:[~2009-02-25 17:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-24 14:52 org-agenda-filter-by-tag doesn't work with custom effort property Daniel Clemente
2009-02-24 15:11 ` Daniel Clemente
2009-02-25 12:51 ` Carsten Dominik
2009-02-25 17:32   ` Daniel Clemente [this message]
2009-02-25 18:26     ` Carsten Dominik
2009-02-26 12:03       ` Daniel Clemente

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=87myca4e36.fsf@CPU107.opentrends.net \
    --to=n142857@gmail.com \
    --cc=dominik@science.uva.nl \
    --cc=emacs-orgmode@gnu.org \
    /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).