emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Jonathan Johnson <Jonathan.Johnson@Symphero.mn.org>
To: emacs-orgmode@gnu.org
Subject: Bug: Passing nil argument in org-refresh-properties [8.2.5h (8.2.5h-98-g0820d0-elpa @ /home/jjohnson/.emacs.d/elpa/org-20140407/)]
Date: Mon, 07 Apr 2014 13:06:27 -0500	[thread overview]
Message-ID: <1396893987.3067.5.camel@aristeros.symphero.mn.org> (raw)

Org Mode community,

I updated to the latest ELPA release today and got an error loading an
agenda with 'C-c a a'.

The problem can be reproduced by including a properly-formatted Org file
in the agenda list.  To present that formatting, that Org file should
end with an outline heading that has an effort property set in its
properties.

The problem stems from the last line of org-refresh-properties (line
9298), in which (point-at-eol) was replaced with (outline-next-heading).
This is not an emacs versioning issue; in the 24.3 emacs release, as in
my version (a recent Cygwin version of Emacs), the outline-next-heading
function returns nil when there is no next heading after the point.

I worked around the problem by adding a dummy heading at the end of the
offending Org file, but a fix would be to add some conditional construct
that validates the return value from outline-next-heading to avoid
passing nil to put-text-property, or revert the code to using
(point-at-eol).  Not knowing more about the history of the code, and as
an amateur lisp hacker, I probably shouldn't make
recommendations...but...how would the following work:

...
    (put-text-property (point-at-bol) (or (outline-next-heading)
(point-max)) tprop p)...

It works for me, anyway.

My info:

Emacs  : GNU Emacs 24.3.1 (i686-pc-cygwin, GTK+ Version 3.8.2)
of 2013-08-14 on moufang
Package: Org-mode version 8.2.5h (8.2.5h-98-g0820d0-elpa
@ /home/jjohnson/.emacs.d/elpa/org-20140407/)

current state:
==============
(setq
org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point
org-babel-execute-safely-maybe)
org-agenda-todo-ignore-scheduled 'future
org-clock-persist 'history
org-tab-first-hook '(org-hide-block-toggle-maybe
org-src-native-tab-command-maybe org-babel-hide-result-toggle-maybe
      org-babel-header-arg-expand)
org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
org-cycle-hide-inline-tasks org-cycle-show-empty-lines
  org-optimize-window-after-visibility-change)
org-agenda-before-write-hook '(org-agenda-add-entry-text)
org-speed-command-hook '(org-speed-command-default-hook
org-babel-speed-command-hook)
org-blocker-hook '(org-block-todo-from-children-or-siblings-or-parent)
org-babel-pre-tangle-hook '(save-buffer)
org-occur-hook '(org-first-headline-recenter)
org-clock-history-length 10
org-log-done 'time
org-metaup-hook '(org-babel-load-in-session-maybe)
org-confirm-elisp-link-function 'yes-or-no-p
org-agenda-todo-ignore-deadlines 14
org-agenda-dim-blocked-tasks 'invisible
org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
org-agenda-include-diary t
org-enforce-todo-dependencies t
org-mode-hook '(org-clock-load #[nil "\300\301\302\303\304
$\207" [org-add-hook change-major-mode-hook org-show-block-all append
local] 5]
#[nil "\300\301\302\303\304$\207" [org-add-hook change-major-mode-hook
org-babel-show-result-all append local] 5]
org-babel-result-hide-spec org-babel-hide-all-hashes)
org-clock-idle-time 6
org-metadown-hook '(org-babel-pop-to-session-maybe)
org-agenda-files "/cygdrive/i/org/.agenda_files"
org-clock-report-include-clocking-task t
org-src-mode-hook '(org-src-babel-configure-edit-buffer
org-src-mode-configure-edit-buffer)
org-after-todo-state-change-hook '(org-clock-out-if-current)
org-after-todo-statistics-hook '(org-summary-todo)
org-confirm-shell-link-function 'yes-or-no-p
)

Regards,

-- 
Jonathan Johnson <Jonathan.Johnson@Symphero.mn.org>

             reply	other threads:[~2014-04-07 18:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-07 18:06 Jonathan Johnson [this message]
2014-04-11 10:01 ` Bug: Passing nil argument in org-refresh-properties [8.2.5h (8.2.5h-98-g0820d0-elpa @ /home/jjohnson/.emacs.d/elpa/org-20140407/)] 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=1396893987.3067.5.camel@aristeros.symphero.mn.org \
    --to=jonathan.johnson@symphero.mn.org \
    --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).