[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] One broken property drawer prevents setting of any property

From: Eric Abrahamsen
Subject: [O] One broken property drawer prevents setting of any property
Date: Tue, 06 May 2014 13:07:51 +0800
User-agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/24.3 (gnu/linux)

Looks like gmane's down for a bit, but presumably this will
eventually go through.

As I mentioned in the last message, if any property drawer in an org
file is malformed, it makes it impossible to set properties on any other
heading in the file. This is because, before the property is set, the
file is scanned for other valid property keys, and when the scanning
process hits the malformed drawer, it errors out.

The attached file, opened from emacs -Q, is enough to cause the error.
Trying to set a property on the second heading gives:

Debugger entered--Lisp error: (wrong-type-argument integer-or-marker-p nil)
  org-buffer-property-keys(nil t t)
  org-set-property(nil nil)
  call-interactively(org-set-property nil nil)

`org-buffer-property-keys' contains a call to `org-get-property-block',
which returns nil on a broken property drawer, and leads to the type
argument above.

By passing the FORCE argument to `org-get-property-block', the broken
block ends up getting silently repaired, and everything works as normal.
I'm not sure, however, that silently repairing things without the user's
knowledge is the right thing to do...


Attachment: test.org
Description: Lotus Organizer

reply via email to

[Prev in Thread] Current Thread [Next in Thread]