From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Sebastien Vauban" Subject: error: (wrong-type-argument number-or-marker-p nil) in org-adaptive-fill-function Date: Tue, 30 Oct 2012 11:29:51 +0100 Message-ID: <80mwz45k2o.fsf@somewhere.org> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Return-path: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org Hello, When typing more than 80 characters (or so) on a line, waiting for the automatic filling, I get this every time I type any character: --8<---------------cut here---------------start------------->8--- Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil) <(251038 nil) (if (< p post-affiliated) nil (cond ((eql type (quote comment)) (looking-= at "[ ]*# ?") (match-string 0)) ((eql type (quote footnote-definition)) ""= ) ((memql type (quote (item plain-list))) (make-string (org-list-item-body-= column post-affiliated) 32)) ((eql type (quote paragraph)) (let ((parent (o= rg-element-property :parent element))) (cond ((eq (org-element-type parent)= (quote item)) (make-string (org-list-item-body-column ...) 32)) ((save-exc= ursion (beginning-of-line) (looking-at "[ ]+")) (match-string 0)) (t "")))= ) ((eql type (quote comment-block)) (let* ((cbeg (save-excursion (goto-char= post-affiliated) (forward-line) (point))) (cend (save-excursion (goto-char= ...) (skip-chars-backward " \n") (line-beginning-position)))) (if (and (>= =3D p cbeg) (< p cend)) (progn (if (save-excursion ... ...) (match-string 0= ) ""))))))) (let* ((p (line-beginning-position)) (element (save-excursion (beginning-= of-line) (org-element-at-point))) (type (org-element-type element)) (post-a= ffiliated (org-element-property :post-affiliated element))) (if (< p post-a= ffiliated) nil (cond ((eql type (quote comment)) (looking-at "[ ]*# ?") (m= atch-string 0)) ((eql type (quote footnote-definition)) "") ((memql type (q= uote (item plain-list))) (make-string (org-list-item-body-column post-affil= iated) 32)) ((eql type (quote paragraph)) (let ((parent (org-element-proper= ty :parent element))) (cond ((eq ... ...) (make-string ... 32)) ((save-excu= rsion ... ...) (match-string 0)) (t "")))) ((eql type (quote comment-block)= ) (let* ((cbeg (save-excursion ... ... ...)) (cend (save-excursion ... ... = ...))) (if (and (>=3D p cbeg) (< p cend)) (progn (if ... ... "")))))))) (if (and (derived-mode-p (quote message-mode)) (not (message-in-body-p)))= nil (let* ((p (line-beginning-position)) (element (save-excursion (beginni= ng-of-line) (org-element-at-point))) (type (org-element-type element)) (pos= t-affiliated (org-element-property :post-affiliated element))) (if (< p pos= t-affiliated) nil (cond ((eql type (quote comment)) (looking-at "[ ]*# ?")= (match-string 0)) ((eql type (quote footnote-definition)) "") ((memql type= (quote (item plain-list))) (make-string (org-list-item-body-column post-af= filiated) 32)) ((eql type (quote paragraph)) (let ((parent ...)) (cond (...= ...) (... ...) (t "")))) ((eql type (quote comment-block)) (let* ((cbeg ..= .) (cend ...)) (if (and ... ...) (progn ...)))))))) (save-restriction (widen) (if (and (derived-mode-p (quote message-mode)) = (not (message-in-body-p))) nil (let* ((p (line-beginning-position)) (elemen= t (save-excursion (beginning-of-line) (org-element-at-point))) (type (org-e= lement-type element)) (post-affiliated (org-element-property :post-affiliat= ed element))) (if (< p post-affiliated) nil (cond ((eql type (quote comment= )) (looking-at "[ ]*# ?") (match-string 0)) ((eql type (quote footnote-def= inition)) "") ((memql type (quote ...)) (make-string (org-list-item-body-co= lumn post-affiliated) 32)) ((eql type (quote paragraph)) (let (...) (cond .= .. ... ...))) ((eql type (quote comment-block)) (let* (... ...) (if ... ...= )))))))) (save-excursion (save-restriction (widen) (if (and (derived-mode-p (quote= message-mode)) (not (message-in-body-p))) nil (let* ((p (line-beginning-po= sition)) (element (save-excursion (beginning-of-line) (org-element-at-point= ))) (type (org-element-type element)) (post-affiliated (org-element-propert= y :post-affiliated element))) (if (< p post-affiliated) nil (cond ((eql typ= e ...) (looking-at "[ ]*# ?") (match-string 0)) ((eql type ...) "") ((memq= l type ...) (make-string ... 32)) ((eql type ...) (let ... ...)) ((eql type= ...) (let* ... ...)))))))) org-adaptive-fill-function() (let* ((fill-prefix (org-adaptive-fill-function)) (adaptive-fill-mode (no= t (equal fill-prefix "")))) (if fill-prefix (progn (do-auto-fill)))) (progn (let* ((fill-prefix (org-adaptive-fill-function)) (adaptive-fill-m= ode (not (equal fill-prefix "")))) (if fill-prefix (progn (do-auto-fill))))) (if (and fc (> (current-column) fc)) (progn (let* ((fill-prefix (org-adap= tive-fill-function)) (adaptive-fill-mode (not (equal fill-prefix "")))) (if= fill-prefix (progn (do-auto-fill)))))) (let ((fc (current-fill-column))) (if (and fc (> (current-column) fc)) (p= rogn (let* ((fill-prefix (org-adaptive-fill-function)) (adaptive-fill-mode = (not (equal fill-prefix "")))) (if fill-prefix (progn (do-auto-fill))))))) org-auto-fill-function() self-insert-command(1) (cond ((and org-use-speed-commands (setq org-speed-command (run-hook-with= -args-until-success (quote org-speed-command-hook) (this-command-keys)))) (= cond ((commandp org-speed-command) (setq this-command org-speed-command) (c= all-interactively org-speed-command)) ((functionp org-speed-command) (funca= ll org-speed-command)) ((and org-speed-command (listp org-speed-command)) (= eval org-speed-command)) (t (let (org-use-speed-commands) (call-interactive= ly (quote org-self-insert-command)))))) ((and (org-table-p) (progn (and (fe= aturep (quote org-table)) org-table-auto-blank-field (member last-command (= quote (org-cycle org-return org-shifttab org-ctrl-c-ctrl-c yas/expand))) (i= f (or (equal ... 32) (looking-at "[^|\n]* |")) (let (org-table-may-need-up= date) (org-table-blank-field)) (org-table-blank-field))) t) (eq N 1) (looki= ng-at "[^|\n]* |")) (let (org-table-may-need-update) (goto-char (1- (match= -end 0))) (backward-delete-char 1) (goto-char (match-beginning 0)) (self-in= sert-command N))) (t (setq org-table-may-need-update t) (self-insert-comman= d N) (org-fix-tags-on-the-fly) (if org-self-insert-cluster-for-undo (if (no= t (eq last-command (quote org-self-insert-command))) (setq org-self-insert-= command-undo-counter 1) (if (>=3D org-self-insert-command-undo-counter 20) = (setq org-self-insert-command-undo-counter 1) (and (> org-self-insert-comma= nd-undo-counter 0) buffer-undo-list (listp buffer-undo-list) (not (cadr buf= fer-undo-list)) (setcdr buffer-undo-list (cddr buffer-undo-list))) (setq or= g-self-insert-command-undo-counter (1+ org-self-insert-command-undo-counter= ))))))) org-self-insert-command(1) call-interactively(org-self-insert-command nil nil) --8<---------------cut here---------------end--------------->8--- Best regards, Seb GNU Emacs 24.2.50.1 (i386-mingw-nt5.1.2600) of 2012-10-22 on DANI-PC Org-mode version 7.9.2 (release_7.9.2-533-g07c889 @ d:/home/sva/src/org-mod= e/lisp/) --=20 Sebastien Vauban