emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Strange Custom Agenda Problem
@ 2012-05-17  3:36 Mike McLean
  2012-05-17  5:54 ` Bastien
  0 siblings, 1 reply; 12+ messages in thread
From: Mike McLean @ 2012-05-17  3:36 UTC (permalink / raw)
  To: emacs-orgmode Mode

In the past few days one of my custom agenda commands stopped working as it used to. I haven't (yet) bisected my Org-Mode configuration (*) and org-mode to find the exact cause, but was wondering if anyone had any ideas.

I have the following (amount other things) in my org-agenda-custom-commands:

(setq org-agenda-custom-commands
        '(("x" "test" tags-todo "+Outcome+LEVEL=4")))

When I custom-command select “x”, I get no results. 

If I select the default, built-in lower case “m” agenda command and type +Outcome+LEVEL=4 I get a long list of results (as expected).

Did something change recently in the agenda construction related to tags-todo?

Mike



(*) Which has not changed much

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

* Re: Strange Custom Agenda Problem
  2012-05-17  3:36 Strange Custom Agenda Problem Mike McLean
@ 2012-05-17  5:54 ` Bastien
  2012-05-17 12:56   ` Mike McLean
  2012-05-22  4:18   ` Laurynas Biveinis
  0 siblings, 2 replies; 12+ messages in thread
From: Bastien @ 2012-05-17  5:54 UTC (permalink / raw)
  To: Mike McLean; +Cc: emacs-orgmode Mode

Hi Mike,

Mike McLean <mike.mclean@pobox.com> writes:

