popup.el: consider auto-saving indirect buffers too
Function (buffer-file-name) always returns nil with indirect buffer as an argument. Extracting base buffer and checking if base buffer visiting file fixes data loss in indirect buffers showed in popups. E-mail thread in the org-mode mailing list: https://lists.gnu.org/archive/html/emacs-orgmode/2020-12/msg00085.html
This commit is contained in:
parent
2e61fbbf08
commit
9c510159ff
1 changed files with 3 additions and 1 deletions
|
@ -45,7 +45,9 @@ the buffer is visible, then set another timer and try again later."
|
||||||
+ And finally deletes the window!"
|
+ And finally deletes the window!"
|
||||||
(let ((buffer (window-buffer window))
|
(let ((buffer (window-buffer window))
|
||||||
(inhibit-quit t))
|
(inhibit-quit t))
|
||||||
(and (buffer-file-name buffer)
|
(and (or (buffer-file-name buffer)
|
||||||
|
(if-let (base-buffer (buffer-base-buffer buffer))
|
||||||
|
(buffer-file-name base-buffer)))
|
||||||
(buffer-modified-p buffer)
|
(buffer-modified-p buffer)
|
||||||
(let ((autosave (+popup-parameter 'autosave window)))
|
(let ((autosave (+popup-parameter 'autosave window)))
|
||||||
(cond ((eq autosave 't))
|
(cond ((eq autosave 't))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue