From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.devel Subject: Re: momentary-string-display Date: Wed, 03 Jan 2007 01:53:42 -0700 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1167814475 10850 80.91.229.12 (3 Jan 2007 08:54:35 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 3 Jan 2007 08:54:35 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jan 03 09:54:34 2007 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 1H21tI-0006H3-Au for ged-emacs-devel@m.gmane.org; Wed, 03 Jan 2007 09:54:32 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H21tH-0005lo-Sl for ged-emacs-devel@m.gmane.org; Wed, 03 Jan 2007 03:54:31 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H21sw-0005l7-Mr for emacs-devel@gnu.org; Wed, 03 Jan 2007 03:54:10 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H21su-0005ii-GB for emacs-devel@gnu.org; Wed, 03 Jan 2007 03:54:10 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H21su-0005if-A0 for emacs-devel@gnu.org; Wed, 03 Jan 2007 03:54:08 -0500 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H21st-0002ml-D3 for emacs-devel@gnu.org; Wed, 03 Jan 2007 03:54:07 -0500 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1H21si-0004zW-1l for emacs-devel@gnu.org; Wed, 03 Jan 2007 09:53:56 +0100 Original-Received: from c-24-9-156-178.hsd1.co.comcast.net ([24.9.156.178]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 03 Jan 2007 09:53:56 +0100 Original-Received: from kevin.d.rodgers by c-24-9-156-178.hsd1.co.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 03 Jan 2007 09:53:56 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Lines: 36 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: c-24-9-156-178.hsd1.co.comcast.net User-Agent: Thunderbird 1.5.0.9 (Macintosh/20061207) In-Reply-To: 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:64674 Archived-At: Richard Stallman wrote: > Could you please try your changed version with various commands that use > momentary-string-display, and see if it fully works? The only calls to momentary-string-display are in ada-prj.el, fortran.el, pascal.el, and table.el; but I don't use any of those libraries, so I wouldn't be able to tell whether the function is working the same, better, or worse in those contexts. > As for this code, > > ! ;; If the message end is off screen, recenter now. > ! (if (< (window-end nil t) insert-end) > ! (recenter (/ (window-height) 2))) > ! ;; If that pushed message start off the screen, > ! ;; scroll to start it at the top of the screen. > ! (move-to-window-line 0) > ! (if (> (point) pos) > ! (progn > ! (goto-char pos) > ! (recenter 0)))) > > you could replace it with some reasonable heuristic that > doesn't go wrong very often. As I meant to say, the same heuristic can be used by replacing the reference to insert-end with (+ pos (length string)) -- as long as the new call to overlay-put causes a redisplay that updates window-end just as the original call to insert does. Is there a problem with the current heuristic? I think now that I should have left that code in (with insert-end replaced as described). -- Kevin Rodgers Denver, Colorado, USA