emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug: org-agenda-filter-by-top-heading does not filter [9.1.14 (release_9.1.14-908-gf1269e)]
@ 2018-09-11  8:53 Lem Ming
  2018-09-14  5:02 ` Lem Ming
  2018-09-16 20:29 ` Kyle Meyer
  0 siblings, 2 replies; 5+ messages in thread
From: Lem Ming @ 2018-09-11  8:53 UTC (permalink / raw)
  To: emacs-orgmode

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

I am learning org-mode by trying the several features one by one.

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 use the minimal setup as described with the most recent org version as
specified here:
https://orgmode.org/org.html#Feedback

Here is the content of the files in org-agenda-files:

f1.org
```
* Root
** TODO task 1
:tag_1:
   DEADLINE: <2018-09-14 Fri 12:00:00>
   :PROPERTIES:
   :ADD_TIME: <2018-09-07 Fri 23:47:00>
   :END:
*** TODO task 1.1
    DEADLINE: <2018-09-14 Fri 11:00:00>
    :PROPERTIES:
    :ADD_TIME: <2018-09-07 Fri 23:47:00>
    :END:
*** DONE task 1.2
    CLOSED: [2018-09-09 Sun 23:53:00] DEADLINE: <2018-09-14 Fri 11:00:00>
    :PROPERTIES:
    :ADD_TIME: <2018-09-07 Fri 23:47:00>
    :END:
```

f2.org
```
* 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:
*** DONE task 2.2
    CLOSED: [2018-09-09 Sun 23:53:00] DEADLINE: <2018-09-14 Fri 11:00:00>
    :PROPERTIES:
    :ADD_TIME: <2018-09-07 Fri 23:47:00>
    :END:
** DONE task 3 [100%]
:tag_3:
   CLOSED: [2018-09-10 Mon 23:57:22] DEADLINE: <2018-09-14 Fri 12:00:00>
   :PROPERTIES:
   :ADD_TIME: <2018-09-06 Thu 23:47:00>
   :END:
*** DONE task 3.1
    CLOSED: [2018-09-10 Mon 23:57:20] DEADLINE: <2018-09-14 Fri 11:00:00>
    :PROPERTIES:
    :ADD_TIME: <2018-09-06 Thu 23:47:00>
    :END:
*** DONE task 3.2
    CLOSED: [2018-09-09 Sun 23:53:00] DEADLINE: <2018-09-14 Fri 11:00:00>
    :PROPERTIES:
    :ADD_TIME: <2018-09-06 Thu 23:47:00>
    :END:
** TODO task 4
   DEADLINE: <2018-09-13 Thu 12:00:00> SCHEDULED: <2018-09-14 Fri 23:55:00>
** TODO task 5
   DEADLINE: <2018-09-11 Tue 12:00:00> SCHEDULED: <2018-09-06 Thu 10:00:00>
** TODO task 6
   DEADLINE: <2018-09-13 Thu 12:00:00> SCHEDULED: <2018-09-09 Sun 10:00:00>
** TODO task 7
   DEADLINE: <2018-09-14 Fri 12:00:00> SCHEDULED: <2018-09-12 Wed 10:00:00>
```

Am I not using `org-agenda-filter-by-top-headline` correctly?
What should I do to filter the agenda list by top headline?

Regards.

===================================

Emacs  : GNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30)
 of 2018-07-05
Package: Org mode version 9.1.14 (release_9.1.14-908-gf1269e)

