From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lem Ming Subject: Re: Bug: org-agenda-filter-by-top-heading does not filter [9.1.14 (release_9.1.14-908-gf1269e)] Date: Sat, 29 Sep 2018 11:37:39 -0400 Message-ID: References: <87efdtw5hf.fsf@kyleam.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000cc394c0577045a07" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40795) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g6HJY-0006CR-7t for emacs-orgmode@gnu.org; Sat, 29 Sep 2018 11:37:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g6HJX-0005SB-9p for emacs-orgmode@gnu.org; Sat, 29 Sep 2018 11:37:52 -0400 Received: from mail-ua1-x934.google.com ([2607:f8b0:4864:20::934]:34316) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g6HJX-0005Rh-4q for emacs-orgmode@gnu.org; Sat, 29 Sep 2018 11:37:51 -0400 Received: by mail-ua1-x934.google.com with SMTP id r15-v6so3391903uao.1 for ; Sat, 29 Sep 2018 08:37:50 -0700 (PDT) In-Reply-To: <87efdtw5hf.fsf@kyleam.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: kyle@kyleam.com Cc: adrian.bradd@gmail.com, emacs-orgmode@gnu.org --000000000000cc394c0577045a07 Content-Type: text/plain; charset="UTF-8" Hello, That is exactly what happened. I reread the helper and now it is obvious that "Root" is among the parents also. I didn't realized that at the time. Thanks Kyle and Adrian for the clarification. Lem On Sun, Sep 16, 2018 at 4:29 PM Kyle Meyer wrote: > Hello, > > Lem Ming writes: > > > In the agenda list `org-agenda-list` buffer, when I do > > `org-agenda-filter-by-top-headline` when the point is over a line with a > > headline, nothing is filtered. > > > > I've never used org-agenda-filter-by-top-headline, but taking a quick > look at it and its helper, org-find-top-headline, the intention seems to > be to find the level-one parent of the current heading. So, in your > example, > > > * Root > > ** TODO task 2 > > :tag_2: > > DEADLINE: <2018-09-14 Fri 12:00:00> > > :PROPERTIES: > > :ADD_TIME: <2018-09-07 Fri 23:47:00> > > :END: > > *** TODO task 2.1 > > DEADLINE: <2018-09-14 Fri 11:00:00> > > :PROPERTIES: > > :ADD_TIME: <2018-09-07 Fri 23:47:00> > > :END: > [...] > > ** TODO task 7 > > DEADLINE: <2018-09-14 Fri 12:00:00> SCHEDULED: <2018-09-12 Wed > 10:00:00> > > ... it'd find "Root" if point were on any of the tasks. If I'm reading > your report correctly, you're assuming that with point on the "task 2", > it'd take *that* as the top-level heading and filter to all the tasks > under it (task 2.1, etc). Instead, it finds "Root" and filters to > everything thing under that, which---in your example file---is the same > thing, so you don't see any change. > > -- > Kyle > --000000000000cc394c0577045a07 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello,

That is exac= tly what happened. I reread the helper and now it is obvious that "Roo= t" is among the parents also. I didn't realized that at the time.<= br>
Thanks Kyle and Adrian for the clarification.

Lem=

On Sun, Sep 16, 2018 at 4:29 PM Kyle Meyer <kyle@kyleam.com> wrote:
Hello,

Lem Ming <ram= boman777@gmail.com> writes:

> In the agenda list `org-agenda-list` buffer, when I do
> `org-agenda-filter-by-top-headline` when the point is over a line with= a
> headline, nothing is filtered.
>

I've never used org-agenda-filter-by-top-headline, but taking a quick look at it and its helper, org-find-top-headline, the intention seems to be to find the level-one parent of the current heading.=C2=A0 So, in your example,

> * Root
> ** TODO task 2
> :tag_2:
>=C2=A0 =C2=A0 DEADLINE: <2018-09-14 Fri 12:00:00>
>=C2=A0 =C2=A0 :PROPERTIES:
>=C2=A0 =C2=A0 :ADD_TIME: <2018-09-07 Fri 23:47:00>
>=C2=A0 =C2=A0 :END:
> *** TODO task 2.1
>=C2=A0 =C2=A0 =C2=A0DEADLINE: <2018-09-14 Fri 11:00:00>
>=C2=A0 =C2=A0 =C2=A0:PROPERTIES:
>=C2=A0 =C2=A0 =C2=A0:ADD_TIME: <2018-09-07 Fri 23:47:00>
>=C2=A0 =C2=A0 =C2=A0:END:
[...]
> ** TODO task 7
>=C2=A0 =C2=A0 DEADLINE: <2018-09-14 Fri 12:00:00> SCHEDULED: <= 2018-09-12 Wed 10:00:00>

... it'd find "Root" if point were on any of the tasks.=C2=A0= If I'm reading
your report correctly, you're assuming that with point on the "tas= k 2",
it'd take *that* as the top-level heading and filter to all the tasks under it (task 2.1, etc).=C2=A0 Instead, it finds "Root" and filt= ers to
everything thing under that, which---in your example file---is the same
thing, so you don't see any change.

--
Kyle
--000000000000cc394c0577045a07--