Xavier Maillard <xav...@maillard.im> writes:

> In fact, the fix has consisted in adding one empty PROPERTY block per
> heading element (I don't know why though). Now I am looking for a way
> to delete all of them :/
>
> How would you do that ?

Org-mode comes with the function `org-remove-empty-drawer-at', so
removing empty :PROPERTIES: becomes trivial

M-:

#+BEGIN_SRC
(with-current-buffer "monsysteme.org"
  (goto-char (point-min))
  (while (re-search-forward ":PROPERTIES:" nil t)
    (save-excursion (org-remove-empty-drawer-at (match-beginning 0)))))
#+END_SRC

There is probably something better to do it (replacing
`with-current-buffer' comes to mind for example), but it works.

Regards
-- Xavier.

Reply via email to