From: Nick Dokos <nicholas.dokos@hp.com>
To: emacs-orgmode@gnu.org
Cc: nicholas.dokos@hp.com
Subject: [BUG] org-fill-paragraph seems broken
Date: Fri, 27 Apr 2012 13:00:13 -0400 [thread overview]
Message-ID: <719.1335546013@alphaville> (raw)
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)
next reply other threads:[~2012-04-27 17:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-27 17:00 Nick Dokos [this message]
2012-04-27 17:21 ` [BUG] org-fill-paragraph seems broken Bastien
2012-04-27 17:54 ` Nick Dokos
2012-04-27 21:09 ` Bastien
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=719.1335546013@alphaville \
--to=nicholas.dokos@hp.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).