[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#16954: 24.3.50; desktop.el: messages for autosaved files unnoticeabl
bug#16954: 24.3.50; desktop.el: messages for autosaved files unnoticeable when desktop is restored
Sat, 08 Mar 2014 01:33:32 +0100
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)
lee <address@hidden> writes:
> It might also be nice to have a function that creates a buffer with a
> listing of all loaded files that have an autosave version. One could
> then refer to the listing to clean things up.
"Name of buffer to create a list of files for which auto-save
files exist. The contents of this buffer are deleted every time
the list is created."
(defun desktop-make-auto-save-list ()
"Replace, and thereby delete, all contents of buffer specified
through desktop-buffer-auto-save-file-list-name with a list of
files for which auto-save files exist and display the buffer.
When the buffer does not exist, it is created.
desktop-after-read-hook can be set to
'desktop-make-auto-save-list to call this function after
restoring the desktop has successfully completed."
(delete-region (point-min) (point-max))
(dolist (buffer (buffer-list))
(let ((filename buffer-auto-save-file-name))
(when (file-exists-p filename)
(insert (concat filename "\n"))))))))
(setq desktop-after-read-hook 'desktop-make-auto-save-list)
Feel free to add this, or a modified version, to desktop.el, or to
otherwise use it.
Knowledge is volatile and fluid. Software is power.