emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Sticky agenda branch merged
@ 2012-04-16  9:47 Max Mikhanosha
  2012-04-16 17:44 ` Tassilo Horn
  2012-04-17 10:09 ` Rainer Stengele
  0 siblings, 2 replies; 17+ messages in thread
From: Max Mikhanosha @ 2012-04-16  9:47 UTC (permalink / raw)
  To: emacs-orgmode

I had just pushed a merge of max-sticky-agenda branch to master, let
me know if there are any problems, also feel free to hack/iterate on
it, if you have question as to why something was done, I'll do my best
to answer.

In particular I just seen a new commit introducing filter on
categories, and org-agenda-filtered-by-top-category probably needs to
be included into local variable list to have it work per agenda
buffer.

Also the individual calls to org-todo-list and such, do not work right
with sticky agenda as there is nothing to catch the 'exit tag, that is
thrown by `org-prepare-agenda' when it finds cached buffer. I'm not
sure there is more elegant way of fixing it, other then wrapping all
the individual scanner pieces with (catch) blocks, that re-throw if
they had detected that they been called from (org-agenda) command

Regards,
  Max

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

* Re: Sticky agenda branch merged
  2012-04-16  9:47 Sticky agenda branch merged Max Mikhanosha
@ 2012-04-16 17:44 ` Tassilo Horn
  2012-04-16 18:27   ` Charles Philip Chan
  2012-04-16 22:59   ` Max Mikhanosha
  2012-04-17 10:09 ` Rainer Stengele
  1 sibling, 2 replies; 17+ messages in thread
From: Tassilo Horn @ 2012-04-16 17:44 UTC (permalink / raw)
  To: emacs-orgmode

Max Mikhanosha <max@openchat.com> writes:

Hi Max,

> I had just pushed a merge of max-sticky-agenda branch to master, let
> me know if there are any problems,...

since the merge, I get an error on emacs startup.  The error is caused
by invoking `org-agenda-to-appt' on emacs startup.

Here's a backtrace:

