orgmode icon indicating copy to clipboard operation
orgmode copied to clipboard

Status of org-indent-mode functionality?

Open IllustratedMan-code opened this issue 2 years ago • 11 comments

Does this feature exist in Emacs orgmode core?

Yes

Orgmode link

https://orgmode.org/manual/Org-Indent-Mode.html

Feature value

No response

Additional context

No response

IllustratedMan-code avatar Oct 06 '22 17:10 IllustratedMan-code

This was talked about before in another issue, but neovim did not support the required functionality. What needs to occur to get this to work? I'm happy to make issues in the main neovim repository to get this to happen.

IllustratedMan-code avatar Oct 06 '22 17:10 IllustratedMan-code

Are the virtual spaces just used for non-headline text or is the second space for each headline level also virtual?

* foo
  content            <-- two virtual spaces

  ** bar              <-- one virtual space?
    more content     <-- four virtual spaces

jgollenz avatar Oct 06 '22 20:10 jgollenz

without org-indent-mode

* foo
content

** bar
more content

with org-indent-mode

* foo
  content

 ** bar
    more content

IllustratedMan-code avatar Oct 06 '22 21:10 IllustratedMan-code

I believe all indents are virtual.

IllustratedMan-code avatar Oct 06 '22 21:10 IllustratedMan-code

Ah, it's prepending two virtual spaces to every line, even nested headings.

This

* one
foo
** two
bar
*** three
baz

becomes

image

jgollenz avatar Oct 07 '22 08:10 jgollenz

org-indent-mode is also configurable with org-indent-indentation-per-level which is my case is set to 2. So the number of virtual spaces prepended should be configurable.

IllustratedMan-code avatar Oct 12 '22 14:10 IllustratedMan-code

Looks like https://github.com/neovim/neovim/pull/9496 needs to be merged before this functionality will be possible.

IllustratedMan-code avatar Oct 12 '22 16:10 IllustratedMan-code

@kristijanhusak can you please add the neovim-dependency label?

jgollenz avatar Jan 12 '23 22:01 jgollenz

See #561

danilshvalov avatar May 10 '23 21:05 danilshvalov

This feature is now added as experimental in https://github.com/nvim-orgmode/orgmode/pull/627#issuecomment-1910981114.

Please give it a test and see how it works.

kristijanhusak avatar Jan 25 '24 20:01 kristijanhusak

The following stills remains to be done: (Checked means done)

  • [x] Toggling indent mode on or off in a buffer
  • [ ] Support #+STARTUP: indent & #+STARTUP: noindent
  • [x] Support for org-indent-mode-turns-on-hiding-stars like Emacs

I'll be opening PRs to resolve these as time permits. Probably no later than Sunday 2024-28-01.

PriceHiller avatar Jan 25 '24 21:01 PriceHiller