From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: TODO: insert-file should warn if the file is modified Date: Sat, 20 Apr 2002 11:26:30 -0600 (MDT) Sender: emacs-devel-admin@gnu.org Message-ID: <200204201726.g3KHQUs01285@aztec.santafe.edu> References: Reply-To: rms@gnu.org NNTP-Posting-Host: localhost.gmane.org X-Trace: main.gmane.org 1019323697 24643 127.0.0.1 (20 Apr 2002 17:28:17 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 20 Apr 2002 17:28:17 +0000 (UTC) Cc: emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 16yyen-0006PM-00 for ; Sat, 20 Apr 2002 19:28:17 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 16yyyj-0003e5-00 for ; Sat, 20 Apr 2002 19:48:53 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16yyeS-0006d3-00; Sat, 20 Apr 2002 13:27:56 -0400 Original-Received: from pele.santafe.edu ([192.12.12.119]) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16yyd5-0006Oe-00; Sat, 20 Apr 2002 13:26:31 -0400 Original-Received: from aztec.santafe.edu (aztec [192.12.12.49]) by pele.santafe.edu (8.11.6+Sun/8.9.3) with ESMTP id g3KHQUa01808; Sat, 20 Apr 2002 11:26:30 -0600 (MDT) Original-Received: (from rms@localhost) by aztec.santafe.edu (8.10.2+Sun/8.9.3) id g3KHQUs01285; Sat, 20 Apr 2002 11:26:30 -0600 (MDT) X-Authentication-Warning: aztec.santafe.edu: rms set sender to rms@aztec using -f Original-To: Pavel@Janik.cz In-Reply-To: (Pavel@Janik.cz) Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.9 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:2849 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:2849 (let ((buffer (file-is-modified-somewhere filename))) (if (or (not buffer) (y-or-n-p (format "File %s is modified in buffer %s. Insert it? " filename buffer))) The code looks good, but the message might be misunderstood. "It" is ambiguous1 Be VERY careful about using pronouns in writing, and especially in short statements like that one. File %s is being edited. Insert the file anyway? would be a clearer message. It is better not to include the buffer name, because that will usually give no additional information and will make the message longer. One possible approach is to include the buffer name only when it is different from the file's name. KFS suggested offering to insert the buffer. That is a good idea provided the questions asked seem natural and not inconvenient. One possible approach is to ask whether to insert the file or the buffer; a user who wants to insert neither one can type C-g instead of answering the question.