Dear org-mode developers, dear Nicolas, I invoked org-repair-property-drawers on a fairly large org-mode file. It did sort some PROPERTIES drawers in front of LOGBOOK ones but not all. Since I do not understand the logic of org-repair-property-drawers I prepared a file with the structure of the org-mode file after running org-repair-property-drawers on it: egrep "^\*+|^ *:PROPERTIES:|^ *:LOGBOOK:|^ *:END:" file.org |nl >headings-properties-logbook-numbered sed -e "s/\(^ \+[0-9]\+[[:space:]]*\*\+[[:space:]]*\)\(TODO\|INPROGRESS\|WAITING\|VERIFY\|DONE\|DELEGATED\|CANCELLED\|PUTOFF\|IDEA\)*\(.*$\)/\1\2/" headings-properties-logbook-numbered >headings-properties-logbook-numbered.anon I don’t how to isolate the bug or the circumstances which trigger it. The file headings-properties-logbook-numbered.anon is attached to this email. I hope it might be useful to you to find the bug. Via grep -A2 LOGBOOK headings-properties-logbook-numbered.anon|grep PROPERTIES I can see, that there are 18 occurrences where there is a PROPERTIES drawer after a LOGBOOK drawer instead before. Some of the corresponding headings had tags, some not. And also some of the not corresponding headings had tags and some not. Ciao, Gregor -- -... --- .-. . -.. ..--.. ...-.-