From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Mathias Dahl" Newsgroups: gmane.emacs.devel Subject: Re: Missing `with' macro? Date: Mon, 24 Jul 2006 16:33:31 +0200 Message-ID: <7dbe73ed0607240733w33e0f8eag76a2bb221166d0b8@mail.gmail.com> References: <7dbe73ed0607240317g1bcdd564g66d075f809bcb7b2@mail.gmail.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1153751724 29755 80.91.229.2 (24 Jul 2006 14:35:24 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 24 Jul 2006 14:35:24 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 24 16:35:19 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 1G51VF-0007pC-DH for ged-emacs-devel@m.gmane.org; Mon, 24 Jul 2006 16:33:50 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G51VE-0000XA-Kb for ged-emacs-devel@m.gmane.org; Mon, 24 Jul 2006 10:33:48 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1G51V0-0000VH-VT for emacs-devel@gnu.org; Mon, 24 Jul 2006 10:33:35 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1G51Uz-0000T5-Ki for emacs-devel@gnu.org; Mon, 24 Jul 2006 10:33:34 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G51Uz-0000Sx-DT for emacs-devel@gnu.org; Mon, 24 Jul 2006 10:33:33 -0400 Original-Received: from [66.249.92.168] (helo=ug-out-1314.google.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1G51W5-0007PV-EK for emacs-devel@gnu.org; Mon, 24 Jul 2006 10:34:41 -0400 Original-Received: by ug-out-1314.google.com with SMTP id u2so2302846uge for ; Mon, 24 Jul 2006 07:33:31 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Ta4TrxDvjoHEBo/c8vGf2ZZlWbiJ7su0tEsUW5+kv8ZplbufiOZI3LczDwSSxnLP4M/YlUQc/xJNn/RhrLLNbIwAt49AhJ52lunCruSCMvPjuFl9hlSBnHKWN9Q89p5xpzRtycg9pn75YhctUu/m/5TiuCasYJq7naot/0jtf94= Original-Received: by 10.78.156.6 with SMTP id d6mr1542005hue; Mon, 24 Jul 2006 07:33:31 -0700 (PDT) Original-Received: by 10.78.107.10 with HTTP; Mon, 24 Jul 2006 07:33:31 -0700 (PDT) Original-To: "Stefan Monnier" In-Reply-To: Content-Disposition: inline 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:57535 Archived-At: > > (setq buf (find-file tumme-db-file)) > > ;; do a lot of stuff in it > > (save-buffer) ;; optionally > > (kill-buffer buf) > > Just for the record, the above code will bomb out if the current window is > a minibuffer or is dedicated: Always prefer find-file-noselect to find-file. Thanks for the advice! I will probably replace it with a combination of `with-temp-file' and `insert-file-contents'. > Stefan "whose windows are all dedicated or minibuffers" /Mathias - who has never cared about this dedicated business... :)