From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [bug?] org-repair-property-drawers does not repair whole file Date: Sun, 08 Mar 2015 22:45:28 +0100 Message-ID: <87d24j40zr.fsf@nicolasgoaziou.fr> References: <20150225233650.GA6671@boo.workgroup> <87sidf4e5b.fsf@nicolasgoaziou.fr> <20150308200218.GA13900@boo.workgroup> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51472) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YUizp-0007T4-2m for emacs-orgmode@gnu.org; Sun, 08 Mar 2015 17:44:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YUizk-0001jh-K6 for emacs-orgmode@gnu.org; Sun, 08 Mar 2015 17:44:25 -0400 Received: from relay6-d.mail.gandi.net ([2001:4b98:c:538::198]:39951) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YUizk-0001iq-Dt for emacs-orgmode@gnu.org; Sun, 08 Mar 2015 17:44:20 -0400 Received: from mfilter20-d.gandi.net (mfilter20-d.gandi.net [217.70.178.148]) by relay6-d.mail.gandi.net (Postfix) with ESMTP id A3429FB88B for ; Sun, 8 Mar 2015 22:44:15 +0100 (CET) Received: from relay6-d.mail.gandi.net ([217.70.183.198]) by mfilter20-d.gandi.net (mfilter20-d.gandi.net [10.0.15.180]) (amavisd-new, port 10024) with ESMTP id 8q-qHo5Kl0N5 for ; Sun, 8 Mar 2015 22:44:14 +0100 (CET) Received: from selenimh (unknown [91.224.148.150]) (Authenticated sender: mail@nicolasgoaziou.fr) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 2515CFB886 for ; Sun, 8 Mar 2015 22:44:13 +0100 (CET) In-Reply-To: <20150308200218.GA13900@boo.workgroup> (Gregor Zattler's message of "Sun, 8 Mar 2015 21:02:18 +0100") 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 Gregor Zattler writes: > Sadly no: I reapplied `org-repair-property-drawers' on my org > file with no customisation at all: > > emacs-snapshot -Q -nw -L /home/grfz/src/org-mode/lisp/ file.org ~/src/org= -mode/etc/ORG-NEWS > > I loaded `org-repair-property-drawers' from > ~/src/org-mode/etc/ORG-NEWS and executed it in file.org. Result > is =E2=80=99(nil nil nil nil nil nil nil nil nil nil nil nil ... )=E2=80= =99 and > the buffer file.org remains unmodified. Doesn't the function fix the "anon" file you sent? Is it possible to have access to the file? You might want to hide contents first with the following function (defun scramble-contents () (interactive) (let ((tree (org-element-parse-buffer))) (org-element-map tree '(code comment comment-block example-block fixe= d-width keyword link node-property plain-text ve= rbatim) (lambda (obj) (cl-case (org-element-type obj) ((code comment comment-block example-block fixed-width keyword node-property verbatim) (let ((value (org-element-property :value obj))) (org-element-put-property obj :value (replace-regexp-in-string "[[:alnum:]]" "x" valu= e)))) (link (unless (string=3D (org-element-property :type obj) "radio") (org-element-put-property obj :raw-link "http://orgmode.org"= ))) (plain-text (org-element-set-element obj (replace-regexp-in-string "[[:alnum:]]" "x" obj))))) nil nil nil t) (let ((buffer (get-buffer-create "*Scrambled text*"))) (with-current-buffer buffer (insert (org-element-interpret-data tree)) (goto-char (point-min))) (switch-to-buffer buffer)))) Regards,