From: lee <lee@yun.yagibdah.de>
To: 16954@debbugs.gnu.org
Subject: bug#16954: 24.3.50; desktop.el: messages for autosaved files unnoticeable when desktop is restored
Date: Sat, 08 Mar 2014 01:33:32 +0100 [thread overview]
Message-ID: <87r46dzgn8.fsf@yun.yagibdah.de> (raw)
In-Reply-To: <87d2hzjhgs.fsf@yun.yagibdah.de> (lee@yun.yagibdah.de's message of "Thu, 06 Mar 2014 19:43:31 +0100")
lee <lee@yun.yagibdah.de> 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.
FWIW:
(defcustom desktop-buffer-auto-save-file-list-name
"*auto-save-files*"
"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."
:type '(string)
:group 'desktop)
(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."
(interactive)
(pop-to-buffer desktop-buffer-auto-save-file-list-name)
(delete-region (point-min) (point-max))
(dolist (buffer (buffer-list))
(with-current-buffer buffer
(let ((filename buffer-auto-save-file-name))
(if filename
(when (file-exists-p filename)
(pop-to-buffer desktop-buffer-auto-save-file-list-name)
(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.
next prev parent reply other threads:[~2014-03-08 0:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-06 18:43 bug#16954: 24.3.50; desktop.el: messages for autosaved files unnoticeable when desktop is restored lee
2014-03-06 20:43 ` Drew Adams
2014-03-08 0:33 ` lee [this message]
2021-07-15 4:49 ` Lars Ingebrigtsen
2021-08-12 15:08 ` Lars Ingebrigtsen
2021-08-12 15:23 ` bug#16954: [External] : " Drew Adams
2021-08-13 11:25 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r46dzgn8.fsf@yun.yagibdah.de \
--to=lee@yun.yagibdah.de \
--cc=16954@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).