From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id TAP/JZRk5l57QAAA0tVLHw (envelope-from ) for ; Sun, 14 Jun 2020 17:55:32 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id CFOcIZRk5l5pWgAA1q6Kng (envelope-from ) for ; Sun, 14 Jun 2020 17:55:32 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 68DC1940058 for ; Sun, 14 Jun 2020 17:55:31 +0000 (UTC) Received: from localhost ([::1]:58188 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jkWqv-00008s-Uj for larch@yhetil.org; Sun, 14 Jun 2020 13:55:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42968) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jk6kH-0005uz-Ct for emacs-orgmode@gnu.org; Sat, 13 Jun 2020 10:02:53 -0400 Received: from mail.cock.li ([37.120.193.124]:42150) by eggs.gnu.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jk6kE-0005Ft-Qa for emacs-orgmode@gnu.org; Sat, 13 Jun 2020 10:02:52 -0400 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cock.li; s=mail; t=1592056957; bh=zQb+XnD1naynxZG1ruUUMBWU6SLjTFAv/wUsGeHmS0A=; h=Date:From:To:Subject:From; b=pFzXM7f3jbuHYuNUX6AJJB0KFeN6n4/mCCq6aDPdzGu5/fjxXjyYMBziacA3KW9su qqnbuVGBBDBdhtcQtUPCZap8WPr5rFbPpslAx8o6hy2FpnF22jzAgwSnDzUeqjGecD KAb1uU2fi/s9TdbEK9hqX7fmgn9lUoobkLFzLXa9/V+fqQRb5zCiBprfgwTeukKXGq ZN0PGe3qQnwqjBIcLA55WCnqTQUqbRaHHP14mmvFggOYjgZsU9SjMCH+Ou7DhvqFqW e8aMAbLDyWFrePmHIdW8mw6Kn6CajiGUCE4Rq/H6iqSStHKrGM2/nPkf4vYh7A7FQS //MjCh5FrPPcQ== Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Sat, 13 Jun 2020 14:02:37 +0000 From: tkgeoxwk@cock.li To: emacs-orgmode@gnu.org Subject: [BUG] Invalid search bound on org-agenda-tree-to-indirect-buffer Message-ID: <6338f2d3d4d0aa8011c88321383d945f@cock.li> X-Sender: tkgeoxwk@cock.li User-Agent: Roundcube Webmail/1.3.10 Received-SPF: permerror client-ip=37.120.193.124; envelope-from=tkgeoxwk@cock.li; helo=mail.cock.li X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/13 10:02:38 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -7 X-Spam_score: -0.8 X-Spam_bar: / X-Spam_report: (-0.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_RP_RNBL=1.31, SPF_HELO_NONE=0.001, T_SPF_PERMERROR=0.01, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-Mailman-Approved-At: Sun, 14 Jun 2020 13:54:51 -0400 X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=cock.li header.s=mail header.b=pFzXM7f3; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: -0.21 X-TUID: znh+7++9n3gl 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/)