Vins Xiro <v...@posteo.net> writes:

> I have a lot of plain lists arranged as follows:
>
> 1. Foo
> :HIDDEN:
>
> :END:
> 2. Bar
> ...
>
> org-lint issues such warnings:
>
>      9 nil   Bullet counter "2. " is not the same with item position 1.  
> Consider adding manual [@2] counter.
>
> So the drawers should be indented.

Yup. Unindented text terminates a list.

> Well, there is org-indent-drawer, but it does not work as I expect
> since commit af300bd5b, as I can see.

Are you sure?
af300bd5b0 is a 12 years old commit.

> Place the cursor at the beginning of the first line of the drawer and
> execute the org-indent-drawer command. The drawer is still unindented,
> dispite the misleading "Drawer at point indented" message. Have been
> tested on many Org and Emacs versions, including current development
> ones.
>
> Workaround: insert at least one space at the beginning of the line and
> org-indent-drawer will work all out.
> ...
> It seems to be a bug in org--get-expected-indentation.
>
> If it is not a bug, but intended behaviour, what is the proper way to
> indent drawers in plain lists?

It is not exactly a bug - 0 indentation is a perfectly valid indentation
position in some cases. What org-indent-region does is indenting region
consistently. For example, it makes sure that :HIDDEN: and :END: will be
indented equally (0).

Another question is that it would be nice, for example, to switch
between alternative indentations (no indentation vs. list indentation)
when you re-indent repeatedly.

So, I'd call your report a feature request, unless you show that it was
a recent feature or behavior regression (not 12 years ago - that's too
far in the past to revert to previous behavior).

As a workaround, check out C-x tab (M-x indent-rigidly) command.

-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>

Reply via email to