From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Bug: Wrong type argument: Integer or marker-p, nil Date: Fri, 31 Jan 2014 08:50:50 -0500 Message-ID: <87k3dg45vp.fsf@gmail.com> References: <87r47oia47.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37266) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W9EUv-0008Cm-S1 for emacs-orgmode@gnu.org; Fri, 31 Jan 2014 08:51:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W9EUp-00063C-SO for emacs-orgmode@gnu.org; Fri, 31 Jan 2014 08:51:09 -0500 Received: from plane.gmane.org ([80.91.229.3]:52179) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W9EUp-00062v-E6 for emacs-orgmode@gnu.org; Fri, 31 Jan 2014 08:51:03 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1W9EUn-0001DG-Mh for emacs-orgmode@gnu.org; Fri, 31 Jan 2014 14:51:01 +0100 Received: from pool-98-110-175-184.bstnma.fios.verizon.net ([98.110.175.184]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 31 Jan 2014 14:51:01 +0100 Received: from ndokos by pool-98-110-175-184.bstnma.fios.verizon.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 31 Jan 2014 14:51:01 +0100 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@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Bastien writes: > Rustom Mody writes: > >> For the below file, if I place the cursor in the right column >> and give C-c C-c I get the above error > > I can't reproduce this -- can you send a backtrace? This form (org-element-property :contents-begin context) seems to be returning nil. Debugger entered--Lisp error: (wrong-type-argument integer-or-marker-p nil) goto-char(nil) (if (org-at-TBLFM-p) (progn (require (quote org-table)) (org-table-calc-c= urrent-TBLFM)) (goto-char (org-element-property :contents-begin context)) (= org-call-with-arg (quote org-table-recalculate) (or arg t)) (orgtbl-send-ta= ble (quote maybe))) (save-excursion (if (org-at-TBLFM-p) (progn (require (quote org-table)) (= org-table-calc-current-TBLFM)) (goto-char (org-element-property :contents-b= egin context)) (org-call-with-arg (quote org-table-recalculate) (or arg t))= (orgtbl-send-table (quote maybe)))) (if (or (eq type (quote table)) (and (eq type (quote table-row)) (=3D (po= int) (org-element-property :end context)))) (save-excursion (if (org-at-TBL= FM-p) (progn (require (quote org-table)) (org-table-calc-current-TBLFM)) (g= oto-char (org-element-property :contents-begin context)) (org-call-with-arg= (quote org-table-recalculate) (or arg t)) (orgtbl-send-table (quote maybe)= ))) (org-table-maybe-eval-formula) (cond (arg (call-interactively (quote or= g-table-recalculate))) ((org-table-maybe-recalculate-line)) (t (org-table-a= lign)))) (let ((org-enable-table-editor t)) (if (or (eq type (quote table)) (and (= eq type (quote table-row)) (=3D (point) (org-element-property :end context)= ))) (save-excursion (if (org-at-TBLFM-p) (progn (require (quote org-table))= (org-table-calc-current-TBLFM)) (goto-char (org-element-property :contents= -begin context)) (org-call-with-arg (quote org-table-recalculate) (or arg t= )) (orgtbl-send-table (quote maybe)))) (org-table-maybe-eval-formula) (cond= (arg (call-interactively (quote org-table-recalculate))) ((org-table-maybe= -recalculate-line)) (t (org-table-align))))) (if (eq (org-element-property :type context) (quote table\.el)) (message = "Use C-c ' to edit table.el tables") (let ((org-enable-table-editor t)) (if= (or (eq type (quote table)) (and (eq type (quote table-row)) (=3D (point) = (org-element-property :end context)))) (save-excursion (if (org-at-TBLFM-p)= (progn (require (quote org-table)) (org-table-calc-current-TBLFM)) (goto-c= har (org-element-property :contents-begin context)) (org-call-with-arg (quo= te org-table-recalculate) (or arg t)) (orgtbl-send-table (quote maybe)))) (= org-table-maybe-eval-formula) (cond (arg (call-interactively (quote org-tab= le-recalculate))) ((org-table-maybe-recalculate-line)) (t (org-table-align)= ))))) (cond ((eql type (quote clock)) (org-clock-update-time-maybe)) ((eql type= (quote dynamic-block)) (save-excursion (goto-char (org-element-property :p= ost-affiliated context)) (org-update-dblock))) ((eql type (quote footnote-d= efinition)) (goto-char (org-element-property :post-affiliated context)) (ca= ll-interactively (quote org-footnote-action))) ((eql type (quote footnote-r= eference)) (call-interactively (quote org-footnote-action))) ((memql type (= quote (headline inlinetask))) (save-excursion (goto-char (org-element-prope= rty :begin context)) (call-interactively (quote org-set-tags)))) ((eql type= (quote item)) (let* ((box (org-element-property :checkbox context)) (struc= t (org-element-property :structure context)) (old-struct (copy-tree struct)= ) (parents (org-list-parents-alist struct)) (prevs (org-list-prevs-alist st= ruct)) (orderedp (org-not-nil (org-entry-get nil "ORDERED")))) (org-list-se= t-checkbox (org-element-property :begin context) struct (cond ((equal arg (= quote ...)) "[-]") ((and (not box) (equal arg ...)) "[ ]") ((or (not box) (= equal arg ...)) nil) ((eq box (quote on)) "[ ]") (t "[X]"))) (org-list-stru= ct-fix-ind struct parents 2) (org-list-struct-fix-item-end struct) (org-lis= t-struct-fix-bul struct prevs) (org-list-struct-fix-ind struct parents) (le= t ((block-item (org-list-struct-fix-box struct parents prevs orderedp))) (i= f (and box (equal struct old-struct)) (if (equal arg (quote ...)) (message = "Checkboxes already reset") (user-error "Cannot toggle this checkbox: %s" (= if ... "all subitems checked" "unchecked subitems"))) (org-list-struct-appl= y-struct struct old-struct) (org-update-checkbox-count-maybe)) (if block-it= em (progn (message "Checkboxes were removed due to empty box at line %d" (o= rg-current-line block-item))))))) ((eql type (quote keyword)) (let ((org-in= hibit-startup-visibility-stuff t) (org-startup-align-all-tables nil)) (if (= boundp (quote org-table-coordinate-overlays)) (progn (mapc (quote delete-ov= erlay) org-table-coordinate-overlays) (setq org-table-coordinate-overlays n= il))) (let ((--data (org-outline-overlay-data (quote use-markers))) --rtn) = (unwind-protect (progn (setq --rtn (progn ...)) (org-set-outline-overlay-da= ta --data)) (if (quote use-markers) (progn (mapc ... --data)))) --rtn)) (me= ssage "Local setup has been refreshed")) ((eql type (quote plain-list)) (le= t* ((begin (org-element-property :contents-begin context)) (beginm (move-ma= rker (make-marker) begin)) (struct (org-element-property :structure context= )) (old-struct (copy-tree struct)) (first-box (save-excursion (goto-char be= gin) (looking-at org-list-full-item-re) (match-string-no-properties 3))) (n= ew-box (cond ((equal arg ...) "[-]") ((equal arg ...) (if first-box nil "[ = ]")) ((equal first-box "[X]") "[ ]") (t "[X]")))) (cond (arg (mapc (functio= n (lambda ... ...)) (org-list-get-all-items begin struct (org-list-prevs-al= ist struct)))) ((and first-box (eq (point) begin)) (org-list-set-checkbox b= egin struct new-box))) (org-list-write-struct struct (org-list-parents-alis= t struct) old-struct) (org-update-checkbox-count-maybe) (save-excursion (go= to-char beginm) (org-list-send-list (quote maybe))))) ((memql type (quote (= property-drawer node-property))) (call-interactively (quote org-property-ac= tion))) ((memql type (quote (radio-target target))) (call-interactively (qu= ote org-update-radio-target-regexp))) ((eql type (quote statistics-cookie))= (call-interactively (quote org-update-statistics-cookies))) ((memql type (= quote (table table-cell table-row))) (if (eq (org-element-property :type co= ntext) (quote table\.el)) (message "Use C-c ' to edit table.el tables") (le= t ((org-enable-table-editor t)) (if (or (eq type (quote table)) (and (eq ty= pe ...) (=3D ... ...))) (save-excursion (if (org-at-TBLFM-p) (progn ... ...= ) (goto-char ...) (org-call-with-arg ... ...) (orgtbl-send-table ...))) (or= g-table-maybe-eval-formula) (cond (arg (call-interactively ...)) ((org-tabl= e-maybe-recalculate-line)) (t (org-table-align))))))) ((eql type (quote tim= estamp)) (org-timestamp-change 0 (quote day))) (t (or (run-hook-with-args-u= ntil-success (quote org-ctrl-c-ctrl-c-final-hook)) (user-error "C-c C-c can= do nothing useful at this location")))) (if (save-excursion (beginning-of-line) (looking-at "[ ]*$")) (or (run-h= ook-with-args-until-success (quote org-ctrl-c-ctrl-c-final-hook)) (user-err= or "C-c C-c can do nothing useful at this location")) (cond ((eql type (quo= te link)) (setq context (org-element-property :parent context)) (setq type = (org-element-type context))) ((memql type (quote (bold code entity export-s= nippet inline-babel-call inline-src-block italic latex-fragment line-break = macro strike-through subscript superscript underline verbatim))) (while (an= d (setq context (org-element-property :parent context)) (not (memq (setq ty= pe ...) (quote ...))))))) (if (eq type (quote paragraph)) (progn (let ((par= ent (org-element-property :parent context))) (if (and (eq (org-element-type= parent) (quote item)) (=3D (point-at-bol) (org-element-property :begin par= ent))) (progn (setq context parent type (quote item))))))) (cond ((eql type= (quote clock)) (org-clock-update-time-maybe)) ((eql type (quote dynamic-bl= ock)) (save-excursion (goto-char (org-element-property :post-affiliated con= text)) (org-update-dblock))) ((eql type (quote footnote-definition)) (goto-= char (org-element-property :post-affiliated context)) (call-interactively (= quote org-footnote-action))) ((eql type (quote footnote-reference)) (call-i= nteractively (quote org-footnote-action))) ((memql type (quote (headline in= linetask))) (save-excursion (goto-char (org-element-property :begin context= )) (call-interactively (quote org-set-tags)))) ((eql type (quote item)) (le= t* ((box (org-element-property :checkbox context)) (struct (org-element-pro= perty :structure context)) (old-struct (copy-tree struct)) (parents (org-li= st-parents-alist struct)) (prevs (org-list-prevs-alist struct)) (orderedp (= org-not-nil (org-entry-get nil "ORDERED")))) (org-list-set-checkbox (org-el= ement-property :begin context) struct (cond ((equal arg ...) "[-]") ((and .= .. ...) "[ ]") ((or ... ...) nil) ((eq box ...) "[ ]") (t "[X]"))) (org-lis= t-struct-fix-ind struct parents 2) (org-list-struct-fix-item-end struct) (o= rg-list-struct-fix-bul struct prevs) (org-list-struct-fix-ind struct parent= s) (let ((block-item (org-list-struct-fix-box struct parents prevs orderedp= ))) (if (and box (equal struct old-struct)) (if (equal arg ...) (message "C= heckboxes already reset") (user-error "Cannot toggle this checkbox: %s" ...= )) (org-list-struct-apply-struct struct old-struct) (org-update-checkbox-co= unt-maybe)) (if block-item (progn (message "Checkboxes were removed due to = empty box at line %d" ...)))))) ((eql type (quote keyword)) (let ((org-inhi= bit-startup-visibility-stuff t) (org-startup-align-all-tables nil)) (if (bo= undp (quote org-table-coordinate-overlays)) (progn (mapc (quote delete-over= lay) org-table-coordinate-overlays) (setq org-table-coordinate-overlays nil= ))) (let ((--data (org-outline-overlay-data ...)) --rtn) (unwind-protect (p= rogn (setq --rtn ...) (org-set-outline-overlay-data --data)) (if (quote use= -markers) (progn ...))) --rtn)) (message "Local setup has been refreshed"))= ((eql type (quote plain-list)) (let* ((begin (org-element-property :conten= ts-begin context)) (beginm (move-marker (make-marker) begin)) (struct (org-= element-property :structure context)) (old-struct (copy-tree struct)) (firs= t-box (save-excursion (goto-char begin) (looking-at org-list-full-item-re) = (match-string-no-properties 3))) (new-box (cond (... "[-]") (... ...) (... = "[ ]") (t "[X]")))) (cond (arg (mapc (function ...) (org-list-get-all-items= begin struct ...))) ((and first-box (eq ... begin)) (org-list-set-checkbox= begin struct new-box))) (org-list-write-struct struct (org-list-parents-al= ist struct) old-struct) (org-update-checkbox-count-maybe) (save-excursion (= goto-char beginm) (org-list-send-list (quote maybe))))) ((memql type (quote= (property-drawer node-property))) (call-interactively (quote org-property-= action))) ((memql type (quote (radio-target target))) (call-interactively (= quote org-update-radio-target-regexp))) ((eql type (quote statistics-cookie= )) (call-interactively (quote org-update-statistics-cookies))) ((memql type= (quote (table table-cell table-row))) (if (eq (org-element-property :type = context) (quote table\.el)) (message "Use C-c ' to edit table.el tables") (= let ((org-enable-table-editor t)) (if (or (eq type ...) (and ... ...)) (sav= e-excursion (if ... ... ... ... ...)) (org-table-maybe-eval-formula) (cond = (arg ...) (...) (t ...)))))) ((eql type (quote timestamp)) (org-timestamp-c= hange 0 (quote day))) (t (or (run-hook-with-args-until-success (quote org-c= trl-c-ctrl-c-final-hook)) (user-error "C-c C-c can do nothing useful at thi= s location"))))) (let* ((context (org-element-context)) (type (org-element-type context)))= (if (save-excursion (beginning-of-line) (looking-at "[ ]*$")) (or (run-ho= ok-with-args-until-success (quote org-ctrl-c-ctrl-c-final-hook)) (user-erro= r "C-c C-c can do nothing useful at this location")) (cond ((eql type (quot= e link)) (setq context (org-element-property :parent context)) (setq type (= org-element-type context))) ((memql type (quote (bold code entity export-sn= ippet inline-babel-call inline-src-block italic latex-fragment line-break m= acro strike-through subscript superscript underline verbatim))) (while (and= (setq context (org-element-property :parent context)) (not (memq ... ...))= )))) (if (eq type (quote paragraph)) (progn (let ((parent (org-element-prop= erty :parent context))) (if (and (eq ... ...) (=3D ... ...)) (progn (setq c= ontext parent type ...)))))) (cond ((eql type (quote clock)) (org-clock-upd= ate-time-maybe)) ((eql type (quote dynamic-block)) (save-excursion (goto-ch= ar (org-element-property :post-affiliated context)) (org-update-dblock))) (= (eql type (quote footnote-definition)) (goto-char (org-element-property :po= st-affiliated context)) (call-interactively (quote org-footnote-action))) (= (eql type (quote footnote-reference)) (call-interactively (quote org-footno= te-action))) ((memql type (quote (headline inlinetask))) (save-excursion (g= oto-char (org-element-property :begin context)) (call-interactively (quote = org-set-tags)))) ((eql type (quote item)) (let* ((box (org-element-property= :checkbox context)) (struct (org-element-property :structure context)) (ol= d-struct (copy-tree struct)) (parents (org-list-parents-alist struct)) (pre= vs (org-list-prevs-alist struct)) (orderedp (org-not-nil ...))) (org-list-s= et-checkbox (org-element-property :begin context) struct (cond (... "[-]") = (... "[ ]") (... nil) (... "[ ]") (t "[X]"))) (org-list-struct-fix-ind stru= ct parents 2) (org-list-struct-fix-item-end struct) (org-list-struct-fix-bu= l struct prevs) (org-list-struct-fix-ind struct parents) (let ((block-item = ...)) (if (and box ...) (if ... ... ...) (org-list-struct-apply-struct stru= ct old-struct) (org-update-checkbox-count-maybe)) (if block-item (progn ...= ))))) ((eql type (quote keyword)) (let ((org-inhibit-startup-visibility-stu= ff t) (org-startup-align-all-tables nil)) (if (boundp (quote org-table-coor= dinate-overlays)) (progn (mapc ... org-table-coordinate-overlays) (setq org= -table-coordinate-overlays nil))) (let ((--data ...) --rtn) (unwind-protect= (progn ... ...) (if ... ...)) --rtn)) (message "Local setup has been refre= shed")) ((eql type (quote plain-list)) (let* ((begin (org-element-property = :contents-begin context)) (beginm (move-marker ... begin)) (struct (org-ele= ment-property :structure context)) (old-struct (copy-tree struct)) (first-b= ox (save-excursion ... ... ...)) (new-box (cond ... ... ... ...))) (cond (a= rg (mapc ... ...)) ((and first-box ...) (org-list-set-checkbox begin struct= new-box))) (org-list-write-struct struct (org-list-parents-alist struct) o= ld-struct) (org-update-checkbox-count-maybe) (save-excursion (goto-char beg= inm) (org-list-send-list (quote maybe))))) ((memql type (quote (property-dr= awer node-property))) (call-interactively (quote org-property-action))) ((m= emql type (quote (radio-target target))) (call-interactively (quote org-upd= ate-radio-target-regexp))) ((eql type (quote statistics-cookie)) (call-inte= ractively (quote org-update-statistics-cookies))) ((memql type (quote (tabl= e table-cell table-row))) (if (eq (org-element-property :type context) (quo= te table\.el)) (message "Use C-c ' to edit table.el tables") (let ((org-ena= ble-table-editor t)) (if (or ... ...) (save-excursion ...) (org-table-maybe= -eval-formula) (cond ... ... ...))))) ((eql type (quote timestamp)) (org-ti= mestamp-change 0 (quote day))) (t (or (run-hook-with-args-until-success (qu= ote org-ctrl-c-ctrl-c-final-hook)) (user-error "C-c C-c can do nothing usef= ul at this location")))))) (cond ((or (and (boundp (quote org-clock-overlays)) org-clock-overlays) o= rg-occur-highlights org-latex-fragment-image-overlays) (and (boundp (quote = org-clock-overlays)) (org-clock-remove-overlays)) (org-remove-occur-highlig= hts) (org-remove-latex-fragment-image-overlays) (message "Temporary highlig= hts/overlays removed from current buffer")) ((and (local-variable-p (quote = org-finish-function) (current-buffer)) (fboundp org-finish-function)) (func= all org-finish-function)) ((run-hook-with-args-until-success (quote org-ctr= l-c-ctrl-c-hook))) (t (let* ((context (org-element-context)) (type (org-ele= ment-type context))) (if (save-excursion (beginning-of-line) (looking-at "[= ]*$")) (or (run-hook-with-args-until-success (quote org-ctrl-c-ctrl-c-fin= al-hook)) (user-error "C-c C-c can do nothing useful at this location")) (c= ond ((eql type (quote link)) (setq context (org-element-property :parent co= ntext)) (setq type (org-element-type context))) ((memql type (quote ...)) (= while (and ... ...)))) (if (eq type (quote paragraph)) (progn (let (...) (i= f ... ...)))) (cond ((eql type (quote clock)) (org-clock-update-time-maybe)= ) ((eql type (quote dynamic-block)) (save-excursion (goto-char ...) (org-up= date-dblock))) ((eql type (quote footnote-definition)) (goto-char (org-elem= ent-property :post-affiliated context)) (call-interactively (quote org-foot= note-action))) ((eql type (quote footnote-reference)) (call-interactively (= quote org-footnote-action))) ((memql type (quote ...)) (save-excursion (got= o-char ...) (call-interactively ...))) ((eql type (quote item)) (let* (... = ... ... ... ... ...) (org-list-set-checkbox ... struct ...) (org-list-struc= t-fix-ind struct parents 2) (org-list-struct-fix-item-end struct) (org-list= -struct-fix-bul struct prevs) (org-list-struct-fix-ind struct parents) (let= ... ... ...))) ((eql type (quote keyword)) (let (... ...) (if ... ...) (le= t ... ... --rtn)) (message "Local setup has been refreshed")) ((eql type (q= uote plain-list)) (let* (... ... ... ... ... ...) (cond ... ...) (org-list-= write-struct struct ... old-struct) (org-update-checkbox-count-maybe) (save= -excursion ... ...))) ((memql type (quote ...)) (call-interactively (quote = org-property-action))) ((memql type (quote ...)) (call-interactively (quote= org-update-radio-target-regexp))) ((eql type (quote statistics-cookie)) (c= all-interactively (quote org-update-statistics-cookies))) ((memql type (quo= te ...)) (if (eq ... ...) (message "Use C-c ' to edit table.el tables") (le= t ... ...))) ((eql type (quote timestamp)) (org-timestamp-change 0 (quote d= ay))) (t (or (run-hook-with-args-until-success ...) (user-error "C-c C-c ca= n do nothing useful at this location")))))))) org-ctrl-c-ctrl-c(nil) --=20 Nick