emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] Bug when cycling


From: Bastien
Subject: [O] Bug when cycling
Date: Wed, 27 Nov 2013 00:24:16 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Hi,

with latest master and the file below, hitting TAB at the beginning
of the headline will produce the attached backtrace.

* Test
  SCHEDULED: <2013-11-25 lun.>
  :PROPERTIES:
  :CAPTURED: [2013-11-08 ven. 18:13]
  :END:

Debugger entered--Lisp error: (error "Invalid search bound (wrong side of 
point)")
  re-search-forward("^[         ]*:\\(\\(?:\\w\\|[-_]\\)+\\):[  ]*$" 2256 t)
  (while (re-search-forward org-drawer-regexp end t) (if (member-ignore-case 
(match-string 1) exceptions) nil (let ((drawer (org-element-at-point))) (if 
(memq (org-element-type drawer) (quote (drawer property-drawer))) (progn 
(org-flag-drawer t drawer) (goto-char (org-element-property :end drawer)))))))
  (let* ((globalp (memq state (quote (contents all)))) (beg (if globalp 
(point-min) (point))) (end (if globalp (point-max) (if (eq state (quote 
children)) (save-excursion (outline-next-heading) (point)) (org-end-of-subtree 
t))))) (goto-char beg) (while (re-search-forward org-drawer-regexp end t) (if 
(member-ignore-case (match-string 1) exceptions) nil (let ((drawer 
(org-element-at-point))) (if (memq (org-element-type drawer) (quote (drawer 
property-drawer))) (progn (org-flag-drawer t drawer) (goto-char 
(org-element-property :end drawer))))))))
  (save-excursion (let* ((globalp (memq state (quote (contents all)))) (beg (if 
globalp (point-min) (point))) (end (if globalp (point-max) (if (eq state (quote 
children)) (save-excursion (outline-next-heading) (point)) (org-end-of-subtree 
t))))) (goto-char beg) (while (re-search-forward org-drawer-regexp end t) (if 
(member-ignore-case (match-string 1) exceptions) nil (let ((drawer 
(org-element-at-point))) (if (memq (org-element-type drawer) (quote ...)) 
(progn (org-flag-drawer t drawer) (goto-char ...))))))))
  (progn (save-excursion (let* ((globalp (memq state (quote (contents all)))) 
(beg (if globalp (point-min) (point))) (end (if globalp (point-max) (if (eq 
state ...) (save-excursion ... ...) (org-end-of-subtree t))))) (goto-char beg) 
(while (re-search-forward org-drawer-regexp end t) (if (member-ignore-case 
(match-string 1) exceptions) nil (let ((drawer ...)) (if (memq ... ...) (progn 
... ...))))))))
  (if (and (derived-mode-p (quote org-mode)) (not (memq state (quote (overview 
folded contents))))) (progn (save-excursion (let* ((globalp (memq state (quote 
...))) (beg (if globalp (point-min) (point))) (end (if globalp (point-max) (if 
... ... ...)))) (goto-char beg) (while (re-search-forward org-drawer-regexp end 
t) (if (member-ignore-case (match-string 1) exceptions) nil (let (...) (if ... 
...))))))))
  org-cycle-hide-drawers(subtree)
  run-hook-with-args(org-cycle-hide-drawers subtree)
  (if (org-before-first-heading-p) nil (run-hook-with-args (quote 
org-cycle-hook) (quote subtree)))
  (cond ((= eos eoh) (if (org-before-first-heading-p) nil (run-hook-with-args 
(quote org-pre-cycle-hook) (quote empty))) (org-unlogged-message "EMPTY ENTRY") 
(setq org-cycle-subtree-status nil) (save-excursion (goto-char eos) 
(outline-next-heading) (if (outline-invisible-p) (org-flag-heading nil)))) 
((and (or (>= eol eos) (not (string-match "\\S-" (buffer-substring eol eos)))) 
(or has-children (not (setq children-skipped 
org-cycle-skip-children-state-if-no-children)))) (if 
(org-before-first-heading-p) nil (run-hook-with-args (quote org-pre-cycle-hook) 
(quote children))) (if (org-at-item-p) (org-list-set-item-visibility 
(point-at-bol) struct (quote children)) (org-show-entry) (let* 
((org-called-with-limited-levels t) (org-outline-regexp 
(org-get-limited-outline-regexp)) (outline-regexp org-outline-regexp) 
(org-outline-regexp-bol (concat "^" org-outline-regexp))) (show-children)) (if 
(eq org-cycle-include-plain-lists (quote integrate)) (progn (save-excursion 
(org-back-to-heading) (while (org-list-search-forward ... eos t) 
(beginning-of-line 1) (let* ... ... ...)))))) (org-unlogged-message "CHILDREN") 
(save-excursion (goto-char eos) (outline-next-heading) (if 
(outline-invisible-p) (org-flag-heading nil))) (setq org-cycle-subtree-status 
(quote children)) (if (org-before-first-heading-p) nil (run-hook-with-args 
(quote org-cycle-hook) (quote children)))) ((or children-skipped (and (eq 
last-command this-command) (eq org-cycle-subtree-status (quote children)))) (if 
(org-before-first-heading-p) nil (run-hook-with-args (quote org-pre-cycle-hook) 
(quote subtree))) (outline-flag-region eoh eos nil) (org-unlogged-message (if 
children-skipped "SUBTREE (NO CHILDREN)" "SUBTREE")) (setq 
org-cycle-subtree-status (quote subtree)) (if (org-before-first-heading-p) nil 
(run-hook-with-args (quote org-cycle-hook) (quote subtree)))) (t 
(run-hook-with-args (quote org-pre-cycle-hook) (quote folded)) 
(outline-flag-region eoh eos t) (org-unlogged-message "FOLDED") (setq 
org-cycle-subtree-status (quote folded)) (if (org-before-first-heading-p) nil 
(run-hook-with-args (quote org-cycle-hook) (quote folded)))))
  (let ((goal-column 0) eoh eol eos has-children children-skipped struct) 
(save-excursion (if (org-at-item-p) (progn (beginning-of-line) (setq struct 
(org-list-struct)) (setq eoh (point-at-eol)) (setq eos 
(org-list-get-item-end-before-blank (point) struct)) (setq has-children 
(org-list-has-child-p (point) struct))) (org-back-to-heading) (setq eoh 
(save-excursion (outline-end-of-heading) (point))) (setq eos (save-excursion 
(1- (org-end-of-subtree t t)))) (setq has-children (or (save-excursion (let 
(...) (outline-next-heading) (and ... ...))) (save-excursion 
(org-list-search-forward (org-item-beginning-re) eos t))))) (beginning-of-line 
2) (if nil (while (and (not (eobp)) (get-char-property (1- (point)) (quote 
invisible))) (beginning-of-line 2)) (while (and (not (eobp)) (get-char-property 
(1- (point)) (quote invisible))) (goto-char (next-single-char-property-change 
(point) (quote invisible))) (and (eolp) (beginning-of-line 2)))) (setq eol 
(point))) (cond ((= eos eoh) (if (org-before-first-heading-p) nil 
(run-hook-with-args (quote org-pre-cycle-hook) (quote empty))) 
(org-unlogged-message "EMPTY ENTRY") (setq org-cycle-subtree-status nil) 
(save-excursion (goto-char eos) (outline-next-heading) (if 
(outline-invisible-p) (org-flag-heading nil)))) ((and (or (>= eol eos) (not 
(string-match "\\S-" (buffer-substring eol eos)))) (or has-children (not (setq 
children-skipped org-cycle-skip-children-state-if-no-children)))) (if 
(org-before-first-heading-p) nil (run-hook-with-args (quote org-pre-cycle-hook) 
(quote children))) (if (org-at-item-p) (org-list-set-item-visibility 
(point-at-bol) struct (quote children)) (org-show-entry) (let* 
((org-called-with-limited-levels t) (org-outline-regexp 
(org-get-limited-outline-regexp)) (outline-regexp org-outline-regexp) 
(org-outline-regexp-bol (concat "^" org-outline-regexp))) (show-children)) (if 
(eq org-cycle-include-plain-lists (quote integrate)) (progn (save-excursion 
(org-back-to-heading) (while ... ... ...))))) (org-unlogged-message "CHILDREN") 
(save-excursion (goto-char eos) (outline-next-heading) (if 
(outline-invisible-p) (org-flag-heading nil))) (setq org-cycle-subtree-status 
(quote children)) (if (org-before-first-heading-p) nil (run-hook-with-args 
(quote org-cycle-hook) (quote children)))) ((or children-skipped (and (eq 
last-command this-command) (eq org-cycle-subtree-status (quote children)))) (if 
(org-before-first-heading-p) nil (run-hook-with-args (quote org-pre-cycle-hook) 
(quote subtree))) (outline-flag-region eoh eos nil) (org-unlogged-message (if 
children-skipped "SUBTREE (NO CHILDREN)" "SUBTREE")) (setq 
org-cycle-subtree-status (quote subtree)) (if (org-before-first-heading-p) nil 
(run-hook-with-args (quote org-cycle-hook) (quote subtree)))) (t 
(run-hook-with-args (quote org-pre-cycle-hook) (quote folded)) 
(outline-flag-region eoh eos t) (org-unlogged-message "FOLDED") (setq 
org-cycle-subtree-status (quote folded)) (if (org-before-first-heading-p) nil 
(run-hook-with-args (quote org-cycle-hook) (quote folded))))))
  org-cycle-internal-local()
  (cond ((equal arg (quote (16))) (setq last-command (quote dummy)) 
(org-set-startup-visibility) (org-unlogged-message "Startup visibility, plus 
VISIBILITY properties")) ((equal arg (quote (64))) (show-all) 
(org-unlogged-message "Entire buffer visible, including drawers")) 
((org-at-table-p (quote any)) (if (org-at-table\.el-p) (message "Use C-c ' to 
edit table.el tables") (if arg (org-table-edit-field t) 
(org-table-justify-field-maybe) (call-interactively (quote 
org-table-next-field))))) ((run-hook-with-args-until-success (quote 
org-tab-after-check-for-table-hook))) ((eq arg t) (org-cycle-internal-global)) 
((save-excursion (beginning-of-line 1) (looking-at org-drawer-regexp)) 
(org-flag-drawer (not (get-char-property (match-end 0) (quote invisible))))) 
((integerp arg) (save-excursion (org-back-to-heading) (outline-up-heading (if 
(< arg 0) (- arg) (- (funcall outline-level) arg))) (org-show-subtree))) ((and 
(featurep (quote org-inlinetask)) (org-inlinetask-at-task-p) (or (bolp) (not 
(eq org-cycle-emulate-tab (quote exc-hl-bol))))) 
(org-inlinetask-toggle-visibility)) ((org-try-cdlatex-tab)) ((and (or (and 
org-cycle-include-plain-lists (org-at-item-p)) (save-excursion 
(beginning-of-line 1) (looking-at org-outline-regexp))) (or (bolp) (not (eq 
org-cycle-emulate-tab (quote exc-hl-bol))))) (org-cycle-internal-local)) 
(buffer-read-only (org-back-to-heading)) ((run-hook-with-args-until-success 
(quote org-tab-after-check-for-cycling-hook))) ((org-try-structure-completion)) 
((run-hook-with-args-until-success (quote org-tab-before-tab-emulation-hook))) 
((and (eq org-cycle-emulate-tab (quote exc-hl-bol)) (or (not (bolp)) (not 
(looking-at org-outline-regexp)))) (call-interactively (global-key-binding "   
"))) ((if (and (memq org-cycle-emulate-tab (quote (white whitestart))) 
(save-excursion (beginning-of-line 1) (looking-at "[     ]*")) (or (and (eq 
org-cycle-emulate-tab (quote white)) (= (match-end 0) (point-at-eol))) (and (eq 
org-cycle-emulate-tab (quote whitestart)) (>= (match-end 0) pos)))) t (eq 
org-cycle-emulate-tab t)) (call-interactively (global-key-binding "        "))) 
(t (save-excursion (org-back-to-heading) (org-cycle))))
  (let* ((limit-level (or org-cycle-max-level (and (boundp (quote 
org-inlinetask-min-level)) org-inlinetask-min-level (1- 
org-inlinetask-min-level)))) (nstars (and limit-level (if org-odd-levels-only 
(and limit-level (1- (* limit-level 2))) limit-level))) (org-outline-regexp (if 
(not (derived-mode-p (quote org-mode))) outline-regexp (concat "\\*" (if nstars 
(format "\\{1,%d\\} " nstars) "+ ")))) (bob-special (and 
org-cycle-global-at-bob (not arg) (bobp) (not (looking-at 
org-outline-regexp)))) (org-cycle-hook (if bob-special (delq (quote 
org-optimize-window-after-visibility-change) (copy-sequence org-cycle-hook)) 
org-cycle-hook)) (pos (point))) (if (or bob-special (equal arg (quote (4)))) 
(setq arg t)) (cond ((equal arg (quote (16))) (setq last-command (quote dummy)) 
(org-set-startup-visibility) (org-unlogged-message "Startup visibility, plus 
VISIBILITY properties")) ((equal arg (quote (64))) (show-all) 
(org-unlogged-message "Entire buffer visible, including drawers")) 
((org-at-table-p (quote any)) (if (org-at-table\.el-p) (message "Use C-c ' to 
edit table.el tables") (if arg (org-table-edit-field t) 
(org-table-justify-field-maybe) (call-interactively (quote 
org-table-next-field))))) ((run-hook-with-args-until-success (quote 
org-tab-after-check-for-table-hook))) ((eq arg t) (org-cycle-internal-global)) 
((save-excursion (beginning-of-line 1) (looking-at org-drawer-regexp)) 
(org-flag-drawer (not (get-char-property (match-end 0) (quote invisible))))) 
((integerp arg) (save-excursion (org-back-to-heading) (outline-up-heading (if 
(< arg 0) (- arg) (- (funcall outline-level) arg))) (org-show-subtree))) ((and 
(featurep (quote org-inlinetask)) (org-inlinetask-at-task-p) (or (bolp) (not 
(eq org-cycle-emulate-tab (quote exc-hl-bol))))) 
(org-inlinetask-toggle-visibility)) ((org-try-cdlatex-tab)) ((and (or (and 
org-cycle-include-plain-lists (org-at-item-p)) (save-excursion 
(beginning-of-line 1) (looking-at org-outline-regexp))) (or (bolp) (not (eq 
org-cycle-emulate-tab (quote exc-hl-bol))))) (org-cycle-internal-local)) 
(buffer-read-only (org-back-to-heading)) ((run-hook-with-args-until-success 
(quote org-tab-after-check-for-cycling-hook))) ((org-try-structure-completion)) 
((run-hook-with-args-until-success (quote org-tab-before-tab-emulation-hook))) 
((and (eq org-cycle-emulate-tab (quote exc-hl-bol)) (or (not (bolp)) (not 
(looking-at org-outline-regexp)))) (call-interactively (global-key-binding "    
  "))) ((if (and (memq org-cycle-emulate-tab (quote (white whitestart))) 
(save-excursion (beginning-of-line 1) (looking-at "[     ]*")) (or (and (eq 
org-cycle-emulate-tab ...) (= ... ...)) (and (eq org-cycle-emulate-tab ...) (>= 
... pos)))) t (eq org-cycle-emulate-tab t)) (call-interactively 
(global-key-binding "        "))) (t (save-excursion (org-back-to-heading) 
(org-cycle)))))
  (if (or (run-hook-with-args-until-success (quote org-tab-first-hook)) (and 
org-cycle-level-after-item/entry-creation (or (org-cycle-level) 
(org-cycle-item-indentation)))) nil (let* ((limit-level (or org-cycle-max-level 
(and (boundp (quote org-inlinetask-min-level)) org-inlinetask-min-level (1- 
org-inlinetask-min-level)))) (nstars (and limit-level (if org-odd-levels-only 
(and limit-level (1- ...)) limit-level))) (org-outline-regexp (if (not 
(derived-mode-p (quote org-mode))) outline-regexp (concat "\\*" (if nstars 
(format "\\{1,%d\\} " nstars) "+ ")))) (bob-special (and 
org-cycle-global-at-bob (not arg) (bobp) (not (looking-at 
org-outline-regexp)))) (org-cycle-hook (if bob-special (delq (quote 
org-optimize-window-after-visibility-change) (copy-sequence org-cycle-hook)) 
org-cycle-hook)) (pos (point))) (if (or bob-special (equal arg (quote (4)))) 
(setq arg t)) (cond ((equal arg (quote (16))) (setq last-command (quote dummy)) 
(org-set-startup-visibility) (org-unlogged-message "Startup visibility, plus 
VISIBILITY properties")) ((equal arg (quote (64))) (show-all) 
(org-unlogged-message "Entire buffer visible, including drawers")) 
((org-at-table-p (quote any)) (if (org-at-table\.el-p) (message "Use C-c ' to 
edit table.el tables") (if arg (org-table-edit-field t) 
(org-table-justify-field-maybe) (call-interactively (quote 
org-table-next-field))))) ((run-hook-with-args-until-success (quote 
org-tab-after-check-for-table-hook))) ((eq arg t) (org-cycle-internal-global)) 
((save-excursion (beginning-of-line 1) (looking-at org-drawer-regexp)) 
(org-flag-drawer (not (get-char-property (match-end 0) (quote invisible))))) 
((integerp arg) (save-excursion (org-back-to-heading) (outline-up-heading (if 
(< arg 0) (- arg) (- ... arg))) (org-show-subtree))) ((and (featurep (quote 
org-inlinetask)) (org-inlinetask-at-task-p) (or (bolp) (not (eq 
org-cycle-emulate-tab ...)))) (org-inlinetask-toggle-visibility)) 
((org-try-cdlatex-tab)) ((and (or (and org-cycle-include-plain-lists 
(org-at-item-p)) (save-excursion (beginning-of-line 1) (looking-at 
org-outline-regexp))) (or (bolp) (not (eq org-cycle-emulate-tab ...)))) 
(org-cycle-internal-local)) (buffer-read-only (org-back-to-heading)) 
((run-hook-with-args-until-success (quote 
org-tab-after-check-for-cycling-hook))) ((org-try-structure-completion)) 
((run-hook-with-args-until-success (quote org-tab-before-tab-emulation-hook))) 
((and (eq org-cycle-emulate-tab (quote exc-hl-bol)) (or (not (bolp)) (not 
(looking-at org-outline-regexp)))) (call-interactively (global-key-binding "    
   "))) ((if (and (memq org-cycle-emulate-tab (quote ...)) (save-excursion 
(beginning-of-line 1) (looking-at "[    ]*")) (or (and ... ...) (and ... ...))) 
t (eq org-cycle-emulate-tab t)) (call-interactively (global-key-binding "       
"))) (t (save-excursion (org-back-to-heading) (org-cycle))))))
  org-cycle(nil)
  call-interactively(org-cycle nil nil)
  command-execute(org-cycle)

-- 
 Bastien




reply via email to

[Prev in Thread] Current Thread [Next in Thread]