--8<---------------cut here---------------start------------->8---
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  org-agenda-new-marker(9228)
  byte-code("\306 ... VBV)\311\207" [s txt pos save-match-data-internal todo-state org-agenda-repeating-timestamp-show-all org-agenda-skip match-string 1 nil match-data ((byte-code "\301\302\"\207" [save-match-data-internal set-match-data evaporate] 3)) org-get-todo-state t org-time-string-to-absolute past 0 abs functionp org-is-habit-p org-get-category get-text-property org-category-position re-search-backward "^\\*+[ 	]+" throw :skip assoc org-get-tags-at buffer-substring-no-properties "^\n" string-match " \\([012]?[0-9]:[0-9][0-9]\\)" " " time org-agenda-format-item format org-scheduled-previously org-scheduled-today org-scheduled org-habit-parse-todo org-add-props undone-face face org-agenda-done org-marker org-agenda-new-marker org-hd-marker type "past-scheduled" ...] 26)
  org-agenda-get-scheduled(nil)
  org-agenda-get-day-entries("/home/horn/Repos/org/remember.org" (4 16 2012) :deadline :scheduled :timestamp)
  apply(org-agenda-get-day-entries "/home/horn/Repos/org/remember.org" (4 16 2012) (:deadline :scheduled :timestamp))
  org-agenda-to-appt(t)
  th-org-agenda-to-appt()
  eval-buffer(#<buffer  *load*> nil "/home/horn/.emacs" nil t)  ; Reading at buffer position 50862
  load-with-code-conversion("/home/horn/.emacs" "/home/horn/.emacs" t t)
  load("~/.emacs" t t)
  #[0 "\205 ... \211#)\262\207" [init-file-user system-type delayed-warnings-list user-init-file inhibit-default-init inhibit-startup-screen ms-dos "~" "/_emacs" windows-nt "/.emacs" directory-files nil "^\\.emacs\\(\\.elc?\\)?$" "~/.emacs" "^_emacs\\(\\.elc?\\)?$" (initialization "`_emacs' init file is deprecated, please use `.emacs'") "~/_emacs" t load expand-file-name "init" file-name-as-directory "/.emacs.d" file-name-extension "elc" file-name-sans-extension ".el" file-exists-p file-newer-than-file-p message "Warning: %s is newer than %s" sit-for 1 "default"] 7 "\n\n(fn)"]()
  command-line()
  normal-top-level()
--8<---------------cut here---------------end--------------->8---

Please let me know if you need any further details.

Bye,
Tassilo

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

* Re: Sticky agenda branch merged
  2012-04-16 17:44 ` Tassilo Horn
@ 2012-04-16 18:27   ` Charles Philip Chan
  2012-04-16 22:59   ` Max Mikhanosha
  1 sibling, 0 replies; 17+ messages in thread
From: Charles Philip Chan @ 2012-04-16 18:27 UTC (permalink / raw)
  To: Org-mode

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

Tassilo Horn <tassilo@member.fsf.org> writes:

> since the merge, I get an error on emacs startup.  The error is caused
> by invoking `org-agenda-to-appt' on emacs startup.

You beat me to it. I am seeing the same thing.

Also, I am able to run the function manually if there is an Agenda
buffer. Without an Agenda buffer being up, I get:

,----[ Backtrace ]
| Debugger entered--Lisp error: (error "Selecting deleted buffer")
|   org-agenda-new-marker(2614)
|   byte-code("\306 \210\307\310!\311\310\224S\312 \313\216\314 *\r\315=\206\x1f\f\235<\316\307\310!=\317<p\n&\211>=Z?@\205?\x0e?\320WA?\320W\203\\\321?!BW\203\\\x0e@\203\\\x0eC\203c\x0e?\320U\203\312\212\fD\235\211E\203\212\x0eF\204\205\x0e?\320U\203\205\322\323!\203\212\323 \203\212\311\202C\322\323!\205\222\323 G\324 H\325`\326\"I\327\330\311\315#\204\254\x0eJ\202C\320\225b\210\320\224KG\203\320\x0eL\203\310\x0e@\204\362\x0eM\203\362\331\332\311\"\210\202\362\x0eN\315=\204\341\x0eN\203\362\x0eA\203\362\333KO\"\211P\203\362\331\332\311\"\210\334 Q\335`\336\311w\210`\"R\337\340\b\"\203\x01\b\310\224\311O\341PS\202\x01\342S\343?\320U\203$\x0eT@\202.\344TA@\310?Z\"RHQ?\320U\205=\x0eS\311G&\a	\203\311\x0eG\204U\x0eA\203U\345\202_\x0e@\203^\346\202_\347+G\205h\350 G\351	U\352+\353E\203{\354\202}\x0e+\355\356\n!\357\356K!\360A\203\220\361\202\221\362\363A\203\234\x0e>\202\236\x0e3\364G\203\253\365G!\202\265\366\367\370?Z\371	!#\372H\326I\373G\304\f&\210	VBV)\311\207" [s txt pos save-match-data-internal todo-state org-agenda-repeating-timestamp-show-all org-agenda-skip match-string 1 nil match-data ((byte-code "\301\b\302\"\207" [save-match-data-internal set-match-data evaporate] 3)) org-get-todo-state t org-time-string-to-absolute past 0 abs functionp org-is-habit-p org-get-category get-text-property org-category-position re-search-backward "^\\*+[ 	]+" throw :skip assoc org-get-tags-at buffer-substring-no-properties "^\n" string-match " \\([012]?[0-9]:[0-9][0-9]\\)" " " time org-agenda-format-item format org-scheduled-previously org-scheduled-today org-scheduled org-habit-parse-todo org-add-props undone-face face org-agenda-done org-marker org-agenda-new-marker org-hd-marker type "past-scheduled" ...] 26)
|   org-agenda-get-scheduled(nil)
|   org-agenda-get-day-entries("~/Desktop/Projects/plans/AreasofFocus.org" (4 16 2012) :deadline :scheduled :timestamp)
|   apply(org-agenda-get-day-entries "~/Desktop/Projects/plans/AreasofFocus.org" (4 16 2012) (:deadline :scheduled :timestamp))
|   org-agenda-to-appt(nil)
|   call-interactively(org-agenda-to-appt t nil)
|   execute-extended-command(nil)
|   call-interactively(execute-extended-command nil nil)
`----

Charles

-- 
"Nature abhors a Vacuum"

  -- Brian Behlendorf on OSS (Open Sources, 1999 O'Reilly and Associates)

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

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

* Re: Sticky agenda branch merged
  2012-04-16 17:44 ` Tassilo Horn
  2012-04-16 18:27   ` Charles Philip Chan
@ 2012-04-16 22:59   ` Max Mikhanosha
  2012-04-16 23:23     ` Charles Philip Chan
  2012-04-17  6:14     ` Tassilo Horn
  1 sibling, 2 replies; 17+ messages in thread
From: Max Mikhanosha @ 2012-04-16 22:59 UTC (permalink / raw)
  To: Tassilo Horn; +Cc: emacs-orgmode

At Mon, 16 Apr 2012 19:44:54 +0200,
Tassilo Horn wrote:
> 
> > I had just pushed a merge of max-sticky-agenda branch to master, let
> > me know if there are any problems,...
> 
> since the merge, I get an error on emacs startup.  The error is caused
> by invoking `org-agenda-to-appt' on emacs startup.
> 
> Here's a backtrace:
> 
> --8<---------------cut here---------------start------------->8---
> Debugger entered--Lisp error: (wrong-type-argument stringp nil)
>   org-agenda-new-marker(9228)
>   byte-code("\306 ... VBV)\311\207" [s txt pos save-match-data-internal todo-state org-agenda-repeating-timestamp-show-all org-agenda-skip match-string 1 nil match-data ((byte-code "\301\302\"\207" [save-match-data-internal set-match-data evaporate] 3)) org-get-todo-state t org-time-string-to-absolute past 0 abs functionp org-is-habit-p org-get-category get-text-property org-category-position re-search-backward "^\\*+[ 	]+" throw :skip assoc org-get-tags-at buffer-substring-no-properties "^\n" string-match " \\([012]?[0-9]:[0-9][0-9]\\)" " " time org-agenda-format-item format org-scheduled-previously org-scheduled-today org-scheduled org-habit-parse-todo org-add-props undone-face face org-agenda-done org-marker org-agenda-new-marker org-hd-marker type "past-scheduled" ...] 26)
>   org-agenda-get-scheduled(nil)

I had pushed a fix, which should fix `org-agenda-to-appt'

Regards,
  Max

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

* Re: Sticky agenda branch merged
  2012-04-16 22:59   ` Max Mikhanosha
@ 2012-04-16 23:23     ` Charles Philip Chan
  2012-04-17  6:14     ` Tassilo Horn
  1 sibling, 0 replies; 17+ messages in thread
From: Charles Philip Chan @ 2012-04-16 23:23 UTC (permalink / raw)
  To: Org-mode

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

Max Mikhanosha <max@openchat.com> writes:

> I had pushed a fix, which should fix `org-agenda-to-appt'

Thanks, it worked.

Charles

-- 
"The world is beating a path to our door"

  -- Bruce Perens, (Open Sources, 1999 O'Reilly and Associates)

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

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

* Re: Sticky agenda branch merged
  2012-04-16 22:59   ` Max Mikhanosha
  2012-04-16 23:23     ` Charles Philip Chan
@ 2012-04-17  6:14     ` Tassilo Horn
  1 sibling, 0 replies; 17+ messages in thread
From: Tassilo Horn @ 2012-04-17  6:14 UTC (permalink / raw)
  To: emacs-orgmode

Max Mikhanosha <max@openchat.com> writes:

Hi Max,

> I had pushed a fix, which should fix `org-agenda-to-appt'

Yes, it seems to work again.

Thanks a lot,
Tassilo

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

* Re: Sticky agenda branch merged
  2012-04-16  9:47 Sticky agenda branch merged Max Mikhanosha
  2012-04-16 17:44 ` Tassilo Horn
@ 2012-04-17 10:09 ` Rainer Stengele
  2012-04-17 12:29   ` Max Mikhanosha
  2012-04-17 19:02   ` Rainer Stengele
  1 sibling, 2 replies; 17+ messages in thread
From: Rainer Stengele @ 2012-04-17 10:09 UTC (permalink / raw)
  To: Max Mikhanosha; +Cc: emacs-orgmode

Am 16.04.2012 11:47, schrieb Max Mikhanosha:
> I had just pushed a merge of max-sticky-agenda branch to master, let
> me know if there are any problems, also feel free to hack/iterate on
> it, if you have question as to why something was done, I'll do my best
> to answer.
> 
> In particular I just seen a new commit introducing filter on
> categories, and org-agenda-filtered-by-top-category probably needs to
> be included into local variable list to have it work per agenda
> buffer.
> 
> Also the individual calls to org-todo-list and such, do not work right
> with sticky agenda as there is nothing to catch the 'exit tag, that is
> thrown by `org-prepare-agenda' when it finds cached buffer. I'm not
> sure there is more elegant way of fixing it, other then wrapping all
> the individual scanner pieces with (catch) blocks, that re-throw if
> they had detected that they been called from (org-agenda) command
> 
> Regards,
>   Max
> 
> 
Hi,

I see a strange behaviour when clocking in with C-c C-x C-i.
Sometimes (!) there is no new CLOCK: entry created.
The TODO state changes as expected, but no new CLOCK: line is created, even when clocking out.
Looks like this happens when the initial TODO state is set.

Maybe I missed a change in the behaviour?

Regards,
Rainer

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

* Re: Sticky agenda branch merged
  2012-04-17 10:09 ` Rainer Stengele
@ 2012-04-17 12:29   ` Max Mikhanosha
  2012-04-17 13:23     ` Rainer Stengele
  2012-04-17 19:02   ` Rainer Stengele
  1 sibling, 1 reply; 17+ messages in thread
From: Max Mikhanosha @ 2012-04-17 12:29 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: Rainer Stengele

At Tue, 17 Apr 2012 12:09:40 +0200,
Rainer Stengele wrote:
> 
> Am 16.04.2012 11:47, schrieb Max Mikhanosha:
> > I had just pushed a merge of max-sticky-agenda branch to master, let
> > me know if there are any problems, also feel free to hack/iterate on
> 
> I see a strange behaviour when clocking in with C-c C-x C-i.
> Sometimes (!) there is no new CLOCK: entry created.
> The TODO state changes as expected, but no new CLOCK: line is created, even when clocking out.
> Looks like this happens when the initial TODO state is set.
> 
> Maybe I missed a change in the behaviour?

Rainer, I can't reproduce this, can you give me a few more details?

1. Are you doing C-c C-x C-i from agenda, or from an Org File?

2. I don't understand the "TODO state changes as expected" part, I
thought clock-in command has no effect on todo state, ie it simply
adds CLOCK line to logbook drawer. Is there some extra configuration I
need to change to enable this bit?

3. Are sticky agendas enabled?

4. If its from agenda, and its sticky, is it freshly generated, or was
   it refreshed with "g" or "r" key?

5. If its from sticky agenda, can you reproduce it without enabling sticky agendas?

Regards,
  Max

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

* Re: Sticky agenda branch merged
  2012-04-17 12:29   ` Max Mikhanosha
@ 2012-04-17 13:23     ` Rainer Stengele
  2012-04-17 15:32       ` Max Mikhanosha
  0 siblings, 1 reply; 17+ messages in thread
From: Rainer Stengele @ 2012-04-17 13:23 UTC (permalink / raw)
  To: emacs-orgmode

Hi Max,

see below

Am 17.04.2012 14:29, schrieb Max Mikhanosha:
> At Tue, 17 Apr 2012 12:09:40 +0200,
> Rainer Stengele wrote:
>> Am 16.04.2012 11:47, schrieb Max Mikhanosha:
>>> I had just pushed a merge of max-sticky-agenda branch to master, let
>>> me know if there are any problems, also feel free to hack/iterate on
>> I see a strange behaviour when clocking in with C-c C-x C-i.
>> Sometimes (!) there is no new CLOCK: entry created.
>> The TODO state changes as expected, but no new CLOCK: line is created, even when clocking out.
>> Looks like this happens when the initial TODO state is set.
>>
>> Maybe I missed a change in the behaviour?
> Rainer, I can't reproduce this, can you give me a few more details?
>
> 1. Are you doing C-c C-x C-i from agenda, or from an Org File?

from org file

>
> 2. I don't understand the "TODO state changes as expected" part, I
> thought clock-in command has no effect on todo state, ie it simply
> adds CLOCK line to logbook drawer. Is there some extra configuration I
> need to change to enable this bit?

I have set "org-clock-in-switch-to-state" to "INARBEIT" state in my state sequence

#+SEQ_TODO: TODO INARBEIT WARTEN | MOVED DONE CANCELED DELEGATED

As soon as I am in state "INARBEIT" and doing a clockin, the CLOCK: line appears.
>
> 3. Are sticky agendas enabled?

YES!
>
> 4. If its from agenda, and its sticky, is it freshly generated, or was
>    it refreshed with "g" or "r" key?
it is not from agenda
>
> 5. If its from sticky agenda, can you reproduce it without enabling sticky agendas?
Let me see: no, problem occurs with or without sticky agendas
>
> Regards,
>   Max

Thanks for checking!

Regards,
Rainer

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

* Re: Sticky agenda branch merged
  2012-04-17 13:23     ` Rainer Stengele
@ 2012-04-17 15:32       ` Max Mikhanosha
  2012-04-17 15:58         ` Rainer Stengele
  2012-04-17 17:41         ` Sticky agenda branch merged Rainer Stengele
  0 siblings, 2 replies; 17+ messages in thread
From: Max Mikhanosha @ 2012-04-17 15:32 UTC (permalink / raw)
  To: Rainer Stengele; +Cc: emacs-orgmode

Hi Rainer, 

At Tue, 17 Apr 2012 15:23:00 +0200,
Rainer Stengele wrote:
> 
> Am 17.04.2012 14:29, schrieb Max Mikhanosha:
> > At Tue, 17 Apr 2012 12:09:40 +0200,
> > Rainer Stengele wrote:
> >> Am 16.04.2012 11:47, schrieb Max Mikhanosha:
> >>> I had just pushed a merge of max-sticky-agenda branch to master, let
> >>> me know if there are any problems, also feel free to hack/iterate on
> >> I see a strange behaviour when clocking in with C-c C-x C-i.
> >> Sometimes (!) there is no new CLOCK: entry created.
> >> The TODO state changes as expected, but no new CLOCK: line is created, even when clocking out.
> >> Looks like this happens when the initial TODO state is set.
> >>
> >> Maybe I missed a change in the behaviour?
> > Rainer, I can't reproduce this, can you give me a few more details?
> >
> > 1. Are you doing C-c C-x C-i from agenda, or from an Org File?
> 
> from org file
> 
> >
> > 2. I don't understand the "TODO state changes as expected" part, I
> > thought clock-in command has no effect on todo state, ie it simply
> > adds CLOCK line to logbook drawer. Is there some extra configuration I
> > need to change to enable this bit?
> 
> I have set "org-clock-in-switch-to-state" to "INARBEIT" state in my state sequence
> 
> #+SEQ_TODO: TODO INARBEIT WARTEN | MOVED DONE CANCELED DELEGATED
> 
> As soon as I am in state "INARBEIT" and doing a clockin, the CLOCK: line appears.
> >
> > 3. Are sticky agendas enabled?
> 
> YES!
> >
> > 4. If its from agenda, and its sticky, is it freshly generated, or was
> >    it refreshed with "g" or "r" key?
> it is not from agenda
> >
> > 5. If its from sticky agenda, can you reproduce it without enabling sticky agendas?
> Let me see: no, problem occurs with or without sticky agendas
> >

So far this looks to me as its unrelated to sticky changes, could you
by any chance try commit 3bd1c2e9bff539c94f92f1ec919f8f0f1640f8c0
which is 1 before sticky merge , and see if same scenario is broken
there?

The git commands to do it (ignore if your git-fu is strong)

git checkout 3bd1c2e9bff539c94f92f1ec919f8f0f1640f8c0
.. test ..
git checkout master
.. back to normal ..

Regards,
 Max

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

* Re: Sticky agenda branch merged
  2012-04-17 15:32       ` Max Mikhanosha
@ 2012-04-17 15:58         ` Rainer Stengele
  2012-04-17 16:28           ` BUG: Agenda clock related "v" for multi-block agendas Max Mikhanosha
  2012-04-17 17:41         ` Sticky agenda branch merged Rainer Stengele
  1 sibling, 1 reply; 17+ messages in thread
From: Rainer Stengele @ 2012-04-17 15:58 UTC (permalink / raw)
  To: emacs-orgmode

Hi Max,

I'll try later.

What I just found:

being in a sticky agenda and trying "v r" I get this error which was not there before the merge:
org-agenda-check-type: Not allowed in nil-type agenda buffers.
Actually "v c" directly before entering "v r" gave results!

Thanks,
Rainer

Am 17.04.2012 17:32, schrieb Max Mikhanosha:
> Hi Rainer, 
> 
> At Tue, 17 Apr 2012 15:23:00 +0200,
> Rainer Stengele wrote:
>>
>> Am 17.04.2012 14:29, schrieb Max Mikhanosha:
>>> At Tue, 17 Apr 2012 12:09:40 +0200,
>>> Rainer Stengele wrote:
>>>> Am 16.04.2012 11:47, schrieb Max Mikhanosha:
>>>>> I had just pushed a merge of max-sticky-agenda branch to master, let
>>>>> me know if there are any problems, also feel free to hack/iterate on
>>>> I see a strange behaviour when clocking in with C-c C-x C-i.
>>>> Sometimes (!) there is no new CLOCK: entry created.
>>>> The TODO state changes as expected, but no new CLOCK: line is created, even when clocking out.
>>>> Looks like this happens when the initial TODO state is set.
>>>>
>>>> Maybe I missed a change in the behaviour?
>>> Rainer, I can't reproduce this, can you give me a few more details?
>>>
>>> 1. Are you doing C-c C-x C-i from agenda, or from an Org File?
>>
>> from org file
>>
>>>
>>> 2. I don't understand the "TODO state changes as expected" part, I
>>> thought clock-in command has no effect on todo state, ie it simply
>>> adds CLOCK line to logbook drawer. Is there some extra configuration I
>>> need to change to enable this bit?
>>
>> I have set "org-clock-in-switch-to-state" to "INARBEIT" state in my state sequence
>>
>> #+SEQ_TODO: TODO INARBEIT WARTEN | MOVED DONE CANCELED DELEGATED
>>
>> As soon as I am in state "INARBEIT" and doing a clockin, the CLOCK: line appears.
>>>
>>> 3. Are sticky agendas enabled?
>>
>> YES!
>>>
>>> 4. If its from agenda, and its sticky, is it freshly generated, or was
>>>    it refreshed with "g" or "r" key?
>> it is not from agenda
>>>
>>> 5. If its from sticky agenda, can you reproduce it without enabling sticky agendas?
>> Let me see: no, problem occurs with or without sticky agendas
>>>
> 
> So far this looks to me as its unrelated to sticky changes, could you
> by any chance try commit 3bd1c2e9bff539c94f92f1ec919f8f0f1640f8c0
> which is 1 before sticky merge , and see if same scenario is broken
> there?
> 
> The git commands to do it (ignore if your git-fu is strong)
> 
> git checkout 3bd1c2e9bff539c94f92f1ec919f8f0f1640f8c0
> ... test ..
> git checkout master
> ... back to normal ..
> 
> Regards,
>  Max
> 
> 
> 

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

* BUG: Agenda clock related "v" for multi-block agendas
  2012-04-17 15:58         ` Rainer Stengele
@ 2012-04-17 16:28           ` Max Mikhanosha
  0 siblings, 0 replies; 17+ messages in thread
From: Max Mikhanosha @ 2012-04-17 16:28 UTC (permalink / raw)
  To: Rainer Stengele; +Cc: emacs-orgmode

At Tue, 17 Apr 2012 17:58:27 +0200,
Rainer Stengele wrote:

> What I just found:
> 
> being in a sticky agenda and trying "v r" I get this error which was not there before the merge:
> org-agenda-check-type: Not allowed in nil-type agenda buffers.
> Actually "v c" directly before entering "v r" gave results!

Investigating this showed it's not related to sticky agendas, but
uncovered the following bug. Clock related sub-functions of the "v"
key, have a check that they could only be done in the time related
agenda buffers, as opposite to the ones generated by C-c a t

For multi-block agendas, that include a an "agenda" block followed by
several "todo" blocks, you can only invoke "v c" or "v r" when point
is in the daily agenda block area, instead of tags or todo block area.

Interestingly enough the block separator line (the ============) has
agenda type text property of nil, so you only get the "type nil"
message when you do "v r" or "v c" with point on the separator line.

Regards,
  Max

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

* Re: Sticky agenda branch merged
  2012-04-17 15:32       ` Max Mikhanosha
  2012-04-17 15:58         ` Rainer Stengele
@ 2012-04-17 17:41         ` Rainer Stengele
  1 sibling, 0 replies; 17+ messages in thread
From: Rainer Stengele @ 2012-04-17 17:41 UTC (permalink / raw)
  To: emacs-orgmode

Am 17.04.2012 17:32, schrieb Max Mikhanosha:
> Hi Rainer,
>
> At Tue, 17 Apr 2012 15:23:00 +0200,
> Rainer Stengele wrote:
>>
>> Am 17.04.2012 14:29, schrieb Max Mikhanosha:
>>> At Tue, 17 Apr 2012 12:09:40 +0200,
>>> Rainer Stengele wrote:
>>>> Am 16.04.2012 11:47, schrieb Max Mikhanosha:
>>>>> I had just pushed a merge of max-sticky-agenda branch to master, let
>>>>> me know if there are any problems, also feel free to hack/iterate on
>>>> I see a strange behaviour when clocking in with C-c C-x C-i.
>>>> Sometimes (!) there is no new CLOCK: entry created.
>>>> The TODO state changes as expected, but no new CLOCK: line is created, even when clocking out.
>>>> Looks like this happens when the initial TODO state is set.
>>>>
>>>> Maybe I missed a change in the behaviour?
>>> Rainer, I can't reproduce this, can you give me a few more details?
>>>
>>> 1. Are you doing C-c C-x C-i from agenda, or from an Org File?
>>
>> from org file
>>
>>>
>>> 2. I don't understand the "TODO state changes as expected" part, I
>>> thought clock-in command has no effect on todo state, ie it simply
>>> adds CLOCK line to logbook drawer. Is there some extra configuration I
>>> need to change to enable this bit?
>>
>> I have set "org-clock-in-switch-to-state" to "INARBEIT" state in my state sequence
>>
>> #+SEQ_TODO: TODO INARBEIT WARTEN | MOVED DONE CANCELED DELEGATED
>>
>> As soon as I am in state "INARBEIT" and doing a clockin, the CLOCK: line appears.
>>>
>>> 3. Are sticky agendas enabled?
>>
>> YES!
>>>
>>> 4. If its from agenda, and its sticky, is it freshly generated, or was
>>>     it refreshed with "g" or "r" key?
>> it is not from agenda
>>>
>>> 5. If its from sticky agenda, can you reproduce it without enabling sticky agendas?
>> Let me see: no, problem occurs with or without sticky agendas
>>>
>
> So far this looks to me as its unrelated to sticky changes, could you
> by any chance try commit 3bd1c2e9bff539c94f92f1ec919f8f0f1640f8c0
> which is 1 before sticky merge , and see if same scenario is broken
> there?
>
> The git commands to do it (ignore if your git-fu is strong)
>
> git checkout 3bd1c2e9bff539c94f92f1ec919f8f0f1640f8c0
> .. test ..
> git checkout master
> .. back to normal ..
>
> Regards,
>   Max
>
>
>

Hi Max,

I just tested. The missing CLOCK: entry is unrelated to your merge. It also appears in
3bd1c2e9bff539c94f92f1ec919f8f0f1640f8c0
So this must be related to another change.
Can anyone confirm?

Sorry and thanks you for the work on the sticky agendas!

Regards,
Rainer

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

* Re: Sticky agenda branch merged
  2012-04-17 10:09 ` Rainer Stengele
  2012-04-17 12:29   ` Max Mikhanosha
@ 2012-04-17 19:02   ` Rainer Stengele
  2012-04-17 19:35     ` Nick Dokos
  2012-04-17 22:33     ` Bernt Hansen
  1 sibling, 2 replies; 17+ messages in thread
From: Rainer Stengele @ 2012-04-17 19:02 UTC (permalink / raw)
  Cc: bernt, emacs-orgmode

Am 17.04.2012 12:09, schrieb Rainer Stengele:
> Am 16.04.2012 11:47, schrieb Max Mikhanosha:
>> I had just pushed a merge of max-sticky-agenda branch to master, let
>> me know if there are any problems, also feel free to hack/iterate on
>> it, if you have question as to why something was done, I'll do my best
>> to answer.
>>
>> In particular I just seen a new commit introducing filter on
>> categories, and org-agenda-filtered-by-top-category probably needs to
>> be included into local variable list to have it work per agenda
>> buffer.
>>
>> Also the individual calls to org-todo-list and such, do not work right
>> with sticky agenda as there is nothing to catch the 'exit tag, that is
>> thrown by `org-prepare-agenda' when it finds cached buffer. I'm not
>> sure there is more elegant way of fixing it, other then wrapping all
>> the individual scanner pieces with (catch) blocks, that re-throw if
>> they had detected that they been called from (org-agenda) command
>>
>> Regards,
>>    Max
>>
>>
> Hi,
>
> I see a strange behaviour when clocking in with C-c C-x C-i.
> Sometimes (!) there is no new CLOCK: entry created.
> The TODO state changes as expected, but no new CLOCK: line is created, even when clocking out.
> Looks like this happens when the initial TODO state is set.
>
> Maybe I missed a change in the behaviour?
>
> Regards,
> Rainer
>
>
Hi Max,

I found the culprit:


(defun bh/mark-parent-tasks-started ()
   "Visit each parent task and change TODO states to STARTED"
   (unless bh/mark-parent-tasks-started
     (when (equal state "INARBEIT")
       (let ((bh/mark-parent-tasks-started t))
         (save-excursion
           (while (org-up-heading-safe)
             (when (member (nth 2 (org-heading-components)) (list "TODO" "INARBEIT" "WARTEN"))
               (org-todo "INARBEIT"))))))))

(add-hook 'org-after-todo-state-change-hook 'bh/mark-parent-tasks-started 'append)


something seems to have changed conecerning the "state" variable. The function fails and stops the clockin process.
Deactivating the hook brings back the right behaviour.
Sorry for that.

Bernt, that function of yours does seem to have stopped working?

Thanks and regards,
Rainer

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

* Re: Sticky agenda branch merged
  2012-04-17 19:02   ` Rainer Stengele
@ 2012-04-17 19:35     ` Nick Dokos
  2012-04-17 20:06       ` Rainer Stengele
  2012-04-17 22:33     ` Bernt Hansen
  1 sibling, 1 reply; 17+ messages in thread
From: Nick Dokos @ 2012-04-17 19:35 UTC (permalink / raw)
  To: Rainer Stengele; +Cc: bernt, emacs-orgmode

Rainer Stengele <rainer.stengele@online.de> wrote:

> Am 17.04.2012 12:09, schrieb Rainer Stengele:
> > Am 16.04.2012 11:47, schrieb Max Mikhanosha:
> >> I had just pushed a merge of max-sticky-agenda branch to master, let
> >> me know if there are any problems, also feel free to hack/iterate on
> >> it, if you have question as to why something was done, I'll do my best
> >> to answer.
> >>
> >> In particular I just seen a new commit introducing filter on
> >> categories, and org-agenda-filtered-by-top-category probably needs to
> >> be included into local variable list to have it work per agenda
> >> buffer.
> >>
> >> Also the individual calls to org-todo-list and such, do not work right
> >> with sticky agenda as there is nothing to catch the 'exit tag, that is
> >> thrown by `org-prepare-agenda' when it finds cached buffer. I'm not
> >> sure there is more elegant way of fixing it, other then wrapping all
> >> the individual scanner pieces with (catch) blocks, that re-throw if
> >> they had detected that they been called from (org-agenda) command
> >>
> >> Regards,
> >>    Max
> >>
> >>
> > Hi,
> >
> > I see a strange behaviour when clocking in with C-c C-x C-i.
> > Sometimes (!) there is no new CLOCK: entry created.
> > The TODO state changes as expected, but no new CLOCK: line is created, even when clocking out.
> > Looks like this happens when the initial TODO state is set.
> >
> > Maybe I missed a change in the behaviour?
> >
> > Regards,
> > Rainer
> >
> >
> Hi Max,
> 
> I found the culprit:
> 
> 
> (defun bh/mark-parent-tasks-started ()
>    "Visit each parent task and change TODO states to STARTED"
>    (unless bh/mark-parent-tasks-started
>      (when (equal state "INARBEIT")
>        (let ((bh/mark-parent-tasks-started t))
>          (save-excursion
>            (while (org-up-heading-safe)
>              (when (member (nth 2 (org-heading-components)) (list "TODO" "INARBEIT" "WARTEN"))
>                (org-todo "INARBEIT"))))))))
> 
> (add-hook 'org-after-todo-state-change-hook 'bh/mark-parent-tasks-started 'append)
> 
>  something seems to have changed conecerning the "state" variable.

Presumably another victim of the variable renaming patches. Try
renaming "state" to "org-state" and see if that works (untested,
no promises).

Nick


> The function fails and stops the clockin process.  Deactivating the
> hook brings back the right behaviour.  Sorry for that.

> 
> Bernt, that function of yours does seem to have stopped working?
> 
> Thanks and regards,
> Rainer
> 

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

* Re: Sticky agenda branch merged
  2012-04-17 19:35     ` Nick Dokos
@ 2012-04-17 20:06       ` Rainer Stengele
  0 siblings, 0 replies; 17+ messages in thread
From: Rainer Stengele @ 2012-04-17 20:06 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: bernt, emacs-orgmode

Am 17.04.2012 21:35, schrieb Nick Dokos:
> Rainer Stengele <rainer.stengele@online.de> wrote:
> 
>> Am 17.04.2012 12:09, schrieb Rainer Stengele:
>>> Am 16.04.2012 11:47, schrieb Max Mikhanosha:
>>>> I had just pushed a merge of max-sticky-agenda branch to master, let
>>>> me know if there are any problems, also feel free to hack/iterate on
>>>> it, if you have question as to why something was done, I'll do my best
>>>> to answer.
>>>>
>>>> In particular I just seen a new commit introducing filter on
>>>> categories, and org-agenda-filtered-by-top-category probably needs to
>>>> be included into local variable list to have it work per agenda
>>>> buffer.
>>>>
>>>> Also the individual calls to org-todo-list and such, do not work right
>>>> with sticky agenda as there is nothing to catch the 'exit tag, that is
>>>> thrown by `org-prepare-agenda' when it finds cached buffer. I'm not
>>>> sure there is more elegant way of fixing it, other then wrapping all
>>>> the individual scanner pieces with (catch) blocks, that re-throw if
>>>> they had detected that they been called from (org-agenda) command
>>>>
>>>> Regards,
>>>>    Max
>>>>
>>>>
>>> Hi,
>>>
>>> I see a strange behaviour when clocking in with C-c C-x C-i.
>>> Sometimes (!) there is no new CLOCK: entry created.
>>> The TODO state changes as expected, but no new CLOCK: line is created, even when clocking out.
>>> Looks like this happens when the initial TODO state is set.
>>>
>>> Maybe I missed a change in the behaviour?
>>>
>>> Regards,
>>> Rainer
>>>
>>>
>> Hi Max,
>>
>> I found the culprit:
>>
>>
>> (defun bh/mark-parent-tasks-started ()
>>    "Visit each parent task and change TODO states to STARTED"
>>    (unless bh/mark-parent-tasks-started
>>      (when (equal state "INARBEIT")
>>        (let ((bh/mark-parent-tasks-started t))
>>          (save-excursion
>>            (while (org-up-heading-safe)
>>              (when (member (nth 2 (org-heading-components)) (list "TODO" "INARBEIT" "WARTEN"))
>>                (org-todo "INARBEIT"))))))))
>>
>> (add-hook 'org-after-todo-state-change-hook 'bh/mark-parent-tasks-started 'append)
>>
>>  something seems to have changed conecerning the "state" variable.
> 
> Presumably another victim of the variable renaming patches. Try
> renaming "state" to "org-state" and see if that works (untested,
> no promises).
> 
> Nick
> 
> 
>> The function fails and stops the clockin process.  Deactivating the
>> hook brings back the right behaviour.  Sorry for that.
> 
>>
>> Bernt, that function of yours does seem to have stopped working?
>>
>> Thanks and regards,
>> Rainer
>>
> 
> 

Yep, "org-state" works.
Sorry, I missed the renaming tale.
Thanks a lot, Nick!

Rainer

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

* Re: Sticky agenda branch merged
  2012-04-17 19:02   ` Rainer Stengele
  2012-04-17 19:35     ` Nick Dokos
@ 2012-04-17 22:33     ` Bernt Hansen
  1 sibling, 0 replies; 17+ messages in thread
From: Bernt Hansen @ 2012-04-17 22:33 UTC (permalink / raw)
  To: Rainer Stengele; +Cc: emacs-orgmode

Rainer Stengele <rainer.stengele@online.de> writes:

> Am 17.04.2012 12:09, schrieb Rainer Stengele:
> Hi Max,
>
> I found the culprit:
>
>
> (defun bh/mark-parent-tasks-started ()
>   "Visit each parent task and change TODO states to STARTED"
>   (unless bh/mark-parent-tasks-started
>     (when (equal state "INARBEIT")
>       (let ((bh/mark-parent-tasks-started t))
>         (save-excursion
>           (while (org-up-heading-safe)
>             (when (member (nth 2 (org-heading-components)) (list "TODO" "INARBEIT" "WARTEN"))
>               (org-todo "INARBEIT"))))))))
>
> (add-hook 'org-after-todo-state-change-hook 'bh/mark-parent-tasks-started 'append)
>
>
> something seems to have changed conecerning the "state" variable. The function fails and stops the clockin process.
> Deactivating the hook brings back the right behaviour.
> Sorry for that.
>
> Bernt, that function of yours does seem to have stopped working?

Hi Rainer,

I no longer use a STARTED state so I've dropped this function from my
setup.  I'll update the doc - thanks for the notification.

Regards,
Bernt

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

end of thread, other threads:[~2012-04-17 22:33 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-16  9:47 Sticky agenda branch merged Max Mikhanosha
2012-04-16 17:44 ` Tassilo Horn
2012-04-16 18:27   ` Charles Philip Chan
2012-04-16 22:59   ` Max Mikhanosha
2012-04-16 23:23     ` Charles Philip Chan
2012-04-17  6:14     ` Tassilo Horn
2012-04-17 10:09 ` Rainer Stengele
2012-04-17 12:29   ` Max Mikhanosha
2012-04-17 13:23     ` Rainer Stengele
2012-04-17 15:32       ` Max Mikhanosha
2012-04-17 15:58         ` Rainer Stengele
2012-04-17 16:28           ` BUG: Agenda clock related "v" for multi-block agendas Max Mikhanosha
2012-04-17 17:41         ` Sticky agenda branch merged Rainer Stengele
2012-04-17 19:02   ` Rainer Stengele
2012-04-17 19:35     ` Nick Dokos
2012-04-17 20:06       ` Rainer Stengele
2012-04-17 22:33     ` Bernt Hansen

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