unofficial mirror of emacs-orgmode@gnu.org
 help / color / Atom feed
* [BUG] Invalid search bound on org-agenda-tree-to-indirect-buffer
@ 2020-06-13 14:02 tkgeoxwk
  2020-06-15  1:03 ` Kyle Meyer
  0 siblings, 1 reply; 2+ messages in thread
From: tkgeoxwk @ 2020-06-13 14:02 UTC (permalink / raw)
  To: emacs-orgmode

When I run M-x org-agenda-tree-to-indirect-buffer on any TODO item from 
agenda view I see the below error "Invalid search bound"

I can reproduce with the below config

(setq org-agenda-files (list "~/inbox.org"))

Contents of inbox.org:

* TODO [#A] Weekly Review
SCHEDULED: <2020-06-13 Sat>
:PROPERTIES:
:CREATED:  [2020-06-13 Thu 05:33]
:END:
* TODO Make screenshots
SCHEDULED: <2020-06-13 Sat>
:PROPERTIES:
:CREATED:  [2020-06-13 Thu 05:33]
:END:

I can't seem to reproduce this bug when I remove property drawers.

Debugger entered--Lisp error: (error "Invalid search bound (wrong side 
of point)")
   re-search-forward("^[ \011]*:\\(\\(?:\\w\\|[-_]\\)+\\):[ \011]*$" 98 
t)
   (while (re-search-forward org-drawer-regexp end t) (let* ((val 
(get-char-property-and-overlay (point) (quote invisible))) (pcase-0 
(function (lambda nil (let (...) (if ... ...)))))) (if (consp val) (let* 
((x314 (car val))) (if (eq x314 (quote outline)) (let* ((x315 ...)) (let 
(...) (goto-char ...))) (let ((drawer ...)) (if (memq ... ...) (progn 
... ...))))) (funcall pcase-0))))
   (save-restriction (widen) (goto-char (or --mpom (point))) (while 
(re-search-forward org-drawer-regexp end t) (let* ((val 
(get-char-property-and-overlay (point) (quote invisible))) (pcase-0 
(function (lambda nil (let ... ...))))) (if (consp val) (let* ((x314 
(car val))) (if (eq x314 (quote outline)) (let* (...) (let ... ...)) 
(let (...) (if ... ...)))) (funcall pcase-0)))))
   (save-excursion (save-restriction (widen) (goto-char (or --mpom 
(point))) (while (re-search-forward org-drawer-regexp end t) (let* ((val 
(get-char-property-and-overlay (point) (quote invisible))) (pcase-0 
(function (lambda nil ...)))) (if (consp val) (let* ((x314 ...)) (if (eq 
x314 ...) (let* ... ...) (let ... ...))) (funcall pcase-0))))))
   (save-excursion (if (markerp --mpom) (progn (set-buffer (marker-buffer 
--mpom)))) (save-excursion (save-restriction (widen) (goto-char (or 
--mpom (point))) (while (re-search-forward org-drawer-regexp end t) 
(let* ((val (get-char-property-and-overlay ... ...)) (pcase-0 (function 
...))) (if (consp val) (let* (...) (if ... ... ...)) (funcall 
pcase-0)))))))
   (let ((--mpom beg)) (save-excursion (if (markerp --mpom) (progn 
(set-buffer (marker-buffer --mpom)))) (save-excursion (save-restriction 
(widen) (goto-char (or --mpom (point))) (while (re-search-forward 
org-drawer-regexp end t) (let* ((val ...) (pcase-0 ...)) (if (consp val) 
(let* ... ...) (funcall pcase-0))))))))
   (let* ((global\? (eq state (quote all))) (beg (if global\? (point-min) 
(line-beginning-position))) (end (cond (global\? (point-max)) ((eq state 
(quote children)) (org-entry-end-position)) (t (save-excursion 
(org-end-of-subtree t t)))))) (let ((--mpom beg)) (save-excursion (if 
(markerp --mpom) (progn (set-buffer (marker-buffer --mpom)))) 
(save-excursion (save-restriction (widen) (goto-char (or --mpom 
(point))) (while (re-search-forward org-drawer-regexp end t) (let* (... 
...) (if ... ... ...))))))))
   (progn (let* ((global\? (eq state (quote all))) (beg (if global\? 
(point-min) (line-beginning-position))) (end (cond (global\? 
(point-max)) ((eq state (quote children)) (org-entry-end-position)) (t 
(save-excursion (org-end-of-subtree t t)))))) (let ((--mpom beg)) 
(save-excursion (if (markerp --mpom) (progn (set-buffer (marker-buffer 
--mpom)))) (save-excursion (save-restriction (widen) (goto-char (or 
--mpom ...)) (while (re-search-forward org-drawer-regexp end t) (let* 
... ...))))))))
   (if (and (derived-mode-p (quote org-mode)) (not (memq state (quote 
(overview folded contents))))) (progn (let* ((global\? (eq state (quote 
all))) (beg (if global\? (point-min) (line-beginning-position))) (end 
(cond (global\? (point-max)) ((eq state ...) (org-entry-end-position)) 
(t (save-excursion ...))))) (let ((--mpom beg)) (save-excursion (if 
(markerp --mpom) (progn (set-buffer ...))) (save-excursion 
(save-restriction (widen) (goto-char ...) (while ... ...))))))))
   org-cycle-hide-drawers(all)
   run-hook-with-args(org-cycle-hide-drawers all)
   (let ((cbuf (current-buffer)) (cwin (selected-window)) (pos (point)) 
beg end level heading ibuf) (save-excursion (org-back-to-heading t) (if 
(numberp arg) (progn (setq level (org-outline-level)) (if (< arg 0) 
(progn (setq arg (+ level arg)))) (while (> (setq level 
(org-outline-level)) arg) (org-up-heading-safe)))) (setq beg (point) 
heading (org-get-heading (quote no-tags))) (org-end-of-subtree t t) (if 
(org-at-heading-p) (progn (backward-char 1))) (setq end (point))) (if 
(and (buffer-live-p org-last-indirect-buffer) (not (eq 
org-indirect-buffer-display (quote new-frame))) (not arg)) (progn 
(kill-buffer org-last-indirect-buffer))) (setq ibuf 
(org-get-indirect-buffer cbuf heading) org-last-indirect-buffer ibuf) 
(cond ((or (eq org-indirect-buffer-display (quote new-frame)) (and arg 
(eq org-indirect-buffer-display (quote dedicated-frame)))) (select-frame 
(make-frame)) (delete-other-windows) (pop-to-buffer-same-window ibuf) 
(org-set-frame-title heading)) ((eq org-indirect-buffer-display (quote 
dedicated-frame)) (raise-frame (select-frame (or (and 
org-indirect-dedicated-frame (frame-live-p org-indirect-dedicated-frame) 
org-indirect-dedicated-frame) (setq org-indirect-dedicated-frame 
(make-frame))))) (delete-other-windows) (pop-to-buffer-same-window ibuf) 
(org-set-frame-title (concat "Indirect: " heading))) ((eq 
org-indirect-buffer-display (quote current-window)) 
(pop-to-buffer-same-window ibuf)) ((eq org-indirect-buffer-display 
(quote other-window)) (pop-to-buffer ibuf)) (t (error "Invalid value"))) 
(narrow-to-region beg end) (org-show-all (quote (headings drawers 
blocks))) (goto-char pos) (run-hook-with-args (quote org-cycle-hook) 
(quote all)) (and (window-live-p cwin) (select-window cwin)))
   org-tree-to-indirect-buffer(nil)
   (save-excursion (goto-char pos) (org-tree-to-indirect-buffer arg))
   (save-current-buffer (set-buffer buffer) (save-excursion (goto-char 
pos) (org-tree-to-indirect-buffer arg)))
   (let* ((marker (or (org-get-at-bol (quote org-marker)) 
(org-agenda-error))) (buffer (marker-buffer marker)) (pos 
(marker-position marker))) (save-current-buffer (set-buffer buffer) 
(save-excursion (goto-char pos) (org-tree-to-indirect-buffer arg))))
   org-agenda-do-tree-to-indirect-buffer(nil)
   (progn (org-agenda-do-tree-to-indirect-buffer arg))
   (unwind-protect (progn (org-agenda-do-tree-to-indirect-buffer arg)) 
(set-window-configuration wconfig))
   (let ((wconfig (current-window-configuration))) (unwind-protect (progn 
(org-agenda-do-tree-to-indirect-buffer arg)) (set-window-configuration 
wconfig)))
   (let ((agenda-buffer (buffer-name)) (agenda-window (selected-window)) 
(indirect-window (and org-last-indirect-buffer (get-buffer-window 
org-last-indirect-buffer)))) (let ((wconfig 
(current-window-configuration))) (unwind-protect (progn 
(org-agenda-do-tree-to-indirect-buffer arg)) (set-window-configuration 
wconfig))) (if (or (eq org-indirect-buffer-display (quote new-frame)) 
(eq org-indirect-buffer-display (quote dedicated-frame))) nil 
(unwind-protect (if (and indirect-window (window-live-p 
indirect-window)) nil (setq indirect-window (split-window 
agenda-window))) (and indirect-window (select-window indirect-window)) 
(switch-to-buffer org-last-indirect-buffer :norecord) 
(fit-window-to-buffer indirect-window))) (select-window 
(get-buffer-window agenda-buffer)) (setq org-agenda-last-indirect-buffer 
org-last-indirect-buffer))
   (if current-prefix-arg (org-agenda-do-tree-to-indirect-buffer arg) 
(let ((agenda-buffer (buffer-name)) (agenda-window (selected-window)) 
(indirect-window (and org-last-indirect-buffer (get-buffer-window 
org-last-indirect-buffer)))) (let ((wconfig 
(current-window-configuration))) (unwind-protect (progn 
(org-agenda-do-tree-to-indirect-buffer arg)) (set-window-configuration 
wconfig))) (if (or (eq org-indirect-buffer-display (quote new-frame)) 
(eq org-indirect-buffer-display (quote dedicated-frame))) nil 
(unwind-protect (if (and indirect-window (window-live-p 
indirect-window)) nil (setq indirect-window (split-window 
agenda-window))) (and indirect-window (select-window indirect-window)) 
(switch-to-buffer org-last-indirect-buffer :norecord) 
(fit-window-to-buffer indirect-window))) (select-window 
(get-buffer-window agenda-buffer)) (setq org-agenda-last-indirect-buffer 
org-last-indirect-buffer)))
   org-agenda-tree-to-indirect-buffer(nil)
   funcall-interactively(org-agenda-tree-to-indirect-buffer nil)
   call-interactively(org-agenda-tree-to-indirect-buffer record nil)
   command-execute(org-agenda-tree-to-indirect-buffer record)
   execute-extended-command(nil "org-agenda-tree-to-indirect-buffer" 
"org-agenda-tree")
   funcall-interactively(execute-extended-command nil 
"org-agenda-tree-to-indirect-buffer" "org-agenda-tree")
   call-interactively(execute-extended-command nil nil)
   command-execute(execute-extended-command)

Emacs  : GNU Emacs 26.3 (build 1, x86_64-pc-linux-gnu, GTK+ Version 
3.24.20)
  of 2020-05-19
Package: Org mode version 9.3.7 (release_9.3.7-638-g688247-git @ mixed 
installation! /usr/share/emacs/26.3/lisp/org/ and 
~/.emacs.d/straight/repos/org/lisp/)


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

* Re: [BUG] Invalid search bound on org-agenda-tree-to-indirect-buffer
  2020-06-13 14:02 [BUG] Invalid search bound on org-agenda-tree-to-indirect-buffer tkgeoxwk
@ 2020-06-15  1:03 ` Kyle Meyer
  0 siblings, 0 replies; 2+ messages in thread
From: Kyle Meyer @ 2020-06-15  1:03 UTC (permalink / raw)
  To: tkgeoxwk; +Cc: emacs-orgmode

tkgeoxwk@cock.li writes:

> When I run M-x org-agenda-tree-to-indirect-buffer on any TODO item from 
> agenda view I see the below error "Invalid search bound"
>
> I can reproduce with the below config
> [...]

Thanks for the report.  This was introduced by 1aa095ccf (Fix drawer
invisibility, 2020-06-06), and it looks like Nicolas has already fixed
it in c70918717 (Do not widen when folding all drawers, 2020-06-13).


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

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-13 14:02 [BUG] Invalid search bound on org-agenda-tree-to-indirect-buffer tkgeoxwk
2020-06-15  1:03 ` Kyle Meyer

unofficial mirror of emacs-orgmode@gnu.org

Archives are clonable:
	git clone --mirror https://yhetil.org/orgmode/0 orgmode/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 orgmode orgmode/ https://yhetil.org/orgmode \
		emacs-orgmode@gnu.org
	public-inbox-index orgmode

Example config snippet for mirrors

Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.emacs.orgmode
	nntp://news.gmane.io/gmane.emacs.orgmode


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git