Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No refile option presented when creating node #61

Closed
danielcontro opened this issue Aug 26, 2024 · 11 comments
Closed

No refile option presented when creating node #61

danielcontro opened this issue Aug 26, 2024 · 11 comments
Labels
bug Something isn't working nvim-orgmode Issue is related to the nvim-orgmode plugin wontfix This will not be worked on

Comments

@danielcontro
Copy link

I use the LazyVim distribution and I installed the plugin using the configuration suggested in the README.
When creating a new node upon save the prompt for refiling the node to a new file isn't displayed.

@chipsenkbeil
Copy link
Owner

Can you elaborate a bit more? You're using 0.1.0 of this plugin and 0.3.4 of orgmode?

How are you creating the node? With org roam's find? Org roam's capture? Org roam's insert?

And how are you trying to save the node? From the capture buffer, saving and quitting the buffer should trigger it.

What version of neovim are you using?

@danielcontro
Copy link
Author

I'm on Neovim 0.10.1, using version 0.1.0 of the plugin and 0.3.4 of orgmode; the following is my plugin's configuration:

{
  "chipsenkbeil/org-roam.nvim",
  tag = "0.1.0",
  dependencies = {
    {
      "nvim-orgmode/orgmode",
      tag = "0.3.4",
    },
  },
  event = "VeryLazy",
  config = function()
    require("org-roam").setup({
      directory = "~/Org/notes",
      org_files = {
        "~/Org/agenda/*",
        "~/Org/refile.org",
      },
    })
  end,
}

I'm creating the node with the <Leader>nf shortcut for org roam's find, saving it with :w and quitting the buffer with :q; I'll also attach a screencast of the behaviour of the plugin.

Screencast.from.2024-08-26.14-41-35.mp4

@chipsenkbeil
Copy link
Owner

Are you setting up the primary orgmode plugin anywhere? For mine, I'd have it be a blob like ~/Org/** during setup with roam pointing to ~/Org/roam.

On mobile so I didn't test the paths above. I assumed everyone initialized the orgmode plugin, so not sure what happens if you don't.

@chipsenkbeil
Copy link
Owner

@danielcontro what plugin are you using for input that makes the floating buffer? It actually looks like it might be trying to ask you to confirm the refile, and then exits.

Anyway, capturing and refiling is leveraging the main orgmode plugin, so this is probably an issue with it. What happens if you disable the custom input plugin you're using?

@chipsenkbeil
Copy link
Owner

cc @kristijanhusak in case he's seen this capture issue before.

@chipsenkbeil chipsenkbeil added bug Something isn't working nvim-orgmode Issue is related to the nvim-orgmode plugin labels Aug 26, 2024
@danielcontro
Copy link
Author

The custom input plugin is noice.nvim, I tried disabling it and the creation of new nodes worked correctly presenting the refiling option thus I guess the issue isn't related to org-roam itself.

Though now I wonder why the selection of the capture template worked correctly while instead the input for refiling didn't as they both are input requests, perhaps orgmode handles it differently?

@chipsenkbeil
Copy link
Owner

chipsenkbeil commented Aug 26, 2024

@danielcontro yeah, there may be something with how we leverage orgmode's API that causes an issue if traditional refiling with the orgmode plugin works with noice.nvim and not with this plugin. But I don't know what that would be :/ oh, you were saying that capture template selection input versus refiling input is different. Have you tested orgmode on its own to see if a regular orgmode capture (not org roam) has the same issue?

Let's see if @kristijanhusak has any thoughts to diagnose/debug.

@danielcontro
Copy link
Author

I slightly changed the plugin configuration as follows:

{
    "chipsenkbeil/org-roam.nvim",
    tag = "0.1.0",
    dependencies = {
      {
        "nvim-orgmode/orgmode",
        tag = "0.3.4",
        event = "VeryLazy",
        ft = { "org" },
        config = function()
          require("orgmode").setup({
            org_agenda_files = "~/Org/agenda/*",
            org_default_notes_file = "~/Org/refile.org",
          })
        end,
      },
    },
    event = "VeryLazy",
    ft = { "org" },
    config = function()
      require("org-roam").setup({
        directory = "~/Org/notes",
        org_files = {
          "~/Org/agenda/*",
          "~/Org/refile.org",
        },
      })
    end,
  }

I tested the default orgmode capture and it has no issues. It should be noted though that the default functionality doesn't request a confirmation but simply inserts the capture in the specified refiling file.

@kristijanhusak
Copy link

The custom input plugin is noice.nvim, I tried disabling it and the creation of new nodes worked correctly presenting the refiling option thus I guess the issue isn't related to org-roam itself.

Do you also get the confirmation when testing with disabled noice? If yes, what does it say?

I tested the default orgmode capture and it has no issues. It should be noted though that the default functionality doesn't request a confirmation but simply inserts the capture in the specified refiling file.

It does ask for a confirmation in case the buffer is modified, and you try to force quit with :q!. I don't know if with org-roam there are some modifications in the refiling process that triggers that confirmation, so answer to the first question will be helpful.

Since the issue seems to happen only with noice.nvim, which as it states in the description is "highly experimental", I would say there isn't anything to fix here or in orgmode. Once we conclude, I would suggest to open up an issue in noice and see if there's a way to fix it.

@seflue
Copy link
Collaborator

seflue commented Sep 21, 2024

I am pretty sure, that this issue is related with my fix addressed by PR #64. @danielcontro Can you checkout my branch and check, if this resolves your problem? For me, refiling to newly created Roam nodes works with this fix.

Edit: I misunderstood the original post. But I can confirm the issue in combination with Noice happens to me also. The user experience for orgmode and org-roam is much better, if Noice is disabled. But I actually need to understand better, how Noice works and what is actually causing the issues. But because Noice is still considered highly experimental, I guess it's not worth to spend too much time to hunt issues in our plugins, which are probably caused mainly by Noice, not by org-roam or orgmode.

@chipsenkbeil
Copy link
Owner

I'm going to close this out as "won't fix" for now since it seems more on the noice plugin to stabilize versus something for nvim-orgmode or org-roam.nvim to resolve. If it turns out to be a limitation with the capture dialog, this should be re-opened over at the nvim-orgmode plugin since we only invoke its methods here.

@chipsenkbeil chipsenkbeil added the wontfix This will not be worked on label Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working nvim-orgmode Issue is related to the nvim-orgmode plugin wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

4 participants