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

Metadata generation fails #1517

Closed
2 tasks done
Utkarsh-khambra opened this issue Jul 16, 2024 · 1 comment · Fixed by #1518
Closed
2 tasks done

Metadata generation fails #1517

Utkarsh-khambra opened this issue Jul 16, 2024 · 1 comment · Fixed by #1518
Labels
bug Issues related to bugs. Please attach a severity, a priority and category with this label.

Comments

@Utkarsh-khambra
Copy link

Prerequisites

  • I am using the latest stable release of Neovim
  • I am using the latest version of the plugin

Neovim Version

NVIM v0.11.0-dev-438+g1f2f460b4a

Neorg setup

    load = {
      ['core.defaults'] = {}, -- Loads default behaviour
      ['core.esupports.metagen'] = { config = { type = 'auto' } },
      ['core.concealer'] = {}, -- Adds pretty icons to your documents
      ['core.dirman'] = { -- Manages Neorg workspaces
        config = {
          workspaces = {
            notes = '~/notes/',
          },
        },
      },
    },

Actual behavior

Neorg doesn't generate metadata, instead it results in this error

Error detected while processing BufEnter Autocommands for "*.norg":
Error executing lua callback: ...eorg/lua/neorg/modules/core/esupports/metagen/module.lua:296: Invalid 'replacement string' item: expected String, got Integer
stack traceback:
        [C]: in function 'nvim_buf_set_lines'
        ...eorg/lua/neorg/modules/core/esupports/metagen/module.lua:296: in function 'inject_metadata'
        ...eorg/lua/neorg/modules/core/esupports/metagen/module.lua:437: in function 'on_event'
        .../.local/share/nvim/lazy/neorg/lua/neorg/core/modules.lua:781: in function 'broadcast_event'
        ...azy/neorg/lua/neorg/modules/core/autocommands/module.lua:51: in function '_neorg_module_autocommand_triggered'
        ...azy/neorg/lua/neorg/modules/core/autocommands/module.lua:84: in function <...azy/neorg/lua/neorg/modules/core/autocommands/module.lua:83>
Error executing lua callback: ...eorg/lua/neorg/modules/core/esupports/metagen/module.lua:296: Invalid 'replacement string' item: expected String, got Integer
stack traceback:
        [C]: in function 'nvim_buf_set_lines'
        ...eorg/lua/neorg/modules/core/esupports/metagen/module.lua:296: in function 'inject_metadata'
        ...eorg/lua/neorg/modules/core/esupports/metagen/module.lua:437: in function 'on_event'
        .../.local/share/nvim/lazy/neorg/lua/neorg/core/modules.lua:781: in function 'broadcast_event'
        ...azy/neorg/lua/neorg/modules/core/autocommands/module.lua:51: in function '_neorg_module_autocommand_triggered'
        ...azy/neorg/lua/neorg/modules/core/autocommands/module.lua:84: in function <...azy/neorg/lua/neorg/modules/core/autocommands/module.lua:83>
Error executing lua callback: ...eorg/lua/neorg/modules/core/esupports/metagen/module.lua:296: Invalid 'replacement string' item: expected String, got Integer
stack traceback:
        [C]: in function 'nvim_buf_set_lines'
        ...eorg/lua/neorg/modules/core/esupports/metagen/module.lua:296: in function 'inject_metadata'
        ...eorg/lua/neorg/modules/core/esupports/metagen/module.lua:437: in function 'on_event'
        .../.local/share/nvim/lazy/neorg/lua/neorg/core/modules.lua:781: in function 'broadcast_event'
        ...azy/neorg/lua/neorg/modules/core/autocommands/module.lua:51: in function '_neorg_module_autocommand_triggered'
        ...azy/neorg/lua/neorg/modules/core/autocommands/module.lua:84: in function <...azy/neorg/lua/neorg/modules/core/autocommands/module.lua:83>
Press ENTER or type command to continue

Expected behavior

Neorg should generate metadata without any error.

Steps to reproduce

Generate metadata with inject-metadata neorg command

Potentially conflicting plugins

No response

Other information

Since this was working in 8.9.0, I bisected it and it says the first bad commit is 321c435

Help

None

Implementation help

No response

@Utkarsh-khambra Utkarsh-khambra added the bug Issues related to bugs. Please attach a severity, a priority and category with this label. label Jul 16, 2024
@github-project-automation github-project-automation bot moved this to added-updated-reopened in sorting neorg issue tracker Jul 16, 2024
@benlubas
Copy link
Contributor

Sorry I broke this in #1514. I thought that I pushed the fix but apparently not. will be fixed when #1518 is merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues related to bugs. Please attach a severity, a priority and category with this label.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants