From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ryan Yeske Newsgroups: gmane.emacs.devel Subject: Re: `overlay-arrow-position' should be automatically buffer-local Date: Tue, 18 Oct 2005 23:34:03 -0700 Message-ID: <878xwqc8x0.fsf@cut.bc.hsia.telus.net> References: <87u0feb5b7.fsf@wigwam.deepwood.net> <87irvucjdg.fsf@cut.bc.hsia.telus.net> <17237.58396.519852.507483@kahikatea.snap.net.nz> NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1129704693 1549 80.91.229.2 (19 Oct 2005 06:51:33 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 19 Oct 2005 06:51:33 +0000 (UTC) Cc: daniel@brockman.se, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 19 08:51:23 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1ES7m1-0001E5-Mr for ged-emacs-devel@m.gmane.org; Wed, 19 Oct 2005 08:50:06 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ES7m0-0003ml-Hb for ged-emacs-devel@m.gmane.org; Wed, 19 Oct 2005 02:50:04 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ES7Wc-0000q3-KJ for emacs-devel@gnu.org; Wed, 19 Oct 2005 02:34:10 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ES7Wa-0000pE-7G for emacs-devel@gnu.org; Wed, 19 Oct 2005 02:34:09 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ES7WZ-0000p6-F0 for emacs-devel@gnu.org; Wed, 19 Oct 2005 02:34:07 -0400 Original-Received: from [199.185.220.220] (helo=priv-edtnes57.telusplanet.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1ES7WZ-0005Yz-EO for emacs-devel@gnu.org; Wed, 19 Oct 2005 02:34:07 -0400 Original-Received: from cut.bc.hsia.telus.net ([207.216.180.100]) by priv-edtnes57.telusplanet.net (InterMail vM.6.01.04.04 201-2131-118-104-20050224) with ESMTP id <20051019063406.RYFN18103.priv-edtnes57.telusplanet.net@cut.bc.hsia.telus.net>; Wed, 19 Oct 2005 00:34:06 -0600 Original-To: Nick Roberts In-reply-to: <17237.58396.519852.507483@kahikatea.snap.net.nz> (message from Nick Roberts on Wed, 19 Oct 2005 19:13:48 +1300) 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:44306 Archived-At: 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): Well, the following doesn't work in 21.3 but does in recent cvs versions (I get an arrow in each buffer in the latter): (progn (switch-to-buffer "buf1") (delete-other-windows) (make-variable-buffer-local 'overlay-arrow-position) (setq overlay-arrow-position (make-marker)) (set-marker overlay-arrow-position (point-min)) (with-current-buffer (pop-to-buffer "buf2") (make-variable-buffer-local 'overlay-arrow-position) (setq overlay-arrow-position (make-marker)) (set-marker overlay-arrow-position (point-min)))) Maybe I'm missing something, but I don't see why you need to use `overlay-arrow-variable-list' since you can just make `overlay-arrow-position' buffer local where you need it and get a local arrow that way. Or is that abusing `overlay-arrow-position' which might be intended to be a single global arrow?