doomemacs / doomemacs/core

Org buffer not marked as modified due to :no-save in org-capture-template

Open
#5,068 0 comments 0 reactions 0 assignees View on GitHub
is:bug needs-triage
Dominant language
Emacs Lisp
Stars
22.7k
Forks
3.1k
Avg merge
10h 46m
Merged PRs (30d)
4

Description

###

- [X] I have searched [the FAQ](https://doomemacs.org/docs/faq.org) and [the documentation](https://doomemacs.org/docs/getting_started.org) for solutions.
- [X] I have searched [the issue tracker](https://github.com/hlissner/doom-emacs/issues) for similar issues (the closed issues too).
- [X] I have searched [the Discourse](https://discourse.doomemacs.org/docs) for any errors and solutions.
- [X] I can reproduce my issue on [the latest commit](https://github.com/hlissner/doom-emacs/commit) of Doom Emacs.
- [X] I have read [How to Debug Issues](https://discourse.doomemacs.org/how2debug) and found no solution.

### What did you expect to happen?

Resulting capture buffer should be marked as modified.

### What actually happened?

Using the org-capture-template in "Steps to reproduce", the buffer is marked as NOT modified.

Exiting emacs or killing the buffer(since file is marked as not modified, it will not ask to save the data), this will result in data loss.

### Describe your attempts to resolve the issue

Tried removing ```:no-save 1``` from the template and the file gets saved and buffer marked as not modified.

The file is a big 2+MB file, so I'd rather not save the file every single time and save it myself manually once I am done capturing items.

### Steps to reproduce

1. Using the below for org-capture-templates:
```
(setq org-capture-templates
'(
...
("b" "*AUTOMATIC* @inbox" entry
(id "cc441250-eb2f-41c7-af70-499f61345678")
"* %:description\n%:link\n%:initial" :immediate-finish t :jump-to-captured t :empty-lines 1 :no-save 1)
...
))
```
2. Capture anything with the above capture template.
3. Resulting buffer is not marked as modified due to ```:no-save 1```.

### System Information

https://pastebin.com/w7eGK15B

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue with the shown org-capture-templates entry, focusing on :immediate-finish, :jump-to-captured, and :no-save 1. Trace the org-capture entry point and the resulting buffer's modified state; done means captures remain marked as modified without saving the 2+MB file after every capture.

Written by the indexing model from the issue text.

Assessment

Tech stack
emacs-lisp
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.