current state:
==============
(setq
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
             org-src-mode-configure-edit-buffer)
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-agenda-files '("~/tmp/orgmode/agenda/f2.org" "~/tmp/orgmode/agenda/
f1.org")
 org-mode-hook '((closure
          (org--rds reftex-docstruct-symbol orgtbl-line-start-regexp
           org-element-greater-elements org-table-coordinate-overlays
           org-table-auto-blank-field org-clock-history
org-agenda-current-date
           org-with-time org-defdecode org-def org-read-date-inactive
org-ans2
           org-ans1 org-columns-current-fmt-compiled org-clock-current-task
           org-clock-effort org-agenda-skip-function
           org-agenda-skip-comment-trees org-agenda-archives-mode
           org-end-time-was-given org-time-was-given org-log-note-extra
           org-log-note-purpose org-log-post-message
org-last-inserted-timestamp
           org-last-changed-timestamp org-entry-property-inherited-from
           org-blocked-by-checkboxes org-state
           org-agenda-headline-snapshot-before-repeat
           org-capture-last-stored-marker org-agenda-start-on-weekday
           org-agenda-buffer-tmp-name clean-buffer-list-kill-buffer-names
           org-id-link-to-org-use-id org-agenda-buffer-name
org-priority-regexp
           org-mode-abbrev-table org-mode-syntax-table buffer-face-mode-face
           org-mode-map org-tbl-menu org-org-menu org-struct-menu
org-entities
           org-last-state org-id-track-globally org-clock-start-time
texmathp-why
           remember-data-file org-agenda-tags-todo-honor-ignore-options
           iswitchb-temp-buflist calc-embedded-open-mode
           calc-embedded-open-formula calc-embedded-close-formula
           align-mode-rules-list org-emphasis-alist
           org-emphasis-regexp-components org-export-registered-backends
           org-modules org-babel-load-languages
org-indent-indentation-per-level
           org-element-paragraph-separate ffap-url-regexp
           org-inlinetask-min-level t)
          nil
          (add-hook (quote change-major-mode-hook) (quote org-show-all)
           (quote append) (quote local))
          )
         (closure
          (org-bracket-link-regexp org-src-window-setup *this*
           org-babel-confirm-evaluate-answer-no org-src-preserve-indentation
           org-src-lang-modes org-link-file-path-type
           org-edit-src-content-indentation org-babel-library-of-babel t)
          nil
          (add-hook (quote change-major-mode-hook)
           (quote org-babel-show-result-all) (quote append) (quote local))
          )
         org-babel-result-hide-spec org-babel-hide-all-hashes)
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-bibtex-headline-format-function '(closure
                       (org-id-locations
                    org-agenda-search-view-always-boolean
                    org-agenda-overriding-header t)
                       (entry) (cdr (assq :title entry)))
 org-babel-pre-tangle-hook '(save-buffer)
 org-tab-first-hook '(org-babel-hide-result-toggle-maybe
org-babel-header-arg-expand)
 org-occur-hook '(org-first-headline-recenter)
 org-cycle-hook '(org-cycle-hide-archived-subtrees
org-cycle-show-empty-lines
          org-optimize-window-after-visibility-change)
 org-speed-command-hook '(org-speed-command-activate
org-babel-speed-command-activate)
 org-confirm-shell-link-function 'yes-or-no-p
 org-link-parameters '(("id" :follow org-id-open)
               ("eww" :follow eww :store org-eww-store-link)
               ("rmail" :follow org-rmail-open :store org-rmail-store-link)
               ("mhe" :follow org-mhe-open :store org-mhe-store-link)
               ("irc" :follow org-irc-visit :store org-irc-store-link
:export
            org-irc-export)
               ("info" :follow org-info-open :export org-info-export :store
            org-info-store-link)
               ("gnus" :follow org-gnus-open :store org-gnus-store-link)
               ("docview" :follow org-docview-open :export
org-docview-export
            :store org-docview-store-link)
               ("bibtex" :follow org-bibtex-open :store
org-bibtex-store-link)
               ("bbdb" :follow org-bbdb-open :export org-bbdb-export
:complete
            org-bbdb-complete-link :store org-bbdb-store-link)
               ("w3m" :store org-w3m-store-link) ("file+sys") ("file+emacs")
               ("doi" :follow org--open-doi-link)
               ("elisp" :follow org--open-elisp-link)
               ("file" :complete org-file-complete-link)
               ("ftp" :follow (lambda (path) (browse-url (concat "ftp:"
path))))
               ("help" :follow org--open-help-link)
               ("http" :follow (lambda (path) (browse-url (concat "http:"
path))))
               ("https" :follow
            (lambda (path) (browse-url (concat "https:" path))))
               ("mailto" :follow
            (lambda (path) (browse-url (concat "mailto:" path))))
               ("news" :follow (lambda (path) (browse-url (concat "news:"
path))))
               ("shell" :follow org--open-shell-link))
 )

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

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

* Re: Bug: org-agenda-filter-by-top-heading does not filter [9.1.14 (release_9.1.14-908-gf1269e)]
  2018-09-11  8:53 Bug: org-agenda-filter-by-top-heading does not filter [9.1.14 (release_9.1.14-908-gf1269e)] Lem Ming
@ 2018-09-14  5:02 ` Lem Ming
  2018-09-16 20:29 ` Kyle Meyer
  1 sibling, 0 replies; 5+ messages in thread
From: Lem Ming @ 2018-09-14  5:02 UTC (permalink / raw)
  To: emacs-orgmode

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

I tried with org-mode version 9.0.10 and 9.0.1.
There is still no filtering when I do ^ in org agenda mode when the point
is anywhere on a line where there is a task.

I observe that:
- The version 9.0.1 dates to November 2016.
- org-agenda-filter-by-top-headline is a very useful function.

It probably means that if it was a bug it would probably have been fix by
then. But it is not. Which makes me think it is probably not a bug and that
I am probably not using this function the right way.

How do I filter the tasks listed in the agenda list by top headline?

Regards.

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

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

* Re: Bug: org-agenda-filter-by-top-heading does not filter [9.1.14 (release_9.1.14-908-gf1269e)]
  2018-09-11  8:53 Bug: org-agenda-filter-by-top-heading does not filter [9.1.14 (release_9.1.14-908-gf1269e)] Lem Ming
  2018-09-14  5:02 ` Lem Ming
@ 2018-09-16 20:29 ` Kyle Meyer
  2018-09-22 17:57   ` Adrian Bradd
  2018-09-29 15:37   ` Lem Ming
  1 sibling, 2 replies; 5+ messages in thread
From: Kyle Meyer @ 2018-09-16 20:29 UTC (permalink / raw)
  To: Lem Ming, emacs-orgmode

Hello,

Lem Ming <ramboman777@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.  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

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

* Re: Bug: org-agenda-filter-by-top-heading does not filter [9.1.14 (release_9.1.14-908-gf1269e)]
  2018-09-16 20:29 ` Kyle Meyer
@ 2018-09-22 17:57   ` Adrian Bradd
  2018-09-29 15:37   ` Lem Ming
  1 sibling, 0 replies; 5+ messages in thread
From: Adrian Bradd @ 2018-09-22 17:57 UTC (permalink / raw)
  To: Kyle Meyer; +Cc: emacs-orgmode, Lem Ming


Hello,

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

Otherwise, its possible that the intent is to filter for the top 
headline ("Root" in this case) in a specific file. I noticed that 
in the original example if you filter a task that has a top 
headline in f1.org of "Root" it would also present tasks under the 
"Root" headline from f2.org.

Cheers,

-- 
Adrian Bradd

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

* Re: Bug: org-agenda-filter-by-top-heading does not filter [9.1.14 (release_9.1.14-908-gf1269e)]
  2018-09-16 20:29 ` Kyle Meyer
  2018-09-22 17:57   ` Adrian Bradd
@ 2018-09-29 15:37   ` Lem Ming
  1 sibling, 0 replies; 5+ messages in thread
From: Lem Ming @ 2018-09-29 15:37 UTC (permalink / raw)
  To: kyle; +Cc: adrian.bradd, emacs-orgmode

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

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 <kyle@kyleam.com> wrote:

> Hello,
>
> Lem Ming <ramboman777@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.  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
>

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

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

end of thread, other threads:[~2018-09-29 15:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-11  8:53 Bug: org-agenda-filter-by-top-heading does not filter [9.1.14 (release_9.1.14-908-gf1269e)] Lem Ming
2018-09-14  5:02 ` Lem Ming
2018-09-16 20:29 ` Kyle Meyer
2018-09-22 17:57   ` Adrian Bradd
2018-09-29 15:37   ` Lem Ming

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