* [BUG] The org-indent-drawer function does not work for drawers in plain lists since commit af300bd5b
@ 2025-02-22 19:35 Vins Xiro
2025-02-23 18:36 ` Ihor Radchenko
0 siblings, 1 reply; 3+ messages in thread
From: Vins Xiro @ 2025-02-22 19:35 UTC (permalink / raw)
To: emacs-orgmode
Hi, all,
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.
Well, there is org-indent-drawer, but it does not work as I expect
since commit af300bd5b, as I can see.
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.
1. Foo
:HIDDEN:
:END:
2. Bar
...
M-x org-indent-drawer
The result, as expected:
1. Foo
:HIDDEN:
:END:
2. Bar
...
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?
--
WBR, Vins Xiro
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [BUG] The org-indent-drawer function does not work for drawers in plain lists since commit af300bd5b
2025-02-22 19:35 [BUG] The org-indent-drawer function does not work for drawers in plain lists since commit af300bd5b Vins Xiro
@ 2025-02-23 18:36 ` Ihor Radchenko
2025-02-24 18:59 ` Vins Xiro
0 siblings, 1 reply; 3+ messages in thread
From: Ihor Radchenko @ 2025-02-23 18:36 UTC (permalink / raw)
To: Vins Xiro; +Cc: emacs-orgmode
Vins Xiro <[email protected]> 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>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [BUG] The org-indent-drawer function does not work for drawers in plain lists since commit af300bd5b
2025-02-23 18:36 ` Ihor Radchenko
@ 2025-02-24 18:59 ` Vins Xiro
0 siblings, 0 replies; 3+ messages in thread
From: Vins Xiro @ 2025-02-24 18:59 UTC (permalink / raw)
To: Ihor Radchenko; +Cc: emacs-orgmode
On Sun, Feb 23 2025, Ihor Radchenko wrote:
> Vins Xiro <[email protected]> writes:
>
>> 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.
Definitely.
I had to use Distrobox with an old Linux distribution to find the commit.
> It is not exactly a bug - 0 indentation is a perfectly valid indentation
> position in some cases.
So it is not a bug.
Thanks for the clarification.
--
WBR, Vins Xiro
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-02-24 19:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-22 19:35 [BUG] The org-indent-drawer function does not work for drawers in plain lists since commit af300bd5b Vins Xiro
2025-02-23 18:36 ` Ihor Radchenko
2025-02-24 18:59 ` Vins Xiro
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).