From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: [joe-emacs-bugs@elem.com: change to file on disk not noticed by indirect buffer] Date: Wed, 05 Jul 2006 12:07:28 -0400 Message-ID: <87sllg6nnj.fsf@stupidchicken.com> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1152115645 18836 80.91.229.2 (5 Jul 2006 16:07:25 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 5 Jul 2006 16:07:25 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jul 05 18:07: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 1Fy9uF-00030j-AF for ged-emacs-devel@m.gmane.org; Wed, 05 Jul 2006 18:07:15 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fy9uE-0001Gf-Ru for ged-emacs-devel@m.gmane.org; Wed, 05 Jul 2006 12:07:14 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fy9u2-0001Ff-CF for emacs-devel@gnu.org; Wed, 05 Jul 2006 12:07:02 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fy9u0-0001Ew-Nb for emacs-devel@gnu.org; Wed, 05 Jul 2006 12:07:01 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fy9u0-0001Et-Fj for emacs-devel@gnu.org; Wed, 05 Jul 2006 12:07:00 -0400 Original-Received: from [18.19.1.138] (helo=cyd) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Fy9tz-0000OS-Cx; Wed, 05 Jul 2006 12:06:59 -0400 Original-Received: by cyd (Postfix, from userid 1000) id BF1084E2AC; Wed, 5 Jul 2006 12:07:28 -0400 (EDT) Original-To: rms@gnu.org In-Reply-To: (Richard Stallman's message of "Wed, 05 Jul 2006 10:51:41 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) 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:56573 Archived-At: Richard Stallman writes: > The failure to ask the user whether to update the buffer > is certainly a bug. Would someone please fix it and ack? I fixed the clash detection bug. (I didn't do anything about the other issue with find-alternate file.) > The behavior of find-alternate-file is also surely not good, but I am > not sure what it should do instead. The ideal would be to substitute > the new file in the base buffer and its indirect buffers, without > otherwise altering the differences between them. But that is probably > quite hard, so it would be better to do something else that's at least > sensible. > > From: Joe Edmonds > Subject: change to file on disk not noticed by indirect buffer > To: emacs-pretest-bug@gnu.org > > I really like using indirect buffers to edit different parts of the > same file with different buffer settings (mode, point, mark, position > in buffer stack, etc). > > But I've noticed that an indirect buffer doesn't behave the way a > normal buffer does with regard to a file that is changed from outside > emacs. Here's how to reproduce the problem: > > echo foo >>/tmp/foo # in a shell outside emacs > > C-x C-f /tmp/foo > M-x clone-indirect-buffer > > echo bar >>/tmp/foo # in a shell outside emacs > > Now, insert some text in the indirect buffer. > > You don't get the nice "foo changed on disk; really edit the buffer?" > prompt emacs normally gives you if you try to edit the base buffer. > > Also, find-alternate-file destroys the correspondence of indirect > buffers and base buffers. If you do it in a base buffer, all indirect > buffers are killed. If you do it in an indirect buffer, you're > not an indirect buffer anymore. If there were a "refresh base buffer > and all its indirect buffers from disk" function, that would make > working with indirect buffers easier for me.