From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Stefan Newsgroups: gmane.emacs.devel Subject: Re: [reveal-mode] Hiding short expressions Date: 02 Jul 2004 17:37:55 -0400 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1088804327 13871 80.91.224.253 (2 Jul 2004 21:38:47 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 2 Jul 2004 21:38:47 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Fri Jul 02 23:38:35 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BgVjv-00083L-00 for ; Fri, 02 Jul 2004 23:38:35 +0200 Original-Received: from lists.gnu.org ([199.232.76.165]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BgVjv-0007RM-00 for ; Fri, 02 Jul 2004 23:38:35 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BgVlk-00030B-Nz for emacs-devel@quimby.gnus.org; Fri, 02 Jul 2004 17:40:28 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1BgVlX-0002zR-JO for emacs-devel@gnu.org; Fri, 02 Jul 2004 17:40:15 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1BgVlW-0002yv-KU for emacs-devel@gnu.org; Fri, 02 Jul 2004 17:40:15 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BgVlW-0002yY-Du for emacs-devel@gnu.org; Fri, 02 Jul 2004 17:40:14 -0400 Original-Received: from [206.47.199.165] (helo=simmts7-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BgVjJ-0001RQ-PD for emacs-devel@gnu.org; Fri, 02 Jul 2004 17:37:57 -0400 Original-Received: from empanada.local ([67.68.219.154]) by simmts7-srv.bellnexxia.net (InterMail vM.5.01.06.10 201-253-122-130-110-20040306) with ESMTP id <20040702213717.DZLX18206.simmts7-srv.bellnexxia.net@empanada.local>; Fri, 2 Jul 2004 17:37:17 -0400 Original-Received: by empanada.local (Postfix, from userid 502) id C49452408EC; Fri, 2 Jul 2004 17:37:55 -0400 (EDT) Original-To: emacs-devel@gnu.org In-Reply-To: Original-Lines: 28 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:25402 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:25402 > currently I am trying to make use of reveal-mode for hiding and > revealing \footnote{...} expressions in Emacs. Now the problem is > that visible expressions under the control of reveal-mode only get > hidden if the cursor moves before the beginning of the line with the > expression or past its end. If you have short expressions within a > line it would be nice if the expression became invisible as soon as > the cursor moves out of it. > Are there any reasons why this is not handled like this in reveal.el > and would it be possible to change it if there aren't any? (A patch > would be to replace the `save-excursion' statements around line 119 in > reveal.el by the `overlay-start' or `overlay-end' statements already > defined there.) The current behavior of reveal-mode was designed while using it with outline-minor-mode in elisp buffers. It is tuned for such a context and might indeed need different tuning in a different context. The behavior you seem to want is actually simpler than the current behavior (in other words, I first implemented the behavior you want and then added code to keep the overlays open even after the cursor moves out of the overlay), and it should be easy to change the code such that you can choose between different behaviors. But please don't just remove the code that implements the current behavior. Stefan