emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Vins Xiro <v88m@posteo.net>
To: emacs-orgmode@gnu.org
Subject: [BUG] The org-indent-drawer function does not work for drawers in plain lists since commit af300bd5b
Date: Sat, 22 Feb 2025 19:35:28 +0000	[thread overview]
Message-ID: <87msed22nz@posteo.net> (raw)

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


             reply	other threads:[~2025-02-22 20:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-22 19:35 Vins Xiro [this message]
2025-02-23 18:36 ` [BUG] The org-indent-drawer function does not work for drawers in plain lists since commit af300bd5b Ihor Radchenko
2025-02-24 18:59   ` Vins Xiro

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87msed22nz@posteo.net \
    --to=v88m@posteo.net \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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).