orgmode icon indicating copy to clipboard operation
orgmode copied to clipboard

Agenda only pulls from one file

Open schultzter opened this issue 3 years ago • 13 comments

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).

schultzter avatar Apr 07 '22 13:04 schultzter

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

Maltimore avatar Apr 08 '22 10:04 Maltimore

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

kristijanhusak avatar Apr 08 '22 12:04 kristijanhusak

echo &shellslash returns 0 (zero)

schultzter avatar Apr 08 '22 13:04 schultzter

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'}
})

schultzter avatar Apr 08 '22 13:04 schultzter

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

kristijanhusak avatar Apr 08 '22 13:04 kristijanhusak

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'}
})

schultzter avatar Apr 08 '22 13:04 schultzter

There isn't a debug mode unfortunately.

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

kristijanhusak avatar Apr 08 '22 13:04 kristijanhusak

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: @.***>

schultzter avatar Apr 08 '22 17:04 schultzter

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

kristijanhusak avatar Apr 10 '22 16:04 kristijanhusak

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

image

image

schultzter avatar Apr 10 '22 19:04 schultzter

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)?

andreadev-it avatar May 07 '22 13:05 andreadev-it

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

seantwie03 avatar May 18 '22 11:05 seantwie03

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'}
})

tricktux avatar May 25 '22 16:05 tricktux

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

kristijanhusak avatar Apr 15 '23 21:04 kristijanhusak