From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: Missing `with' macro? Date: Sat, 29 Jul 2006 11:18:15 -0400 Message-ID: References: <7dbe73ed0607240317g1bcdd564g66d075f809bcb7b2@mail.gmail.com> <33776.128.165.123.18.1154052850.squirrel@webmail.lanl.gov> Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1154186353 11470 80.91.229.2 (29 Jul 2006 15:19:13 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 29 Jul 2006 15:19:13 +0000 (UTC) Cc: emacs-devel@gnu.org, mathias.dahl@gmail.com Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jul 29 17:19:10 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 1G6qal-0006WW-TY for ged-emacs-devel@m.gmane.org; Sat, 29 Jul 2006 17:19:04 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G6qal-00040T-CF for ged-emacs-devel@m.gmane.org; Sat, 29 Jul 2006 11:19:03 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1G6qa1-0003IM-GM for emacs-devel@gnu.org; Sat, 29 Jul 2006 11:18:17 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1G6qa0-0003HH-VR for emacs-devel@gnu.org; Sat, 29 Jul 2006 11:18:17 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G6qa0-0003H5-K3 for emacs-devel@gnu.org; Sat, 29 Jul 2006 11:18:16 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.52) id 1G6qcF-00033b-F2 for emacs-devel@gnu.org; Sat, 29 Jul 2006 11:20:35 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1G6qZz-0000Gd-SK; Sat, 29 Jul 2006 11:18:15 -0400 Original-To: herring@lanl.gov In-reply-to: <33776.128.165.123.18.1154052850.squirrel@webmail.lanl.gov> (herring@lanl.gov) 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:57791 Archived-At: * This macro has two separate args REUSE and WRITE. But I think only two combinations make sense: t nil, and nil t. It is always wrong to reuse an existing buffer if you're going to modify the file. And if you're not going to modify it, there is never any point in not reusing one. So I think you should get rid of the REUSE argument. * This is a horrible kludge ;; We need to pretend that any other visiting buffer ;; doesn't actually exist. (if ,extant-sym (with-current-buffer ,extant-sym (setq buffer-file-name nil))) (find-file-noselect ,file-sym t)) and without an unwind-protect it will permanently ruin the other buffer if an error occurs. How about this instead? ;; Create a new buffer. (setq buf (create-file-buffer filename)) ;; find-file-noselect-1 may use a different buffer. (find-file-noselect-1 buf filename nowarn rawfile truename number)))))) * This seems like a mistake: ;; We don't just let-bind buffer-read-only because that ;; interacts poorly with switching buffers. (setq buffer-read-only (not ,write-sym)) What is the problem you're concerned about? * Use 'silent with prefix ARG. Use 'raw with two C-u's." Please write `silent' and `raw'; that is our convention.