From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: emacs-orgmode@gnu.org
Cc: Nicolas Goaziou <n.goaziou@gmail.com>
Subject: One broken property drawer prevents setting of any property
Date: Tue, 06 May 2014 13:07:51 +0800 [thread overview]
Message-ID: <87wqdzebq0.fsf@ericabrahamsen.net> (raw)
[-- 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 --]
next reply other threads:[~2014-05-06 20:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-06 5:07 Eric Abrahamsen [this message]
2014-05-23 5:56 ` One broken property drawer prevents setting of any property Bastien
2014-05-23 8:55 ` Eric Abrahamsen
2014-05-23 9:07 ` 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wqdzebq0.fsf@ericabrahamsen.net \
--to=eric@ericabrahamsen.net \
--cc=emacs-orgmode@gnu.org \
--cc=n.goaziou@gmail.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.