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 only pulls from one file #247

Closed schultzter closed 1 year ago

schultzter commented 2 years ago

Describe the bug

I have a bunch of org files, typically one per client and also a corporate one and a personal one. When I create my weekly agenda view it only pulls from Personal.org and none of my other org files.

Steps to reproduce

  1. Configure orgmode to use all the files in a given directory (i.e.: org_agenda_files = 'C:/Users/user/Documents/Notebooks/*.org')
  2. Create multiple org files with TODO that have SCHEDULED and DEADLINE dates
  3. Generate the agenda

Expected behavior

The agenda will include TODO items from all the org files I have.

Emacs functionality

The same org files work perfectly with Emacs.

Minimal init.lua

require('orgmode').setup({
  org_agenda_files = 'C:/Users/user/Documents/Notebooks/*.org',
  org_default_notes_file = 'C:/Users/user/Documents/Notebooks/refile.org',
  org_todo_keywords = {'TODO', 'INPROGRESS', 'BLOCKED', 'DONE'}
})

Screenshots and recordings

No response

OS / Distro

Windows 10

Neovim version/commit

0.6.1

Additional context

I've been flipping back and forth between Emacs and Neovim using the same set of files. I would really prefer to use Neovim ('cuz vi rocks).

Maltimore commented 2 years ago

My guess is it is a Windows issue, since for me the agenda consists of all org files.

kristijanhusak commented 2 years ago

@schultzter what's the output for echo &shellslash for you?

schultzter commented 2 years ago

echo &shellslash returns 0 (zero)

schultzter commented 2 years ago

If I change the forward-slash to a back-slash in my init.lua file do I need to escape them somehow?

Or is it okay like this?

require('orgmode').setup({
  org_agenda_files = 'C:\Users\eric.schultz\Documents\Notebooks\*.org',
  org_default_notes_file = 'C:\Users\eric.schultz\Documents\Notebooks\refile.org',
  org_todo_keywords = {'TODO', 'INPROGRESS', 'BLOCKED', 'DONE'}
})
kristijanhusak commented 2 years ago

You can write them in double square bracket like this: [[ C:\Users\eric.schultz\Documents\Notebooks\*.org ]].

Let me know if converting to backslash worked out

schultzter commented 2 years ago

Thanks for the tip, but now I don't even get the the contents of my Personal.org in the Agenda!!!

Is there some way to turn on detailed logs so I can see what nvim-orgmode and possibly even Neovim are doing when I generate the agenda?

require('orgmode').setup({
  org_agenda_files = [[ C:\Users\eric.schultz\Documents\Notebooks\*.org ]],
  org_default_notes_file = [[ C:\Users\eric.schultz\Documents\Notebooks\refile.org ]],
  org_todo_keywords = {'TODO', 'INPROGRESS', 'BLOCKED', 'DONE'}
})
kristijanhusak commented 2 years ago

There isn't a debug mode unfortunately.

What do you get in output when you do :echo glob('C:/Users/user/Documents/Notebooks/*.org') ?

schultzter commented 2 years ago

Here you go:

[image: image.png]

-- Headed for the second star to the right and straight on 'til morning...

Eric Schultz

On Fri, Apr 8, 2022 at 9:33 AM Kristijan Husak @.***> wrote:

There isn't a debug mode unfortunately.

What do you get in output when you do :echo glob('C:/Users/user/Documents/Notebooks/*.org') ?

— Reply to this email directly, view it on GitHub https://github.com/nvim-orgmode/orgmode/issues/247#issuecomment-1092865371, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAHRFYDK5ATR2VEY33PNDLVEAYRFANCNFSM5SZOKDUA . You are receiving this because you were mentioned.Message ID: @.***>

kristijanhusak commented 2 years ago

I can't see the image. Can you re-post it or just send the output content?

schultzter commented 2 years ago

It's the list of org files in the that directory:

image

image

andreadev-it commented 2 years ago

Hi schultzter, I've tested this in my local machine (running windows 10 with nvim 0.7.0) but I cannot seem to reproduce the problem. Are all the org files correctly parsed by the plugin? Have you tried upgrading to neovim 0.7 (if possible)?

seantwie03 commented 2 years ago

I am also unable to reproduce this issue using nvim 0.7.0 in pwsh.exe.

tricktux commented 2 years ago

I confirm @seantwie03.

PSA: If you have folder structures in your org folder make use of the **/*.org :h startstart-wildcard

So the example below becomes:

require('orgmode').setup({
  org_agenda_files = [[ C:\Users\eric.schultz\Documents\Notebooks\**\*.org ]],
  org_default_notes_file = [[ C:\Users\eric.schultz\Documents\Notebooks\refile.org ]],
  org_todo_keywords = {'TODO', 'INPROGRESS', 'BLOCKED', 'DONE'}
})
kristijanhusak commented 1 year ago

Closing as inactive. If issue happens again, please open another issue and link this one in there.