nvim-orgmode / orgmode

Orgmode clone written in Lua for Neovim 0.9+.
https://nvim-orgmode.github.io/
MIT License
3.03k stars 134 forks source link

Refiling produces "Not enough room" message #482

Closed pianocomposer321 closed 1 year ago

pianocomposer321 commented 1 year ago

Describe the bug

When I refile a headline with <LEADER>or, I always get an error message: [orgmode] ...cal/share/nvim/lazy/orgmode/lua/orgmode/capture/init.lua:275: Vim:E36: Not enough room . Sometimes the refile is performed anyway, sometimes not.

Steps to reproduce

source.org:

* h1
** h1.1
** h1.2

dest.org:

* h1

Put cursor on h1.2 in File1, press <LEADER>or, enter dest.org/h1.

Expected behavior

The heading should be filed under the h1 heading in dest.org.

Emacs functionality

I don't use emacs, but I assume this works correctly.

Minimal init.lua

My config is pretty standard:

require("orgmode").setup_ts_grammar()
require("orgmode").setup {
  org_agenda_files = {"~/Documents/notes/**/*"},
  org_default_notes_file = "~/Documents/notes/refile.org",
}

Screenshots and recordings

No response

OS / Distro

Debian 11

Neovim version/commit

0.8.2

Additional context

No response

anton-fomin commented 1 year ago

I had the same problem. Seems to be related to https://github.com/neovim/neovim/issues/19464 Disabling winbar helps

nielsk commented 1 year ago

It works for me (in LunarVim which is a neovim-distribution) when I change the height in https://github.com/nvim-orgmode/orgmode/blob/master/lua/orgmode/capture/init.lua line to 2

I don't know what problems might arise from that though

MatthiasEckhart commented 1 year ago

It works for me (in LunarVim which is a neovim-distribution) when I change the height in https://github.com/nvim-orgmode/orgmode/blob/master/lua/orgmode/capture/init.lua line to 2

I don't know what problems might arise from that though

I also had to change height to 2 in the following file orgmode/lua/orgmode/parser/files.lua to "resolve" this issue. I am not fully aware of the implications of this change but maybe we should consider to make a pull request to implement this workaround until the upstream issue (https://github.com/neovim/neovim/issues/19464) is fixed.

kristijanhusak commented 1 year ago

Updated the height to be 2 until upstream issue is fixed.