Re: Org agenda -- checking for invisible tasks after filtering...

2020-02-17 Thread Christian Schwarzgruber
Hi Bestian,

Bastien  writes:

> Yes, this one makes sense, I've added `org-agenda-filter-hook' for
> functions that you need to run right after `org-agenda-filter' has
> been called.

thanks for that change. But unfortunate this one doesn't work for the
org-agenda-filter-by-* functions. However, it would work for all
org-agenda-filter* functions, if the hook would be called at the end of
`org-agenda-filter-apply`. But I can see what than would happen, the hook
would be called several times when more filter types are set. A other option
would be the call the hook at the end of all the org-agenda-filter* functions,
perhaps.

-Christian



Re: Org agenda -- checking for invisible tasks after filtering...

2020-02-17 Thread Christian Schwarzgruber
Hi Bastien,

thank you! That would reduce it to one advice.

However, I would still need to advice the function org-agenda-filter-apply since
it doesn't call `org-agenda-finalize`. Would it make sense to call the hook
org-agenda-finalize-hook at the and of org-agenda-filter-apply or perhaps add a
new hook `org-agenda-filter(-(apply|after))?-hook`? Calling org-agenda-finalize
at the end of org-agenda-filter-apply wont work, because org-agenda-finalize
calls org-agenda-filter-apply, and hence, would result in an infinite
recursion.

org-agenda-filter-remove-all and org-agenda-remove-filter do call
org-agenda-finalize, so this way works.

Thanks Bastien

Bastien  writes:

> Hi Christian,
>
> you might want to have a look at org-agenda-finalize-hook, though I'm
> not sure it can help, I'm not familiar with org-super-agenda enough.
>
> HTH,



Re: Org agenda -- checking for invisible tasks after filtering...

2020-02-16 Thread Christian Schwarzgruber
Hi Bastien,

Bastien  writes:

> Christian Schwarzgruber  writes:
>
>> The question is now, is it possible to further reduce the advised
>> functions to just one advised function.
>
> I am sorry, I don't understand what change does it imply on Org's
> side.  Can you explain us a bit more?

Nothing need to be changed on Org's side (I guess). I'm just wondering if there
is a single spot where I can hook in (advice) to achieve the same as with the
currently two advice I use.

The project org-super-agenda advices `org-agenda-finalize-entries` and groups
the entries. However, when one uses the org filter functionality some groups
might be empty, which looks ugly. My implementation to handle that case is to
advice the following functions `org-agenda-filter-apply` and
`org-agenda-finalize`. Both will call the same function
`org-super-agenda--hide-or-show-groups`. If all tasks inside a group have the
invisible property set the group gets hidden as well, and vica versa.

The author of `org-super-agenda` doesn't like my implementation which uses
two advice. But I couldn't find a single spot where I can hook in, and check if
all tasks are hidden...


Thanks!

Christian



Org agenda -- checking for invisible tasks after filtering...

2019-12-15 Thread Christian Schwarzgruber
Hey!

I'm a contributor of `org-super-agenda`
https://github.com/alphapapa/org-super-agenda, `org-super-agenda` lets you group
tasks into blocks. However, `org-super-agenda` doesn't consider filtering, which
might leave you with empty groups.

To solve that, I created a PR 
(https://github.com/alphapapa/org-super-agenda/pull/77)
which advices `org-agenda-filter-apply` and `org-agenda-finalize`
(https://github.com/alphapapa/org-super-agenda/pull/77/files#diff-465f82cd8ad2c42f0cebb190be6f58abR305).

Both are calling the same function `org-super-agenda--hide-or-show-groups`
(https://github.com/alphapapa/org-super-agenda/pull/77/files#diff-465f82cd8ad2c42f0cebb190be6f58abR1114).

In that function I check for the property `'invisible`. If all tasks in a group 
are
invisible the group gets hidden too.

The question is now, is it possible to further reduce the advised functions to
just one advised function.


best,

Christian



[O] Bug: org-log-reschedule ignored when calling `org-agenda-do-date-{later, earlier}` [9.1.13 (9.1.13-elpaplus @ ~/.emacs.d/elpa/org-plus-contrib-20180521/)]

2018-06-06 Thread Christian Schwarzgruber


Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

 https://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org mailing list.


I have set `org-log-reschedule` to `'note`. When calling
`org-agenda-do-date-later` or `org-agenda-do-date-earlier` in *Org Agenda*
buffer, `org-log-reschedule` gets ignored.

I would expect that *Org Note* buffer pops-up to insert a note.

Thank you!

Emacs  : GNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.26)
 of 2018-05-21
Package: Org mode version 9.1.13 (9.1.13-elpaplus @ 
~/.emacs.d/elpa/org-plus-contrib-20180521/)