nvim-orgmode / orgmode

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

Agenda list of TODO's clears itself if I refresh the TODO list #57

Closed wmahany closed 3 years ago

wmahany commented 3 years ago

Describe the bug If I bring up the list of my TODO's, and then without saving the document or changing any TODO items, I refresh the TODO list, all the entries go away and I have to save my agenda file, close the TODO list window, and then re-open it in order to get my list of TODO's back

To Reproduce Steps to reproduce the behavior:

  1. Open Agenda file with TODO's
  2. Open list of TODO's with < leader > oat
  3. refresh list with 'r' binding
  4. See error

Expected behavior I don't expect the list of TODO's to clear itself if I refresh the list without making any changes to the existing TODO's

Emacs functionality If this functionality exists in Emacs Orgmode, explain how it works there.

Screenshots If applicable, add screenshots to help explain your problem.

System information:

Additional context Add any other context about the problem here.

kristijanhusak commented 3 years ago

I'm not able to reproduce this (on Linux).

Do you get any error message? If yes, can you paste it here (or screenshot it)? Also, while in the buffer with list of all TODO's, what does this command return:

:map r
wmahany commented 3 years ago

There aren't any errors message when I refresh the TODO list.

The :map r returns:

"*@lua require("orgmode").action("agenda.redo")"

It looks like it might be thinking "r" is redo instead of refresh/redraw? This is my orgmode config in my init.vim:

require('orgmode').setup({ org_default_notes_file = '~/Documents/Notes/Notes.org', org_hide_leading_stars = true, org_indent_mode = 'noindent', })

I am using nvim-compe as well, could this be a conflicting binding or something? I also haven't remapped 'r' in any capacity in my init.vim

kristijanhusak commented 3 years ago

map looks fine, it's agenda.redo. Naming is just confusing.

I don't see org_agenda_files in your config. Did you remove that on purpose here in the comment or?

wmahany commented 3 years ago

Aha!

That was the issue. I must have removed that line during configuration accidentally and didn't realize it. I added back that line with it pointing to the right directory and now the bug is gone. Well it wasn't really a bug, it was my own mistake.

Thanks for the troubleshooting help!

kristijanhusak commented 3 years ago

You're welcome. One unrelated question. Is everything working fine on Windows? I didn't test it yet on Windows to see how everything behaves, so any feedback on this is appreciated.

goosebill commented 3 years ago

Yup! It's working very well on Windows. I actually came from Emacs (doom emacs) and fell in love with the workflow, but at work I use windows and Emacs doesn't work very well on Windows, especially with all the configuration and packages included in Doom. I decided to try to recreate as much functionality as I could with Nvim, and your orgmode plugin was the first thing I needed. I was very happy to stumble across it and even happier when it worked very well.

The only issue I regularly run into is for what ever reason sometimes I try to orgmode specific stuff (like the < leader > < enter >) to continue a list, it'll throw this random lua error and won't let me do it. It's not consistent though so it's most likely either a weird quirk with windows or a mis-configuration on my end. All and all the process was the same to set it up on windows (after I tinkered with getting git to work) like to get it set up on Linux.

goosebill commented 3 years ago

Also I don't know if this is possible, but how would I call the < leader > < enter > continue list feature from insert mode? I don't like having to keep going into normal mode to continue the list and then go back into insert mode. If this should be a separate ticket just let me know. @kristijanhusak

kristijanhusak commented 3 years ago

@goosebill Thanks for the Windows info. I'm glad it works fine. Lets have a separate issue for that. I'll probably introduce an Enter mapping for it, since I'm having the same pain point. I wanted to avoid it because most of people have Enter mapped to something for autocompletion or auto pairs, but I'll write some documentation how to use it with custom mapping.