Fix: (org-ql-view--font-lock-as-org) Prevent buffer from being saved
Invoking `org-mode' when creating the buffer sets `buffer-save-without-query' to `t' and `save-some-buffers' will then unconditionally save the buffer. So, rather than using `set-buffer-modified-p', set `buffer-save-without-query' to `nil' after invoking `org-mode' during buffer creation.
This commit is contained in:
parent
667ea90079
commit
81031af964
1 changed files with 2 additions and 2 deletions
|
|
@ -537,13 +537,13 @@ with human-readable strings."
|
|||
(with-current-buffer (get-buffer-create " *org-ql-view--font-lock-as-org*")
|
||||
(buffer-disable-undo)
|
||||
(org-mode)
|
||||
(setq buffer-save-without-query nil)
|
||||
(current-buffer)))))
|
||||
(with-current-buffer buffer
|
||||
(insert s)
|
||||
(font-lock-ensure)
|
||||
(prog1 (buffer-string)
|
||||
(erase-buffer)
|
||||
(set-buffer-modified-p nil)))))
|
||||
(erase-buffer)))))
|
||||
|
||||
(defun org-ql-view--buffer (&optional name)
|
||||
"Return `org-ql-view' buffer, creating it if necessary.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue