Merge branch 'bugfix'
This commit is contained in:
commit
5549357bf2
|
@ -4680,7 +4680,7 @@ is active."
|
|||
(org-agenda-text-search-extra-files org-agenda-text-search-extra-files)
|
||||
regexp rtn rtnall files file pos inherited-tags
|
||||
marker category level tags c neg re boolean
|
||||
ee txt beg end words regexps+ regexps- hdl-only buffer beg1 str)
|
||||
ee txt beg end last-search-end words regexps+ regexps- hdl-only buffer beg1 str)
|
||||
(unless (and (not edit-at)
|
||||
(stringp string)
|
||||
(string-match "\\S-" string))
|
||||
|
@ -4819,6 +4819,7 @@ is active."
|
|||
(throw 'nextfile t))
|
||||
(goto-char (max (point-min) (1- (point))))
|
||||
(while (re-search-forward regexp nil t)
|
||||
(setq last-search-end (point))
|
||||
(org-back-to-heading t)
|
||||
(while (and (not (zerop org-agenda-search-view-max-outline-level))
|
||||
(> (org-reduced-level (org-outline-level))
|
||||
|
@ -4880,7 +4881,7 @@ is active."
|
|||
'priority 1000
|
||||
'type "search")
|
||||
(push txt ee)
|
||||
(goto-char (1- end))))))))))
|
||||
(goto-char (max (1- end) last-search-end))))))))))
|
||||
(setq rtn (nreverse ee))
|
||||
(setq rtnall (append rtnall rtn)))
|
||||
(org-agenda--insert-overriding-header
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
* Test heading with text
|
||||
foo
|
||||
* Test heading with inlinetask
|
||||
foo
|
||||
****************** inline
|
||||
text inside inlinetask
|
||||
****************** END
|
||||
bar
|
|
@ -115,6 +115,31 @@ See https://list.orgmode.org/20220101200103.GB29829@itccanarias.org/T/#t."
|
|||
(should (= 2 (count-lines (point-min) (point-max)))))
|
||||
(org-test-agenda--kill-all-agendas))
|
||||
|
||||
(ert-deftest test-org-agenda/org-search-view ()
|
||||
"Test `org-search-view' specifications."
|
||||
(cl-assert (not org-agenda-sticky) nil "precondition violation")
|
||||
(cl-assert (not (org-test-agenda--agenda-buffers))
|
||||
nil "precondition violation")
|
||||
;; Search a string.
|
||||
(let ((org-agenda-files `(,(expand-file-name "examples/agenda-search.org"
|
||||
org-test-dir))))
|
||||
(org-search-view nil "foo")
|
||||
(set-buffer org-agenda-buffer-name)
|
||||
(should (= 4 (count-lines (point-min) (point-max)))))
|
||||
;; Search past inlinetask.
|
||||
(let ((org-agenda-files `(,(expand-file-name "examples/agenda-search.org"
|
||||
org-test-dir))))
|
||||
(org-search-view nil "bar")
|
||||
(set-buffer org-agenda-buffer-name)
|
||||
(should (= 3 (count-lines (point-min) (point-max)))))
|
||||
;; Search inside inlinetask.
|
||||
(let ((org-agenda-files `(,(expand-file-name "examples/agenda-search.org"
|
||||
org-test-dir))))
|
||||
(org-search-view nil "text inside inlinetask")
|
||||
(set-buffer org-agenda-buffer-name)
|
||||
(should (= 3 (count-lines (point-min) (point-max)))))
|
||||
(org-test-agenda--kill-all-agendas))
|
||||
|
||||
(ert-deftest test-org-agenda/property-timestamp ()
|
||||
"Match timestamps inside property drawer.
|
||||
See https://list.orgmode.org/06d301d83d9e$f8b44340$ea1cc9c0$@tomdavey.com"
|
||||
|
|
Loading…
Reference in New Issue