Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Create headline if it doesn't already exist in target

Open
#957 1 comment 1 reaction 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
35/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Stale
Tech stack
lua
Domain
tooling

Research direction

Start in lua/orgmode/capture/init.lua around line 584 and reproduce the capture configuration shown against a target file without the requested headline. Determine the existing confirmation behavior, then consider the work complete when a capture can create the missing headline and proceed successfully.

Written by the indexing model from the issue text.

Description

enhancement
Does this feature exist in Emacs orgmode core?

No

Orgmode link

I'm not sure if this is the current behavior in emacs, but I think it would be pretty cool if the capture window offered to create a headline that doesn't yet exist in the target file.
An example:

						f = {
							description = "repo heading",
							template = "* %?",
							headline = vim.fn.fnamemodify(vim.fn.getcwd(), ":t"),
							target = org_agenda_path("repos.org"),
						},

on a new repo, currently won't let me confirm the capture since the repo headline doesn't exist in the file.

The relevant section in the code that I found was here.

Feature value

No response

Additional context

No response

Dominant language
Lua
Stars
3.9k
Forks
192
Avg merge
2d 6h
Merged PRs (30d)
18

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from nvim-orgmode/orgmode

All issues in nvim-orgmode/orgmode

Similar issues

More Lua issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.