editor/file-templates: fix #1401
org-capture, when used on a target that doesn't exist, will invisibly expand a file template, leaving a hang yasnippet active. After org-capture initializes, the yasnippet will attempt to operate on overlays that don't exist, throwing overlayp errors.
This commit is contained in:
parent
e2869c62a1
commit
21cf1c2da6
1 changed files with 4 additions and 0 deletions
|
@ -122,6 +122,10 @@ must be non-read-only, empty, and there must be a rule in
|
|||
;; Bootstrap
|
||||
|
||||
(after! yasnippet
|
||||
;; Prevent file-templates from breaking org-capture when target file doesn't
|
||||
;; exist and has a file template.
|
||||
(add-hook 'org-capture-mode-hook #'yas-abort-snippet)
|
||||
|
||||
(if (featurep! :editor snippets)
|
||||
(add-to-list 'yas-snippet-dirs '+file-templates-dir 'append #'eq)
|
||||
(setq yas-prompt-functions (delq #'yas-dropdown-prompt yas-prompt-functions)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue