From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Effect of deletions on indirect buffers (Bug#8219) Date: Sat, 12 Mar 2011 15:47:05 -0500 Message-ID: References: <877hc5bfqy.fsf@stupidchicken.com> <838vwlto85.fsf@gnu.org> <83wrk4soee.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1299962932 16483 80.91.229.12 (12 Mar 2011 20:48:52 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 12 Mar 2011 20:48:52 +0000 (UTC) Cc: cyd@stupidchicken.com, 8219@debbugs.gnu.org, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Mar 12 21:48:44 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PyVj9-00073w-6n for ged-emacs-devel@m.gmane.org; Sat, 12 Mar 2011 21:48:43 +0100 Original-Received: from localhost ([127.0.0.1]:38251 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PyVia-0004aQ-0x for ged-emacs-devel@m.gmane.org; Sat, 12 Mar 2011 15:47:20 -0500 Original-Received: from [140.186.70.92] (port=56215 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PyViR-0004Up-7M for emacs-devel@gnu.org; Sat, 12 Mar 2011 15:47:13 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PyViO-000291-Qd for emacs-devel@gnu.org; Sat, 12 Mar 2011 15:47:09 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:19355 helo=ironport2-out.pppoe.ca) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PyViM-00028c-TV; Sat, 12 Mar 2011 15:47:06 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEAM9qe03O+IG+/2dsb2JhbACmQnjAGoViBIUrkCE X-IronPort-AV: E=Sophos;i="4.62,308,1297054800"; d="scan'208";a="96051585" Original-Received: from 206-248-129-190.dsl.teksavvy.com (HELO pastel.home) ([206.248.129.190]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 12 Mar 2011 15:47:06 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id D9E1259047; Sat, 12 Mar 2011 15:47:05 -0500 (EST) In-Reply-To: <83wrk4soee.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 12 Mar 2011 11:01:45 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 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:137162 Archived-At: > It follows that BUF_PT, when used on other than the current buffer > should update PT if necessary, if that buffer is an indirect buffer, > before returning the value. And the same with BUF_BEGV, BUF_ZV, etc. > Right? Yes. At least that was my conclusion last time we bumped into such a bug. I even added a comment in buffer.h about it: /* !!!FIXME: all the BUF_BEGV/BUF_ZV/BUF_PT macros are flawed: on indirect (or base) buffers, that value is only correct if that buffer is the current_buffer, or if the buffer's text hasn't been modified (via an indirect buffer) since it was last current. */ Stefan