From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nick Roberts Newsgroups: gmane.emacs.devel Subject: Re: `overlay-arrow-position' should be automatically buffer-local Date: Wed, 19 Oct 2005 19:13:48 +1300 Message-ID: <17237.58396.519852.507483@kahikatea.snap.net.nz> References: <87u0feb5b7.fsf@wigwam.deepwood.net> <87irvucjdg.fsf@cut.bc.hsia.telus.net> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1129702701 29523 80.91.229.2 (19 Oct 2005 06:18:21 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 19 Oct 2005 06:18:21 +0000 (UTC) Cc: Daniel Brockman , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 19 08:18:16 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1ES7H2-0006ZL-F5 for ged-emacs-devel@m.gmane.org; Wed, 19 Oct 2005 08:18:05 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ES7Gy-0005lV-Qu for ged-emacs-devel@m.gmane.org; Wed, 19 Oct 2005 02:18:01 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ES7CV-0005d6-Ts for emacs-devel@gnu.org; Wed, 19 Oct 2005 02:13:25 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ES7CM-0005cK-59 for emacs-devel@gnu.org; Wed, 19 Oct 2005 02:13:16 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ES7CH-0005c3-H3 for emacs-devel@gnu.org; Wed, 19 Oct 2005 02:13:11 -0400 Original-Received: from [202.37.101.8] (helo=viper.snap.net.nz) by monty-python.gnu.org with esmtp (Exim 4.34) id 1ES7CH-0004Os-7r for emacs-devel@gnu.org; Wed, 19 Oct 2005 02:13:09 -0400 Original-Received: from kahikatea.snap.net.nz (p119-tnt1.snap.net.nz [202.124.110.119]) by viper.snap.net.nz (Postfix) with ESMTP id 38F3372EEFD; Wed, 19 Oct 2005 19:12:59 +1300 (NZDT) Original-Received: by kahikatea.snap.net.nz (Postfix, from userid 500) id 15337840A; Wed, 19 Oct 2005 19:13:49 +1300 (NZDT) Original-To: Ryan Yeske In-Reply-To: <87irvucjdg.fsf@cut.bc.hsia.telus.net> X-Mailer: VM 7.19 under Emacs 22.0.50.15 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:44304 Archived-At: > I believe the variable `overlay-arrow-position' should > automatically become buffer-local whenever it is set. > > It appears that Gnus fails to do this manually, instead > ending up setting the global value to a marker that refers > to the Gnus summary buffer, which doesn't make sense. > > In fact, I see no reason to ever set the global value of > this variable. In any case, it should not be the default. Have you found this a problem in practice? I think Gnus and Edebug are the only two features that now use the global values of overlay-arrow-position (so they would steal the arrow from each other if they were both active at the same time). > I recently noticed when adding an overlay arrow to rcirc that making > it `overlay-arrow-position' buffer local *does* work (you can get an > arrow in multiple buffers), even though (elisp)Overlay Arrow says: > > - Variable: overlay-arrow-position > > [...] > > The overlay string is displayed only in the buffer that this marker > points into. Thus, only one buffer can have an overlay arrow at > any given time. > > Which I think was true in 21. I think you've always been able to make overlay-arrow-position buffer-local. The problem arises when two arrows try to display in the _same_ buffer, then the local value masks the global value. Perhaps this will never happen in Gnus, but in case it does, a good way is to use overlay-arrow-variable-list (which _is_ new to to Emacs 22): (defvar gnus-overlay-arrow-position nil) At startup: (setq gnus-overlay-arrow-position nil) (add-to-list 'overlay-arrow-variable-list 'gnus-overlay-arrow-position) On finishing: (delq 'gnus-overlay-arrow-position overlay-arrow-variable-list)) Nick