From: Andreas Schwab <schwab@suse.de>
Cc: emacs-pretest-bug@gnu.org, wohler@newt.com,
Luc Teirlinck <teirllm@dms.auburn.edu>,
rms@gnu.org, emacs-devel@gnu.org
Subject: Re: with-temp-buffer and undo [was: Big desktop undo buffer crashes Emacs]
Date: Fri, 12 May 2006 13:41:02 +0200 [thread overview]
Message-ID: <jeac9nxygh.fsf@sykes.suse.de> (raw)
In-Reply-To: <4464686F.7050101@soem.dk> (Lars Hansen's message of "Fri, 12 May 2006 12:50:23 +0200")
Lars Hansen <lists@soem.dk> writes:
> Lars Hansen wrote:
>
>>I suggest to use with-temp-buffer (and buffer-disable-undo)
>>
>>
> Does it ever make sense to save undo information in a temporary buffer?
> If not, I suggest to disable it in with-temp-buffer.
> Patch attached.
> *** subr.el~ 2006-05-12 08:24:10.000000000 +0200
> --- subr.el 2006-05-12 12:40:59.575290323 +0200
> ***************
> *** 2220,2226 ****
> See also `with-temp-file' and `with-output-to-string'."
> (declare (indent 0) (debug t))
> (let ((temp-buffer (make-symbol "temp-buffer")))
> ! `(let ((,temp-buffer (generate-new-buffer " *temp*")))
> (unwind-protect
> (with-current-buffer ,temp-buffer
> ,@body)
> --- 2220,2227 ----
> See also `with-temp-file' and `with-output-to-string'."
> (declare (indent 0) (debug t))
> (let ((temp-buffer (make-symbol "temp-buffer")))
> ! `(let ((,temp-buffer (generate-new-buffer " *temp*"))
> ! (buffer-undo-list t))
> (unwind-protect
> (with-current-buffer ,temp-buffer
> ,@body)
This won't disable undo in the temp buffer, you'd need to move that below
with-current-buffer.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
next prev parent reply other threads:[~2006-05-12 11:41 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <24090.1146238861@olgas.newt.com>
[not found] ` <E1FZupW-00010U-IX@fencepost.gnu.org>
[not found] ` <87slngh3wu.fsf@olgas.newt.com>
[not found] ` <E1FeP3s-0002OD-U0@fencepost.gnu.org>
[not found] ` <200605120450.k4C4ovkM019797@jane.dms.auburn.edu>
[not found] ` <44643259.3050302@soem.dk>
2006-05-12 10:50 ` with-temp-buffer and undo [was: Big desktop undo buffer crashes Emacs] Lars Hansen
2006-05-12 11:28 ` Eli Zaretskii
2006-05-12 11:41 ` Andreas Schwab [this message]
2006-05-12 12:03 ` Lars Hansen
2006-05-12 13:56 ` with-temp-buffer and undo Stefan Monnier
2006-05-12 17:30 ` Lars Hansen
2006-05-12 17:47 ` Lars Hansen
2006-05-12 17:50 ` Bill Wohler
2006-05-21 20:36 ` Bill Wohler
2006-05-13 4:53 ` Richard Stallman
2006-05-13 4:52 ` with-temp-buffer and undo [was: Big desktop undo buffer crashes Emacs] Richard Stallman
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=jeac9nxygh.fsf@sykes.suse.de \
--to=schwab@suse.de \
--cc=emacs-devel@gnu.org \
--cc=emacs-pretest-bug@gnu.org \
--cc=rms@gnu.org \
--cc=teirllm@dms.auburn.edu \
--cc=wohler@newt.com \
/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.