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: Tue, 27 Oct 2009 09:28:42 -0400 Message-ID: References: <5e3a506e0909101709u2259d56h25f3ef1ec67326aa@mail.gmail.com> <5e3a506e0909240704t5e716634k86b21e1604ee1912@mail.gmail.com> <5e3a506e0910061133r3e9b6146l637c84bee7b0d136@mail.gmail.com> <5e3a506e0910171000n79e9c992n6c243fc0f42a919a@mail.gmail.com> <5e3a506e0910212035y7d5eca50w7ae1005896ef1bdd@mail.gmail.com> <5e3a506e0910230843r3fb837e7v9aa9cf5e57a7aed@mail.gmail.com> <5e3a506e0910270142y799d80dm7c4ebda24e31556@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 1256650318 9802 80.91.229.12 (27 Oct 2009 13:31:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 27 Oct 2009 13:31:58 +0000 (UTC) Cc: emacs-devel@gnu.org To: Nathaniel Flath Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Oct 27 14:31: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 1N2m6Z-00018D-Hc for ged-emacs-devel@m.gmane.org; Tue, 27 Oct 2009 14:28:55 +0100 Original-Received: from localhost ([127.0.0.1]:55685 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N2m6Y-000144-TC for ged-emacs-devel@m.gmane.org; Tue, 27 Oct 2009 09:28:54 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N2m6S-00013U-QJ for emacs-devel@gnu.org; Tue, 27 Oct 2009 09:28:48 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N2m6O-00011n-8M for emacs-devel@gnu.org; Tue, 27 Oct 2009 09:28:48 -0400 Original-Received: from [199.232.76.173] (port=53711 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N2m6O-00011k-1p for emacs-devel@gnu.org; Tue, 27 Oct 2009 09:28:44 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:29667 helo=ironport2-out.pppoe.ca) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N2m6N-0006DG-Pw for emacs-devel@gnu.org; Tue, 27 Oct 2009 09:28:43 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApsEAECS5kpLd/xb/2dsb2JhbACBUNdzhD8EiDw X-IronPort-AV: E=Sophos;i="4.44,633,1249272000"; d="scan'208";a="48230781" Original-Received: from 75-119-252-91.dsl.teksavvy.com (HELO pastel.home) ([75.119.252.91]) by ironport2-out.pppoe.ca with ESMTP; 27 Oct 2009 09:28:42 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 4C6DE8013; Tue, 27 Oct 2009 09:28:42 -0400 (EDT) In-Reply-To: <5e3a506e0910270142y799d80dm7c4ebda24e31556@mail.gmail.com> (Nathaniel Flath's message of "Tue, 27 Oct 2009 04:42:56 -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:116421 Archived-At: > Well, you'd want it to display when you moved to the buffer - If you are > moving out of the overlay in question with C-x o it may not matter, but if > you are moving into a window with a buffer that the point is in one of these > overlays you'd want the action to trigger and display the error message. > The same applies to C-x b. This was just the use case I had in mind - there > are probably others. IIUC you're saying that it should be run both for C-x o and C-x b, right? I'd understand that. I read your earlier answer to say that you wanted C-x o to do it but not C-x b, which I found puzzling. Personally, I'd say that in those cases actually it doesn't matter that much either way: for C-x o, you're going back to a in window that's already displayed and to a point that's already displayed, so there's a good chance you've already seen the message earlier. For C-x b it's less likely, but there's still a fairly good chance as well, and in either case if you miss a message in those cases it doesn't seem like too big a problem. So I think this use-case is unlikely to give us a good and strong indication of how it should work. Here's another potential use case: when doing completion inside a buffer (e.g. completing an identifier in some programming mode), if the completion brings up a *Completions* buffer, we'd want to hide the *Completions* buffer when the completion is done, but detecting "when the completion is done" is difficult, so one way to do it would be to place a "cursor-leave" hook on the completion area. Now, what the behavior should be upon C-x o or C-x b is again somewhat unclear: for C-x b, actually I think it's pretty clear that it should run the hook (which is a vote in favor of per-window data), but for "C-x o" it's less clear: running the hook would often be a good idea, but would mean that it's somewhere between difficult and impossible to let the user go to the *Completions* buffer to select an entry with choose-completion. Stefan