Hello, Bastien writes: > The version I just pushed does not handle this kind of problem. > If you think it's worth the trouble, can you have a look at it? I've checked the code, and the `org-insert-drawer' is actually not what I had in mind. To me, there are really two types of drawers: system drawers and user's drawers (which I'll simply call "drawers" from now). System drawers usually go just below the current headline (which is mandatory) and are inserted automatically by some Org mechanism. Drawers can go anywhere, even before the first headline, and are usually inserted manually. Being interactive, `org-insert-drawer' is clearly user-oriented. An user calling this function will probably want to insert a drawer at point (if not around region), much less likely to insert a system drawer manually. Thus, that function shouldn't be used for `org-insert-property-drawer' internals, which needs to move point back to the headline. Therefore, I suggest the following draft of a patch, that mostly reverts commit splitting `org-insert-property-drawer' and makes `org-insert-drawer' more user friendly. It provides the following facilities: - headline inclusion check, - drawer insertion without requiring an headline above, - skip trailing blank lines (i.e. to wrap buffer around a just marked paragraph), - Ignore system drawer's names in completion list. What do you think? Regards, -- Nicolas Goaziou