nvim-orgmode / nvim-orgmode/orgmode

Adding TODO headliner after current headline puts new TODO after blank newlines

Open
#227 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Lua
Stars
3.9k
Forks
190
Avg merge
2d 13h
Merged PRs (30d)
7

Description

Describe the bug

First of all, thanks for all the work you're putting in this project. I could not live without it anymore.

When i try to add a new TODO e.g. with <leader>oit, the new todo is added after the empty new lines that follow that TODO instead of right before its content. I think that blank lines are treated as actual content of the previous TODO, even if they're completely empty (no whitespace in)

Steps to reproduce
  1. Go to a TODO that is followed by one or two blank lines
  2. Press oit
Expected behavior

The new TODO should be right after TODO and its content, ignoring whitespace (which can be used as separator between headlines)

Emacs functionality

No response

Minimal init.lua

I'm using

org_blank_before_new_entry = {
    heading = false,
    plain_list_item = false,
  }
Screenshots and recordings

No response

OS / Distro

Arch Linux

Neovim version/commit

0.6.1

Additional context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue in Neovim using the provided minimal init.lua and a TODO followed by blank lines. Start at the implementation of oit and inspect how org_blank_before_new_entry is handled. Done means the new TODO is inserted before trailing blank lines, while those lines remain separators between headlines.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua, neovim
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.