[Top][All Lists]

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

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

From: Eric Abrahamsen
Subject: Re: [O] One broken property drawer prevents setting of any property
Date: Fri, 23 May 2014 16:55:26 +0800
User-agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/24.4.50 (gnu/linux)

Bastien <address@hidden> writes:

> Hi Eric,
> Eric Abrahamsen <address@hidden> writes:
>> By passing the FORCE argument to `org-get-property-block', the broken
>> block ends up getting silently repaired, and everything works as normal.
> Can you show this as a patch?
>> I'm not sure, however, that silently repairing things without the user's
>> knowledge is the right thing to do...
> We can warn the user with a temporary message, or ask him for
> confirmation.  Or provide a helper command to repair drawers and
> advertize it instead of throwing an error.
> I'll look into this after you send me the patch.

The more I thought about it, the more it seemed the silent repair is a
bad idea: it's not really repair, it's just sticking a new :END: in, and
will very likely result in cruft in the buffer. This patch wraps the
scan in catch/throw and asks users if they want to repair broken
drawers. Since the y-or-no-p stops at the broken drawer, it should be
useful for manual fixing.


Attachment: 0001-Warn-users-of-malformed-property-drawers.patch
Description: Text Data

reply via email to

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