all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lars Hansen <lists@soem.dk>
Cc: emacs-pretest-bug@gnu.org, Luc Teirlinck <teirllm@dms.auburn.edu>,
	rms@gnu.org, wohler@newt.com
Subject: with-temp-buffer and undo [was: Big desktop undo buffer crashes Emacs]
Date: Fri, 12 May 2006 12:50:23 +0200	[thread overview]
Message-ID: <4464686F.7050101@soem.dk> (raw)
In-Reply-To: <44643259.3050302@soem.dk>

[-- Attachment #1: Type: text/plain, Size: 228 bytes --]

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.

[-- Attachment #2: subr.diff --]
[-- Type: text/x-patch, Size: 761 bytes --]

*** 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)

[-- Attachment #3: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

       reply	other threads:[~2006-05-12 10:50 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           ` Lars Hansen [this message]
2006-05-12 11:28             ` with-temp-buffer and undo [was: Big desktop undo buffer crashes Emacs] Eli Zaretskii
2006-05-12 11:41             ` Andreas Schwab
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=4464686F.7050101@soem.dk \
    --to=lists@soem.dk \
    --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.