From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lars Hansen Newsgroups: gmane.emacs.devel,gmane.emacs.pretest.bugs Subject: with-temp-buffer and undo [was: Big desktop undo buffer crashes Emacs] Date: Fri, 12 May 2006 12:50:23 +0200 Message-ID: <4464686F.7050101@soem.dk> References: <24090.1146238861@olgas.newt.com> <87slngh3wu.fsf@olgas.newt.com> <200605120450.k4C4ovkM019797@jane.dms.auburn.edu> <44643259.3050302@soem.dk> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------030402090400080009090203" X-Trace: sea.gmane.org 1147431062 15312 80.91.229.2 (12 May 2006 10:51:02 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 12 May 2006 10:51:02 +0000 (UTC) Cc: emacs-pretest-bug@gnu.org, Luc Teirlinck , rms@gnu.org, wohler@newt.com Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri May 12 12:50:59 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FeVEQ-00089C-53 for ged-emacs-devel@m.gmane.org; Fri, 12 May 2006 12:50:50 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FeVEO-0001Hp-Rk for ged-emacs-devel@m.gmane.org; Fri, 12 May 2006 06:50:48 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FeVEA-0001HF-Uy for emacs-devel@gnu.org; Fri, 12 May 2006 06:50:34 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FeVE8-0001Fd-Nm for emacs-devel@gnu.org; Fri, 12 May 2006 06:50:34 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FeVE8-0001FN-8o; Fri, 12 May 2006 06:50:32 -0400 Original-Received: from [212.99.225.245] (helo=odin.broadcom.dk) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1FeVFq-0006Sy-50; Fri, 12 May 2006 06:52:18 -0400 Original-Received: from pppoe3-ves.broadcom.dk ([212.99.255.42] helo=[10.17.0.131]) by odin.broadcom.dk with esmtp (Exim 4.24; FreeBSD) id 1FeVDA-000NCj-AG; Fri, 12 May 2006 12:49:32 +0200 User-Agent: Debian Thunderbird 1.0.2 (X11/20060423) X-Accept-Language: en-us, en Original-To: emacs-devel@gnu.org In-Reply-To: <44643259.3050302@soem.dk> X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:54312 gmane.emacs.pretest.bugs:12003 Archived-At: This is a multi-part message in MIME format. --------------030402090400080009090203 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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. --------------030402090400080009090203 Content-Type: text/x-patch; name="subr.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="subr.diff" *** 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) --------------030402090400080009090203 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel --------------030402090400080009090203--