From: Davis Herring <herring@lanl.gov>
To: Paul Sexton <psexton@xnet.co.nz>
Cc: emacs-devel@gnu.org
Subject: Re: Suggested patch for desktop.el, and 'slothful' lazy file loading
Date: Tue, 12 Apr 2011 17:37:31 -0600 [thread overview]
Message-ID: <4DA4E23B.9090506@lanl.gov> (raw)
In-Reply-To: <loom.20110411T061946-312@post.gmane.org>
> I have been using desktop.el in "lazy" mode i.e. with the settings
>
> (setq desktop-restore-eager 10)
> (setq desktop-lazy-verbose nil)
>
> This is supposed to make it load the first 10 files normally, then load the
> rest "in the background" when Emacs is idle.
>
> I have found that although the extra buffers are loaded in the
> background, after each buffer is loaded the display still switches to
> that buffer. This is very disconcerting - you are trying to work in
> buffer A but you are constantly switched against your will to
> viewing buffer B, C, D, etc, as they are loaded.
I can't reproduce this (but I only have an old Emacs 22 to hand to test).
> The following trivial patch seems to fix this, and I have not encountered any
> problems so far with it.
I suppose that we use switch-to-buffer because it affects the buffer
list order, but I'm not sure; the reordering code is complicated and its
true goal is unclear. If we can use `set-buffer', we can just use
`with-current-buffer'.
> Also, I have written an emacs extension called 'slothful' which allows
> true lazy loading of files - instead of actually loading the file, an
> empty buffer is created pointing the file, and it automatically loads
> only when the buffer is first displayed. I think this might be an
> interesting addition to desktop. I have tested it myself, just loading
> individual files.
A minor point: you can't restore point and mark in such a buffer, so
they would be lost at the next desktop-save.
Davis
--
This product is sold by volume, not by mass. If it appears too dense or
too sparse, it is because mass-energy conversion has occurred during
shipping.
prev parent reply other threads:[~2011-04-12 23:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-11 4:31 Suggested patch for desktop.el, and 'slothful' lazy file loading Paul Sexton
2011-04-12 23:37 ` Davis Herring [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4DA4E23B.9090506@lanl.gov \
--to=herring@lanl.gov \
--cc=emacs-devel@gnu.org \
--cc=psexton@xnet.co.nz \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.