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: Overalays and point-entered Date: Thu, 22 Oct 2009 11:37:58 -0400 Message-ID: References: <5e3a506e0909101709u2259d56h25f3ef1ec67326aa@mail.gmail.com> <5e3a506e0909230841i1d87b7ep397f2809e2cbdef9@mail.gmail.com> <5e3a506e0909240647k18368e10o6e5391a70a79e8@mail.gmail.com> <5e3a506e0909240704t5e716634k86b21e1604ee1912@mail.gmail.com> <5e3a506e0910061133r3e9b6146l637c84bee7b0d136@mail.gmail.com> <5e3a506e0910171000n79e9c992n6c243fc0f42a919a@mail.gmail.com> <5e3a506e0910212035y7d5eca50w7ae1005896ef1bdd@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1256225940 7377 80.91.229.12 (22 Oct 2009 15:39:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 22 Oct 2009 15:39:00 +0000 (UTC) Cc: emacs-devel@gnu.org To: Nathaniel Flath Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Oct 22 17:38:50 2009 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.50) id 1N0zkI-0004aY-02 for ged-emacs-devel@m.gmane.org; Thu, 22 Oct 2009 17:38:34 +0200 Original-Received: from localhost ([127.0.0.1]:34445 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N0zkH-0007Jv-Fc for ged-emacs-devel@m.gmane.org; Thu, 22 Oct 2009 11:38:33 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N0zjw-0007AH-Jz for emacs-devel@gnu.org; Thu, 22 Oct 2009 11:38:12 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N0zjs-000798-4w for emacs-devel@gnu.org; Thu, 22 Oct 2009 11:38:12 -0400 Original-Received: from [199.232.76.173] (port=38041 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N0zjr-000792-OV for emacs-devel@gnu.org; Thu, 22 Oct 2009 11:38:07 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:57653 helo=ironport2-out.pppoe.ca) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N0zjr-00016Z-CM for emacs-devel@gnu.org; Thu, 22 Oct 2009 11:38:07 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ar0EAPsY4EpLd/m0/2dsb2JhbACBUto8hD8EiB0 X-IronPort-AV: E=Sophos;i="4.44,605,1249272000"; d="scan'208";a="47997367" Original-Received: from 75-119-249-180.dsl.teksavvy.com (HELO pastel.home) ([75.119.249.180]) by ironport2-out.pppoe.ca with ESMTP; 22 Oct 2009 11:38:06 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 0A4728074; Thu, 22 Oct 2009 11:37:58 -0400 (EDT) In-Reply-To: <5e3a506e0910212035y7d5eca50w7ae1005896ef1bdd@mail.gmail.com> (Nathaniel Flath's message of "Wed, 21 Oct 2009 23:35:09 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. 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:116306 Archived-At: > I was working to implement your proposed solution - it seemed most logical > to place overlay_prev_vec in the buffer struct, but placing the three > necessary properties( overlay_prev_vec, noverlays_prev, > prev_point_motion_hook ) in the structure caused the 'make' process to > return a segfault. That was what I expected, yes. But the more I think about it, the more it seems it should be a property linked to a window rather than to a buffer. I think this deserves thought first. - What should happen if the same buffer is shown in the windows and the user switches from one to the other? Should the hooks be run at every window-switch, even though no cursor moves? - What should happen if a buffer is display in a window and then the user does C-x b: should the hooks be run? IIUC, if the data is per-window, then the answers will be "no; yes", if it's per-buffer, then the answers will be "yes; no". Whenm thinking about it, it's best to try and think of concrete examples which would use this feature. And keep in mind that it's usually better for a hook to be run too many times than too few times (the code that's run too many times, can try and detect the extra times and do nothing in those cases). > I'm going to look into this more in a few days, but do > you have any idea why this would be happening, or another implementation > strategy that wouldn't run into this problem? I followed the instructions > about placing non-Lisp_Objects above the 'name' variable, so that is most > likely not the issue. The slot placement would have been my first thought, otherwise, I can't think of anything particularly likely. Stefan