emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug: Passing nil argument in org-refresh-properties [8.2.5h (8.2.5h-98-g0820d0-elpa @ /home/jjohnson/.emacs.d/elpa/org-20140407/)]
@ 2014-04-07 18:06 Jonathan Johnson
  2014-04-11 10:01 ` Bastien
  0 siblings, 1 reply; 2+ messages in thread
From: Jonathan Johnson @ 2014-04-07 18:06 UTC (permalink / raw)
  To: emacs-orgmode

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>

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Bug: Passing nil argument in org-refresh-properties [8.2.5h (8.2.5h-98-g0820d0-elpa @ /home/jjohnson/.emacs.d/elpa/org-20140407/)]
  2014-04-07 18:06 Bug: Passing nil argument in org-refresh-properties [8.2.5h (8.2.5h-98-g0820d0-elpa @ /home/jjohnson/.emacs.d/elpa/org-20140407/)] Jonathan Johnson
@ 2014-04-11 10:01 ` Bastien
  0 siblings, 0 replies; 2+ messages in thread
From: Bastien @ 2014-04-11 10:01 UTC (permalink / raw)
  To: Jonathan Johnson; +Cc: emacs-orgmode

Hi Jonathan,

Jonathan Johnson <Jonathan.Johnson@Symphero.mn.org> writes:

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

Yes, this should now be fixed.

-- 
 Bastien

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-04-11 13:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-07 18:06 Bug: Passing nil argument in org-refresh-properties [8.2.5h (8.2.5h-98-g0820d0-elpa @ /home/jjohnson/.emacs.d/elpa/org-20140407/)] Jonathan Johnson
2014-04-11 10:01 ` Bastien

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).