> I have the following (amount other things) in my org-agenda-custom-commands:
>
> (setq org-agenda-custom-commands
>         '(("x" "test" tags-todo "+Outcome+LEVEL=4")))
>
> When I custom-command select “x”, I get no results. 

I tested with your `org-agenda-custom-commands' value and this

* Test
** Test1
*** Test2
**** TODO Do I see this?   :Outcome:

I correctly get :Outcome:.

This is with both the maint and master branches of the git repo.

> If I select the default, built-in lower case “m” agenda command and type
> +Outcome+LEVEL=4 I get a long list of results (as expected).

The "m" agenda command is for `tags', not `tags-todo'.

> Did something change recently in the agenda construction related to
> tags-todo?

This: http://orgmode.org/w/?p=org-mode.git;a=commit;h=c50f0c

Please help us reproduce the problem, perhaps by sharing some
of the impacted entries.

Thanks,

-- 
 Bastien

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

* Re: Strange Custom Agenda Problem
  2012-05-17  5:54 ` Bastien
@ 2012-05-17 12:56   ` Mike McLean
  2012-05-17 13:04     ` Mike McLean
  2012-05-22  4:18   ` Laurynas Biveinis
  1 sibling, 1 reply; 12+ messages in thread
From: Mike McLean @ 2012-05-17 12:56 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode Mode, Mike McLean

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

On Thursday, May 17, 2012, Bastien wrote:

> Hi Mike,
>
> Mike McLean <mike.mclean@pobox.com <javascript:;>> writes:
>
> > I have the following (amount other things) in my
> org-agenda-custom-commands:
> >
> > (setq org-agenda-custom-commands
> >         '(("x" "test" tags-todo "+Outcome+LEVEL=4")))
> >
> > When I custom-command select “x”, I get no results.
>
> I tested with your `org-agenda-custom-commands' value and this
>
> * Test
> ** Test1
> *** Test2
> **** TODO Do I see this?   :Outcome:
>
> I correctly get :Outcome:.


In my case the Outcome tag is on Test1 with =org-use-tag-inheritance= set
to =t=.


>
> This is with both the maint and master branches of the git repo.
>
> > If I select the default, built-in lower case “m” agenda command and type
> > +Outcome+LEVEL=4 I get a long list of results (as expected).
>
> The "m" agenda command is for `tags', not `tags-todo'.


Understood; to be clear I get a results using "m" that include both TODO
items and non-TODO items. My expectation from my "x" test case is to get a
subset of the results I get from "m", but not an empty list.


>
> > Did something change recently in the agenda construction related to
> > tags-todo?
>
> This: http://orgmode.org/w/?p=org-mode.git;a=commit;h=c50f0c
>
> Please help us reproduce the problem, perhaps by sharing some
> of the impacted entries.


I will, but I'm booked in meetings today so it may take a day ...



>
> Thanks,
>
> --
>  Bastien
>

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

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

* Re: Strange Custom Agenda Problem
  2012-05-17 12:56   ` Mike McLean
@ 2012-05-17 13:04     ` Mike McLean
  2012-05-17 17:25       ` Bastien
  0 siblings, 1 reply; 12+ messages in thread
From: Mike McLean @ 2012-05-17 13:04 UTC (permalink / raw)
  To: Mike McLean; +Cc: Bastien, emacs-orgmode Mode

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

On Thursday, May 17, 2012, Mike McLean wrote:

>
>
> On Thursday, May 17, 2012, Bastien wrote:
>
>> Hi Mike,
>>
>> Mike McLean <mike.mclean@pobox.com> writes:
>>
>> > I have the following (amount other things) in my
>> org-agenda-custom-commands:
>> >
>> > (setq org-agenda-custom-commands
>> >         '(("x" "test" tags-todo "+Outcome+LEVEL=4")))
>> >
>> > When I custom-command select “x”, I get no results.
>>
>> I tested with your `org-agenda-custom-commands' value and this
>>
>> * Test
>> ** Test1
>> *** Test2
>> **** TODO Do I see this?   :Outcome:
>>
>> I correctly get :Outcome:.
>
>
> In my case the Outcome tag is on Test1 with =org-use-tag-inheritance= set
> to =t=.
>
>
>>
>> This is with both the maint and master branches of the git repo.
>>
>> > If I select the default, built-in lower case “m” agenda command and type
>> > +Outcome+LEVEL=4 I get a long list of results (as expected).
>>
>> The "m" agenda command is for `tags', not `tags-todo'.
>
>
> Understood; to be clear I get a results using "m" that include both TODO
> items and non-TODO items. My expectation from my "x" test case is to get a
> subset of the results I get from "m", but not an empty list.
>
>
>>
>> > Did something change recently in the agenda construction related to
>> > tags-todo?
>>
>> This: http://orgmode.org/w/?p=org-mode.git;a=commit;h=c50f0c
>>
>> Please help us reproduce the problem, perhaps by sharing some
>> of the impacted entries.
>
>
> I will, but I'm booked in meetings today so it may take a day ...
>
>
Though in lieu of proper debugging and bug-reporting I reversed the above
referenced commit in my local copy of org and now my full, complex setup
works as expected as does the test case above with the tag moved to level 2.

>

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

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

* Re: Strange Custom Agenda Problem
  2012-05-17 13:04     ` Mike McLean
@ 2012-05-17 17:25       ` Bastien
  2012-05-21 16:06         ` Mike McLean
  0 siblings, 1 reply; 12+ messages in thread
From: Bastien @ 2012-05-17 17:25 UTC (permalink / raw)
  To: Mike McLean; +Cc: emacs-orgmode Mode

Mike McLean <mike.mclean@pobox.com> writes:

>     I will, but I'm booked in meetings today so it may take a day ...
>    
> Though in lieu of proper debugging and bug-reporting I reversed the
> above referenced commit in my local copy of org and now my full,
> complex setup works as expected as does the test case above with the
> tag moved to level 2.

I tried to replicate the problem with emacs -Q and
`org-use-tag-inheritance' set to nil and t -- no luck.

Maybe there is something weird in the format of your entries 
(the ones that do not display correctly.)

Can you send some examples?

-- 
 Bastien

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

* Re: Strange Custom Agenda Problem
  2012-05-17 17:25       ` Bastien
@ 2012-05-21 16:06         ` Mike McLean
  2012-05-23 10:17           ` Bastien
  0 siblings, 1 reply; 12+ messages in thread
From: Mike McLean @ 2012-05-21 16:06 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode Mode


[-- Attachment #1.1: Type: text/plain, Size: 3559 bytes --]

I have attached a minimal Org Mode setup that replicates this problem. The
files are minimal-org.el and test.org. The lisp file is the minimum
configuration for org-mode and the org-file is a simplified test file.

The minimal configuration assumes:

   - A working directory of ~/tmp/tags-test when it sets org-agenda-files
   - The Git Checkout of Org-Mode is located in
   ~/.emacs.d/el-get/org-mode/lisp

Additionally, the minimal configuration has the troublesome agenda command
both as one block in a Block Agenda and listed separately as its one agenda
command. (My “real” environment uses this only in a block agenda so I was
covering all bases).

In each of the two cases below I have started Emacs with:


/Applications/Emacs.app/Contents/MacOS/Emacs -Q -l ./minimal-org.el test.org

Non Working Test Case:

   - Switch to Org-Mode HEAD


   cd /Users/mike.mclean/.emacs.d/el-get/org-mode
   git --no-pager checkout master
   make clean
   make autoloads

   - Launch Emacs as Above
   - Note the two version strings from message buffer


   GNU Emacs 24.1.50.1 (x86_64-apple-darwin, NS apple-appkit-1038.36)
of 2012-05-20 on bob.porkrind.org
   Org-mode version 7.8.10 (release_7.8.10-579-g372948 @
/Users/mike.mclean/.emacs.d/el-get/org-mode/lisp/)

   - M-x org-agena followed by t
   - Org Agenda Buffer contains just the following


   Headlines with TAGS match: +Outcome+PRIORITY="A"+LEVEL=4-{.*Backlog$}
   Press `C-u r' to search again with new search string

   - M-x org-agena followed by b
   - Org Agenda Buffer contains just the following


   Headlines with TAGS match: +Outcome+PRIORITY="A"+LEVEL=4-{.*Backlog$}


Working Test Case

   - Switch to Org Mode version just prior to Commit
c50f0c<http://orgmode.org/w/?p=org-mode.git;a=commit;h=c50f0c>


   cd /Users/mike.mclean/.emacs.d/el-get/org-mode
   git co c50f0c~1
   make clean
   make autoloads

   - Launch Emacs as Above
   - Note the two version strings from message buffer


   GNU Emacs 24.1.50.1 (x86_64-apple-darwin, NS apple-appkit-1038.36)
of 2012-05-20 on bob.porkrind.org
   release_7.8.09-33-g0ebeb
   Org-mode version 7.8.09 (release_7.8.09.33.g0ebeb)

   - M-x org-agena followed by t
   - Org Agenda Buffer contains the following (note that the correct Level
   4 outline item is selected)


   Headlines with TAGS match: +Outcome+PRIORITY="A"+LEVEL=4-{.*Backlog$}
   Press `C-u r' to search again with new search string
     test:       WIP [#A] Level 4 - should be in agenda
:noexport:Outcome::

   - M-x org-agena followed by b
   - Org Agenda Buffer contains just the following


   Headlines with TAGS match: +Outcome+PRIORITY="A"+LEVEL=4-{.*Backlog$}
     test:       WIP [#A] Level 4 - should be in agenda
:noexport:Outcome::




On Thu, May 17, 2012 at 1:25 PM, Bastien <bzg@altern.org> wrote:

> Mike McLean <mike.mclean@pobox.com> writes:
>
> >     I will, but I'm booked in meetings today so it may take a day ...
> >
> > Though in lieu of proper debugging and bug-reporting I reversed the
> > above referenced commit in my local copy of org and now my full,
> > complex setup works as expected as does the test case above with the
> > tag moved to level 2.
>
> I tried to replicate the problem with emacs -Q and
> `org-use-tag-inheritance' set to nil and t -- no luck.
>
> Maybe there is something weird in the format of your entries
> (the ones that do not display correctly.)
>
> Can you send some examples?
>
> --
>  Bastien
>

[-- Attachment #1.2: Type: text/html, Size: 10802 bytes --]

[-- Attachment #2: minimal-org.el --]
[-- Type: application/octet-stream, Size: 1086 bytes --]

(add-to-list 'load-path "~/.emacs.d/el-get/org-mode/lisp")
(require 'org-install)
(call-interactively 'emacs-version)
(call-interactively 'org-version)
(setq org-agenda-files '("~/tmp/tags-test/test.org"))
(setq org-todo-keywords
      '(
	(sequence "TODO(t!)" "POSTPONED(p@/!)" "VERIFY(v@/!)" "ERRANDS(E!)" "|" "COMPLETED(c!)" "DONE(d!)") ; TODOs
	(sequence "PLANNING(n!)" "WIP(w!/!)" "INACTIVE(i!)" "BLOCKED(b!)" "|" "COMPLETED(c!)")              ; Projects
	)
      )

(setq org-agenda-custom-commands
      '(
	("b" "Test Block Agenda"
	 (
	  (tags-todo "+Outcome+PRIORITY=\"A\"+LEVEL=4-{.*Backlog$}"
		     (
		      (org-agenda-skip-function '(org-agenda-skip-entry-if 'todo '("POSTPONED" "VERIFY" "INACTIVE" "BLOCKED" "ERRANDS" "TODO" "WILL_DO"))) ;; skip Task states, projects only
		      )
		     )))
	("t" "Test Non-Block Agenda"
	 tags-todo "+Outcome+PRIORITY=\"A\"+LEVEL=4-{.*Backlog$}"
	 (
	  (org-agenda-skip-function '(org-agenda-skip-entry-if 'todo '("POSTPONED" "VERIFY" "INACTIVE" "BLOCKED" "ERRANDS" "TODO" "WILL_DO"))) ;; skip Task states, projects only
	  )
	 )))

[-- Attachment #3: test.org --]
[-- Type: application/octet-stream, Size: 293 bytes --]

* Level 1 							   :noexport:
** Level 2							    :Outcome:
*** Level 3
**** WIP [#A] Level 4 - should be in agenda
**** WIP Should not be in agenda (not priority A)
**** Should not be in agenda (Backlog Tag)		    :Project_Backlog:
**** TODO [#A] Should not be in agenda (TODO, not Project)

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

* Re: Strange Custom Agenda Problem
  2012-05-17  5:54 ` Bastien
  2012-05-17 12:56   ` Mike McLean
@ 2012-05-22  4:18   ` Laurynas Biveinis
  2012-05-23 10:17     ` Bastien
  1 sibling, 1 reply; 12+ messages in thread
From: Laurynas Biveinis @ 2012-05-22  4:18 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode Mode, Mike McLean

I am also experiencing strange issues with custom agenda commands
after I upgraded to 7.8.10 (not sure if from 7.8.09 - I might have
skipped a version or two).

In my case the negative tag selection stopped working in tags-todo. For example,
"project-somedaymaybe/!TODO"
works as if it were
"project+somedaymaybe/!TODO"

I haven't found time yet to narrow down the configuration and org
files to something resembling a bug report.

>> Did something change recently in the agenda construction related to
>> tags-todo?
>
> This: http://orgmode.org/w/?p=org-mode.git;a=commit;h=c50f0c

I will try to see if reverting this helps in my case.


-- 
Laurynas

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

* Re: Strange Custom Agenda Problem
  2012-05-21 16:06         ` Mike McLean
@ 2012-05-23 10:17           ` Bastien
  2012-05-23 11:22             ` Mike McLean
  0 siblings, 1 reply; 12+ messages in thread
From: Bastien @ 2012-05-23 10:17 UTC (permalink / raw)
  To: Mike McLean; +Cc: emacs-orgmode Mode

Hi Mike,

Mike McLean <mike.mclean@pobox.com> writes:

> I have attached a minimal Org Mode setup that replicates this
> problem. The files are minimal-org.el and test.org. The lisp file is
> the minimum configuration for org-mode and the org-file is a
> simplified test file.

Thanks a lot for this.  

I finally fixed this, please test and confirm.

-- 
 Bastien

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

* Re: Strange Custom Agenda Problem
  2012-05-22  4:18   ` Laurynas Biveinis
@ 2012-05-23 10:17     ` Bastien
  2012-05-23 15:36       ` Laurynas Biveinis
  0 siblings, 1 reply; 12+ messages in thread
From: Bastien @ 2012-05-23 10:17 UTC (permalink / raw)
  To: Laurynas Biveinis; +Cc: emacs-orgmode Mode, Mike McLean

Hi Laurynas,

Laurynas Biveinis <laurynas.biveinis@gmail.com> writes:

> I am also experiencing strange issues with custom agenda commands
> after I upgraded to 7.8.10 (not sure if from 7.8.09 - I might have
> skipped a version or two).
>
> In my case the negative tag selection stopped working in tags-todo. For example,
> "project-somedaymaybe/!TODO"
> works as if it were
> "project+somedaymaybe/!TODO"

this should be fixed now -- please have a pull and let me know.

Best,

-- 
 Bastien

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

* Re: Strange Custom Agenda Problem
  2012-05-23 10:17           ` Bastien
@ 2012-05-23 11:22             ` Mike McLean
  2012-05-23 12:32               ` Bastien
  0 siblings, 1 reply; 12+ messages in thread
From: Mike McLean @ 2012-05-23 11:22 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode Mode

On May 23, 2012, at 6:17 AM, Bastien wrote:

> Hi Mike,
> 
> Mike McLean <mike.mclean@pobox.com> writes:
> 
>> I have attached a minimal Org Mode setup that replicates this
>> problem. The files are minimal-org.el and test.org. The lisp file is
>> the minimum configuration for org-mode and the org-file is a
>> simplified test file.
> 
> Thanks a lot for this.  
> 
> I finally fixed this, please test and confirm.

I can confirm that this fixes my full block agenda where I first noticed the problem.

Org-mode version 7.8.10 (release_7.8.10-587-g31aa82 @ /Users/mlm/.emacs.d/el-get/org-mode/lisp/)
(without my branch to revert  [[http://orgmode.org/w/?p%3Dorg-mode.git%3Ba%3Dcommit%3Bh%3Dc50f0c][Commit c50f0c]])

Thanks for the fix.

I really need to start leaning the Org-Mode code base, especially seeing how simple this fix was.

Mike

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

* Re: Strange Custom Agenda Problem
  2012-05-23 11:22             ` Mike McLean
@ 2012-05-23 12:32               ` Bastien
  0 siblings, 0 replies; 12+ messages in thread
From: Bastien @ 2012-05-23 12:32 UTC (permalink / raw)
  To: Mike McLean; +Cc: emacs-orgmode Mode

Mike McLean <mike.mclean@pobox.com> writes:

> Thanks for the fix.

You're welcome.

> I really need to start leaning the Org-Mode code base, especially
> seeing how simple this fix was.

The fix was easy but finding the problem was not, because I assumed 
the existing regexp (prior to commit c50f0c) was okay while it was
not.  Those kind of things are too easily overlooked!

Glad I found it, and surprised it didn't yield other problems so far.

-- 
 Bastien

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

* Re: Strange Custom Agenda Problem
  2012-05-23 10:17     ` Bastien
@ 2012-05-23 15:36       ` Laurynas Biveinis
  0 siblings, 0 replies; 12+ messages in thread
From: Laurynas Biveinis @ 2012-05-23 15:36 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode Mode, Mike McLean

2012/5/23 Bastien <bzg@gnu.org>:
>> In my case the negative tag selection stopped working in tags-todo. For example,
>> "project-somedaymaybe/!TODO"
>> works as if it were
>> "project+somedaymaybe/!TODO"
>
> this should be fixed now -- please have a pull and let me know.

I did and can confirm the fix. Thanks!

-- 
Laurynas

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

end of thread, other threads:[~2012-05-23 15:36 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-17  3:36 Strange Custom Agenda Problem Mike McLean
2012-05-17  5:54 ` Bastien
2012-05-17 12:56   ` Mike McLean
2012-05-17 13:04     ` Mike McLean
2012-05-17 17:25       ` Bastien
2012-05-21 16:06         ` Mike McLean
2012-05-23 10:17           ` Bastien
2012-05-23 11:22             ` Mike McLean
2012-05-23 12:32               ` Bastien
2012-05-22  4:18   ` Laurynas Biveinis
2012-05-23 10:17     ` Bastien
2012-05-23 15:36       ` Laurynas Biveinis

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