emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* One broken property drawer prevents setting of any property
@ 2014-05-06  5:07 Eric Abrahamsen
  2014-05-23  5:56 ` Bastien
  0 siblings, 1 reply; 4+ messages in thread
From: Eric Abrahamsen @ 2014-05-06  5:07 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: Nicolas Goaziou

[-- Attachment #1: Type: text/plain, Size: 1176 bytes --]

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-read-property-name()
  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...

Eric


[-- Attachment #2: test.org --]
[-- Type: application/vnd.lotus-organizer, Size: 59 bytes --]

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

end of thread, other threads:[~2014-05-23  9:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-06  5:07 One broken property drawer prevents setting of any property Eric Abrahamsen
2014-05-23  5:56 ` Bastien
2014-05-23  8:55   ` Eric Abrahamsen
2014-05-23  9:07     ` 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).