emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [BUG] org-fill-paragraph seems broken
@ 2012-04-27 17:00 Nick Dokos
  2012-04-27 17:21 ` Bastien
  0 siblings, 1 reply; 4+ messages in thread
From: Nick Dokos @ 2012-04-27 17:00 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: nicholas.dokos

Running M-q in a draft message with orgstruct++-mode enabled gives me
the appended backtrace.

The problem seems to have been introduced by commit 84a358e3.  Git blame
fingers the following two as the most recent commits that affected
org-fill-paragraph:

187f77a2 2012-04-04
84a358e3 2012-04-26

With the first one in force, I don't get the problem; with
the second, I do.

Nick

Debugger entered--Lisp error: (wrong-number-of-arguments #[(arg) ("/usr/local/share/emacs/24.0.95/lisp/mail/sendmail.elc" . 26697) nil 4] 0)
  mail-mode-fill-paragraph()
  funcall(mail-mode-fill-paragraph)
  (cond ((and (equal (char-after (point-at-bol)) 42) (save-excursion (goto-char (point-at-bol)) (looking-at org-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 b
 eg) (skip-chars-forward " 	") (make-string ... 32)))) (t (catch (quote exit) (while (setq next ...) (if ... ... ... ...))))) (flet ((fill-context-prefix (from to &optional flr) prefix)) (sav
 e-restriction (narrow-to-region beg end) (save-excursion (fill-paragraph justify)))) t)) ((and (derived-mode-p (quote org-mode)) (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))) ((and (eq major-mode (quote org-mode)) (save-excursion (forward-paragraph -1) (or (looking-at (concat "^[^\n]*" org-scheduled-regexp ".*$")) (looking-at (concat "^[^\n]*" org-deadline-regexp ".*$"))))) (save-restriction (narrow-to-region (1+ (match-end 0)) (save-excursion (forward-paragraph 1) (point))) (fill-paragraph justify) t)) (org-fill-paragraph-fallback-function (funcall o
 rg-fill-paragraph-fallback-function)) (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 org-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-excurs
 ion ... ... ...))) (t (catch (quote exit) (while ... ...)))) (flet ((fill-context-prefix (from to &optional flr) prefix)) (save-restriction (narrow-to-region beg end) (save-excursion (fill-p
 aragraph justify)))) t)) ((and (derived-mode-p (quote org-mode)) (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))) ((and (eq major-mode (quote org-mode)) (save-excursion (forward-paragraph -1) (or (looking-at (concat "^[^\n]*" org-scheduled-regexp ".*$")) (looking-at (concat "^[^\n]*" org-deadline-regexp ".*$"))))) (save-restriction (narrow-to-region (1+ (match-end 0)) (save-excursion (forward-paragraph 1) (point))) (fill-paragraph justify) t)) (org-fill-paragraph-fallback-function (funcall org-fill-paragraph-fallback-function)) (t nil)))
  org-fill-paragraph(nil)
  fill-paragraph(nil t)
  call-interactively(fill-paragraph)
  (let (orgstruct-mode) (call-interactively (or (key-binding "\361") (quote orgstruct-error))))
  (if (org-context-p (quote headline) (quote item) (and orgstruct-is-++ nil (quote item-body))) (org-run-like-in-org-mode (quote fill-paragraph)) (let (orgstruct-mode) (call-interactively (or (key-binding "\361") (quote orgstruct-error)))))
  orgstruct-hijacker-command-22(1)
  call-interactively(orgstruct-hijacker-command-22 nil nil)

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

end of thread, other threads:[~2012-04-27 21:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-27 17:00 [BUG] org-fill-paragraph seems broken Nick Dokos
2012-04-27 17:21 ` Bastien
2012-04-27 17:54   ` Nick Dokos
2012-04-27 21:09     ` Bastien

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).