Running emacs 25.2.2.
To add a property, when I C-c C-x p
while on a headline in an org file, it creates an error (prior to C-c C-x p
, I had done M-x toggle-debug-on-error
to produce a detailed stack trace):
Debugger entered--Lisp error: (wrong-type-argument integer-or-marker-p nil)
org-buffer-property-keys(nil t t)
org-read-property-name()
org-set-property(nil nil)
funcall-interactively(org-set-property nil nil)
call-interactively(org-set-property nil nil)
command-execute(org-set-property)
After I M-x load-library RET org.el RET
it produces the following stack trace:
Debugger entered--Lisp error: (wrong-type-argument integer-or-marker-p nil)
goto-char(nil)
(while (re-search-forward org-property-start-re nil t) (setq range (org-get-property-block)) (goto-char (car range)) (while (re-search-forward org-property-re (cdr range) t) (let* ((x (org-match-string-no-properties 2))) (if (member x rtn) rtn (setq rtn (cons x rtn))))) (outline-next-heading))
(save-restriction (widen) (goto-char (point-min)) (while (re-search-forward org-property-start-re nil t) (setq range (org-get-property-block)) (goto-char (car range)) (while (re-search-forward org-property-re (cdr range) t) (let* ((x (org-match-string-no-properties 2))) (if (member x rtn) rtn (setq rtn (cons x rtn))))) (outline-next-heading)))
(save-excursion (save-restriction (widen) (goto-char (point-min)) (while (re-search-forward org-property-start-re nil t) (setq range (org-get-property-block)) (goto-char (car range)) (while (re-search-forward org-property-re (cdr range) t) (let* ((x (org-match-string-no-properties 2))) (if (member x rtn) rtn (setq rtn (cons x rtn))))) (outline-next-heading))))
(let (rtn range cfmt s p) (save-excursion (save-restriction (widen) (goto-char (point-min)) (while (re-search-forward org-property-start-re nil t) (setq range (org-get-property-block)) (goto-char (car range)) (while (re-search-forward org-property-re (cdr range) t) (let* ((x ...)) (if (member x rtn) rtn (setq rtn ...)))) (outline-next-heading)))) (if include-specials (progn (setq rtn (append org-special-properties rtn)))) (if include-defaults (progn (mapc (function (lambda (x) (if (member x rtn) rtn (setq rtn ...)))) org-default-properties) (if (member org-effort-property rtn) rtn (setq rtn (cons org-effort-property rtn))))) (if include-columns (progn (save-excursion (save-restriction (widen) (goto-char (point-min)) (while (re-search-forward "^\\(#\\+COLUMNS:\\|[ ]*:COLUMNS:\\)[ ]*\\(.*\\)" nil t) (setq cfmt (match-string 2) s 0) (while (string-match "%[0-9]*\\([-[:alnum:]_]+\\)" cfmt s) (setq s ... p ...) (if ... nil ...))))))) (sort rtn (function (lambda (a b) (string< (upcase a) (upcase b))))))
org-buffer-property-keys(nil t t)
(let* ((completion-ignore-case t) (keys (org-buffer-property-keys nil t t)) (default-prop (or (save-excursion (let ((save-match-data-internal ...)) (unwind-protect (progn ... ...) (set-match-data save-match-data-internal ...)))) org-last-set-property)) (property (org-icompleting-read (concat "Property" (if default-prop (concat " [" default-prop "]") "") ": ") (mapcar (quote list) keys) nil nil nil nil default-prop))) (if (member property keys) property (or (cdr (assoc (downcase property) (mapcar (function (lambda ... ...)) keys))) property)))
org-read-property-name()
(or property (org-read-property-name))
(let* ((property (or property (org-read-property-name))) (value (or value (org-read-property-value property))) (fn (cdr (assoc property org-properties-postprocess-alist)))) (setq org-last-set-property property) (setq org-last-set-property-value (concat property ": " value)) (if fn (progn (setq value (funcall fn value)))) (if (equal (org-entry-get nil property) value) nil (org-entry-put nil property value)))
org-set-property(nil nil)
funcall-interactively(org-set-property nil nil)
call-interactively(org-set-property nil nil)
command-execute(org-set-property)
What is happening here? How do I set things right?
M-x toggle-debug-on-error
and then trigger the error again, and copy and paste the stack trace into your question.M-x load-library RET org.el RET
(to load the uncompiled version of the library).emacs -Q
that's also useful information. And if you can show a sample file which causes the problem, even better.M-x load-library RET org.el RET