emacs-orgmode
[Top][All Lists]
Advanced

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

[O] [BUG] fill-paragraph in orgstruct mode blows up


From: Nick Dokos
Subject: [O] [BUG] fill-paragraph in orgstruct mode blows up
Date: Sat, 19 Mar 2011 21:56:44 -0400

I use orgstruct mode when composing email and fill-paragraph blew up
with the following backtrace when I tried to fill a paragraph after a
drawer, as described in the last paragraph of this email.

:SETUP:
# Local variables:
# eval: (org-update-all-dblocks) -*-
# End:
:END:

This is a dummy paragraph after the drawer. Put cursor here and call 
fill-paragraph
after enabling orgstruct-mode. You should get the error below.

Nick

Org-mode version 7.5 (release_7.5.86.g6daa.dirty)

,----
| Debugger entered--Lisp error: (wrong-type-argument stringp nil)
|   re-search-backward(nil nil t)
|   (cond ((and (looking-at item-re) (or (< ind ind-ref) (eq 
org-list-ending-method (quote regexp)))) (throw (quote exit) (point))) ((<= 
(point) lim-up) (throw (quote exit) nil)) ((and (not (eq org-list-ending-method 
(quote indent))) (looking-at org-list-end-re)) (throw (quote exit) nil)) 
((looking-at "^[      ]*#\\+end_") (re-search-backward "^[    ]*#\\+begin_" nil 
t)) ((looking-at "^[  ]*:END:") (re-search-backward org-drawer-regexp nil t) 
(beginning-of-line)) ((and inlinetask-re (looking-at inlinetask-re)) 
(org-inlinetask-goto-beginning) (forward-line -1)) ((looking-at "^[         
]*$") (forward-line -1)) ((zerop ind) (throw (quote exit) nil)) ((< ind 
ind-ref) (setq ind-ref ind) (forward-line -1)) (t (forward-line -1)))
|   (let ((ind (org-get-indentation))) (cond ((and (looking-at item-re) (or (< 
ind ind-ref) (eq org-list-ending-method (quote regexp)))) (throw (quote exit) 
(point))) ((<= (point) lim-up) (throw (quote exit) nil)) ((and (not (eq 
org-list-ending-method (quote indent))) (looking-at org-list-end-re)) (throw 
(quote exit) nil)) ((looking-at "^[   ]*#\\+end_") (re-search-backward "^[    
]*#\\+begin_" nil t)) ((looking-at "^[  ]*:END:") (re-search-backward 
org-drawer-regexp nil t) (beginning-of-line)) ((and inlinetask-re (looking-at 
inlinetask-re)) (org-inlinetask-goto-beginning) (forward-line -1)) ((looking-at 
"^[         ]*$") (forward-line -1)) ((zerop ind) (throw (quote exit) nil)) ((< 
ind ind-ref) (setq ind-ref ind) (forward-line -1)) (t (forward-line -1))))
|   (while t (let ((ind (org-get-indentation))) (cond ((and (looking-at 
item-re) (or (< ind ind-ref) (eq org-list-ending-method (quote regexp)))) 
(throw (quote exit) (point))) ((<= (point) lim-up) (throw (quote exit) nil)) 
((and (not (eq org-list-ending-method (quote indent))) (looking-at 
org-list-end-re)) (throw (quote exit) nil)) ((looking-at "^[  ]*#\\+end_") 
(re-search-backward "^[    ]*#\\+begin_" nil t)) ((looking-at "^[  ]*:END:") 
(re-search-backward org-drawer-regexp nil t) (beginning-of-line)) ((and 
inlinetask-re (looking-at inlinetask-re)) (org-inlinetask-goto-beginning) 
(forward-line -1)) ((looking-at "^[         ]*$") (forward-line -1)) ((zerop 
ind) (throw (quote exit) nil)) ((< ind ind-ref) (setq ind-ref ind) 
(forward-line -1)) (t (forward-line -1)))))
|   (catch (quote exit) (while t (let ((ind (org-get-indentation))) (cond ((and 
(looking-at item-re) (or (< ind ind-ref) (eq org-list-ending-method ...))) 
(throw (quote exit) (point))) ((<= (point) lim-up) (throw (quote exit) nil)) 
((and (not (eq org-list-ending-method ...)) (looking-at org-list-end-re)) 
(throw (quote exit) nil)) ((looking-at "^[    ]*#\\+end_") (re-search-backward 
"^[    ]*#\\+begin_" nil t)) ((looking-at "^[  ]*:END:") (re-search-backward 
org-drawer-regexp nil t) (beginning-of-line)) ((and inlinetask-re (looking-at 
inlinetask-re)) (org-inlinetask-goto-beginning) (forward-line -1)) ((looking-at 
"^[         ]*$") (forward-line -1)) ((zerop ind) (throw (quote exit) nil)) ((< 
ind ind-ref) (setq ind-ref ind) (forward-line -1)) (t (forward-line -1))))))
|   (cond ((eq (nth 2 context) (quote invalid)) nil) ((looking-at item-re) 
(point)) (t (let ((hl 0) (i -1) end-bounds) (when (and (not (eq 
org-list-ending-method (quote indent))) (progn (while (setq i ...) (setq hl 
...)) (setq end-bounds (org-in-regexp org-list-end-re hl))) (>= (point) (car 
end-bounds)) (< (point) (cdr end-bounds))) (goto-char (car end-bounds)) 
(forward-line -1))) (catch (quote exit) (while t (let ((ind 
(org-get-indentation))) (cond ((and ... ...) (throw ... ...)) ((<= ... lim-up) 
(throw ... nil)) ((and ... ...) (throw ... nil)) ((looking-at "^[        
]*#\\+end_") (re-search-backward "^[    ]*#\\+begin_" nil t)) ((looking-at "^[  
]*:END:") (re-search-backward org-drawer-regexp nil t) (beginning-of-line)) 
((and inlinetask-re ...) (org-inlinetask-goto-beginning) (forward-line -1)) 
((looking-at "^[        ]*$") (forward-line -1)) ((zerop ind) (throw ... nil)) 
((< ind ind-ref) (setq ind-ref ind) (forward-line -1)) (t (forward-line 
-1))))))))
|   (let* ((case-fold-search t) (context (org-list-context)) (lim-up (car 
context)) (inlinetask-re (and (featurep (quote org-inlinetask)) 
(org-inlinetask-outline-regexp))) (item-re (org-item-re)) (ind-ref (if (or 
(looking-at "^[    ]*$") (and inlinetask-re (looking-at inlinetask-re))) 10000 
(org-get-indentation)))) (cond ((eq (nth 2 context) (quote invalid)) nil) 
((looking-at item-re) (point)) (t (let ((hl 0) (i -1) end-bounds) (when (and 
(not (eq org-list-ending-method ...)) (progn (while ... ...) (setq end-bounds 
...)) (>= (point) (car end-bounds)) (< (point) (cdr end-bounds))) (goto-char 
(car end-bounds)) (forward-line -1))) (catch (quote exit) (while t (let ((ind 
...)) (cond (... ...) (... ...) (... ...) (... ...) (... ... ...) (... ... ...) 
(... ...) (... ...) (... ... ...) (t ...))))))))
|   (save-excursion (beginning-of-line) (let* ((case-fold-search t) (context 
(org-list-context)) (lim-up (car context)) (inlinetask-re (and (featurep (quote 
org-inlinetask)) (org-inlinetask-outline-regexp))) (item-re (org-item-re)) 
(ind-ref (if (or (looking-at "^[        ]*$") (and inlinetask-re (looking-at 
inlinetask-re))) 10000 (org-get-indentation)))) (cond ((eq (nth 2 context) 
(quote invalid)) nil) ((looking-at item-re) (point)) (t (let ((hl 0) (i -1) 
end-bounds) (when (and (not ...) (progn ... ...) (>= ... ...) (< ... ...)) 
(goto-char (car end-bounds)) (forward-line -1))) (catch (quote exit) (while t 
(let (...) (cond ... ... ... ... ... ... ... ... ... ...))))))))
|   org-in-item-p()
|   (setq itemp (org-in-item-p))
|   (save-excursion (forward-paragraph -1) (setq itemp (org-in-item-p)))
|   (cond ((and (equal (char-after (point-at-bol)) 42) (save-excursion 
(goto-char (point-at-bol)) (looking-at outline-regexp))) t) (table\.el-p t) 
(table-p (org-table-align) t) (itemp (let* ((struct (save-excursion (goto-char 
itemp) (org-list-struct))) (parents (org-list-parents-alist struct)) (children 
(org-list-get-children itemp struct parents)) beg end prev next prefix) (cond 
((not children) (setq prefix (make-string (org-list-item-body-column itemp) 32) 
beg itemp end (org-list-get-item-end itemp struct))) ((< (point) (setq next 
(car children))) (setq prefix (make-string (org-list-item-body-column itemp) 
32) beg itemp end next)) ((> (point) (setq prev (car ...))) (setq beg 
(org-list-get-item-end prev struct) end (org-list-get-item-end itemp struct) 
prefix (save-excursion (goto-char beg) (skip-chars-forward "         ") 
(make-string ... 32)))) (t (catch (quote exit) (while (setq next ...) (if ... 
... ... ...))))) (flet ((fill-context-prefix (from to &optional flr) prefix)) 
(save-
 restriction (narrow-to-region beg end) (save-excursion (fill-paragraph 
justify)))) t)) ((save-excursion (forward-paragraph -1) (setq itemp 
(org-in-item-p))) (let ((struct (save-excursion (goto-char itemp) 
(org-list-struct)))) (save-restriction (narrow-to-region 
(org-list-get-bottom-point struct) (save-excursion (forward-paragraph 1) 
(point))) (fill-paragraph justify) t))) (t nil))
|   (let ((table-p (org-at-table-p)) (table\.el-p (org-at-table\.el-p)) (itemp 
(org-in-item-p))) (cond ((and (equal (char-after (point-at-bol)) 42) 
(save-excursion (goto-char (point-at-bol)) (looking-at outline-regexp))) t) 
(table\.el-p t) (table-p (org-table-align) t) (itemp (let* ((struct 
(save-excursion (goto-char itemp) (org-list-struct))) (parents 
(org-list-parents-alist struct)) (children (org-list-get-children itemp struct 
parents)) beg end prev next prefix) (cond ((not children) (setq prefix 
(make-string ... 32) beg itemp end (org-list-get-item-end itemp struct))) ((< 
(point) (setq next ...)) (setq prefix (make-string ... 32) beg itemp end next)) 
((> (point) (setq prev ...)) (setq beg (org-list-get-item-end prev struct) end 
(org-list-get-item-end itemp struct) prefix (save-excursion ... ... ...))) (t 
(catch (quote exit) (while ... ...)))) (flet ((fill-context-prefix (from to 
&optional flr) prefix)) (save-restriction (narrow-to-region beg end) 
(save-excursion (fill-par
 agraph justify)))) t)) ((save-excursion (forward-paragraph -1) (setq itemp 
(org-in-item-p))) (let ((struct (save-excursion (goto-char itemp) 
(org-list-struct)))) (save-restriction (narrow-to-region 
(org-list-get-bottom-point struct) (save-excursion (forward-paragraph 1) 
(point))) (fill-paragraph justify) t))) (t nil)))
|   org-fill-paragraph(nil)
|   fill-paragraph(nil t)
|   call-interactively(fill-paragraph t nil)
`----




reply via email to

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