From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Pavel@Janik.cz (Pavel =?iso-8859-2?q?Jan=EDk?=) Newsgroups: gmane.emacs.devel Subject: Re: TODO: insert-file should warn if the file is modified Date: Sat, 20 Apr 2002 20:12:39 +0200 Sender: emacs-devel-admin@gnu.org Message-ID: References: <200204201726.g3KHQUs01285@aztec.santafe.edu> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: quoted-printable X-Trace: main.gmane.org 1019328143 29944 127.0.0.1 (20 Apr 2002 18:42:23 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 20 Apr 2002 18:42:23 +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 16yzoV-0007mr-00 for ; Sat, 20 Apr 2002 20:42:23 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 16z08S-0005PU-00 for ; Sat, 20 Apr 2002 21:03:00 +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 16yzoI-0006OD-00; Sat, 20 Apr 2002 14:42:10 -0400 Original-Received: from p0084.as-l043.contactel.cz ([194.108.242.84] helo=SnowWhite.SuSE.cz) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16yznS-0006KN-00; Sat, 20 Apr 2002 14:41:18 -0400 Original-Received: by SnowWhite.SuSE.cz (PJ, from userid 500) id F0DA618D85; Sat, 20 Apr 2002 20:43:17 +0200 (CEST) Original-To: rms@gnu.org X-Face: $"d&^B_IKlTHX!y2d,3;grhwjOBqOli]LV`6d]58%5'x/kBd7.MO&n3bJ@Zkf&RfBu|^qL+ ?/Re{MpTqanXS2'~Qp'J2p^M7uM:zp[1Xq#{|C!*'&NvCC[9!|=>#qHqIhroq_S"MH8nSH+d^9*BF: iHiAs(t(~b#1.{w.d[=Z In-Reply-To: <200204201726.g3KHQUs01285@aztec.santafe.edu> (Richard Stallman's message of "Sat, 20 Apr 2002 11:26:30 -0600 (MDT)") User-Agent: Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.2.50 (i386-suse-linux-gnu) Original-Lines: 55 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:2869 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:2869 From: Richard Stallman Date: Sat, 20 Apr 2002 11:26:30 -0600 (MDT) > (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? " fi= lename buffer))) >=20 > 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. >=20 > File %s is being edited. Insert the file anyway? >=20 > would be a clearer message. Yes. > 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. I think that this is not enough. Try this: pavel@SnowWhite:/tmp/em> LANG=3DC ls -lR .: total 8 drwxr-xr-x 2 pavel users 4096 Apr 20 20:07 1 drwxr-xr-x 2 pavel users 4096 Apr 20 20:07 2 ./1: total 4 -rw-r--r-- 1 pavel users 3 Apr 20 20:07 file ./2: total 0 lrwxrwxrwx 1 pavel users 9 Apr 20 20:07 file -> ../1/file User will edit 2/file in Emacs in buffer `file'. He can not insert file 1/file, because 2/file is edited in the buffer with the same name as the filename and he will not be warned of the buffer. On the other hand: the file can be edited in more than one buffer. > KFS suggested offering to insert the buffer. That is a good idea > provided the questions asked seem natural and not inconvenient. Which buffer? The first one we find is editing that file? There can be many of them... --=20 Pavel Jan=EDk Buying an operating system without source is like buying a self-assembly Space Shuttle with no instructions. -- Jeremy Allison in linux-kernel