From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Abrahamsen Subject: One broken property drawer prevents setting of any property Date: Tue, 06 May 2014 13:07:51 +0800 Message-ID: <87wqdzebq0.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53176) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WhlYg-0002dP-8U for emacs-orgmode@gnu.org; Tue, 06 May 2014 16:01:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WhlYY-0004a1-Pv for emacs-orgmode@gnu.org; Tue, 06 May 2014 16:01:46 -0400 Received: from plane.gmane.org ([80.91.229.3]:57075) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WhlYY-0004Zo-KU for emacs-orgmode@gnu.org; Tue, 06 May 2014 16:01:38 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WhkBh-0001uT-7I for emacs-orgmode@gnu.org; Tue, 06 May 2014 20:33:57 +0200 Received: from 111.197.156.11 ([111.197.156.11]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 06 May 2014 20:33:57 +0200 Received: from eric by 111.197.156.11 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 06 May 2014 20:33:57 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Cc: Nicolas Goaziou --=-=-= Content-Type: text/plain 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 --=-=-= Content-Type: application/vnd.lotus-organizer Content-Disposition: attachment; filename=test.org Content-Transfer-Encoding: base64 KiBUZXN0IEhlYWRpbmcKOlBST1BFUlRJRVM6CjpPTkQ6CiogQW5vdGhlciB0ZXN0IGhlYWRpbmcK Cgo= --=-=-=--