Skip to content

Refiling ignores preamble export options #760

Open
@darg2012

Description

@darg2012

Describe the bug

Appreciate the repo, but partially broke after recently updating. Content on the refile location ignores preamble export options, starting only on the first header. Broken by 72d48c6. Possibly related to #729.

Steps to reproduce

  1. Open nvim with included minimal init.lua
  2. Activate capture of test template w/<leader>oce
  3. Close capture w/<C-c>
  4. Open ~/Downloads/test.org

Expected behavior

#+date: 2024/06/22 1:40:29 # <-- Missing lines
                            # <-- Missing lines
* Saturday 06/22/24

** Test

- 

Emacs functionality

No response

Minimal init.lua

local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
  vim.fn.system({
    "git",
    "clone",
    "--filter=blob:none",
    "https://github.com/folke/lazy.nvim.git",
    "--branch=stable", -- latest stable release
    lazypath,
  })
end
vim.opt.rtp:prepend(lazypath)

require('lazy').setup({
  {
    'nvim-orgmode/orgmode',
    event = 'VeryLazy',
    ft = { 'org' },
    config = function()
      require('orgmode').setup({
         org_capture_templates = {
            t = { description = 'Task', template = '* TODO %?\n  %u' },
            e = {
              description = 'Test',
              template =
                 '#+date: %<%Y/%m/%d %H:%M:%S>\n'..
                 '\n'..
                 '* %<%A> %<%m/%d/%y>\n\n'..
                 '** Test\n\n'..
                 '- %?\n',
              target = '~/Downloads/test.org'
             }
           }
         })
      end,
  },
})

Screenshots and recordings

No response

OS / Distro

MacOS 12.7.2

Neovim version/commit

NVIM v0.10.0 Release

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions