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: bug? scroll-lock-mode and searching Date: Sun, 30 Mar 2008 02:06:58 -0400 Message-ID: References: <20080328.081607.109435269.wl@gnu.org> <87d4pev6ea.fsf@photon.caeruleus.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1206857237 3530 80.91.229.12 (30 Mar 2008 06:07:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 30 Mar 2008 06:07:17 +0000 (UTC) Cc: angeli@caeruleus.net, emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Mar 30 08:07:48 2008 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 1Jfqhn-0006nl-Pc for ged-emacs-devel@m.gmane.org; Sun, 30 Mar 2008 08:07:48 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JfqhB-0000Gn-Vb for ged-emacs-devel@m.gmane.org; Sun, 30 Mar 2008 02:07:09 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Jfqh7-0000Ep-9A for emacs-devel@gnu.org; Sun, 30 Mar 2008 02:07:05 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Jfqh5-0000DM-Nx for emacs-devel@gnu.org; Sun, 30 Mar 2008 02:07:05 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jfqh5-0000D8-HL for emacs-devel@gnu.org; Sun, 30 Mar 2008 02:07:03 -0400 Original-Received: from ironport2-out.pppoe.ca ([206.248.154.182] helo=ironport2-out.teksavvy.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Jfqh1-0006zU-QR; Sun, 30 Mar 2008 02:06:59 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApsEAC/K7kfO+LLN/2dsb2JhbACBWqZK X-IronPort-AV: E=Sophos;i="4.25,577,1199682000"; d="scan'208";a="17147472" Original-Received: from smtp.pppoe.ca (HELO smtp.teksavvy.com) ([65.39.196.238]) by ironport2-out.teksavvy.com with ESMTP; 30 Mar 2008 02:06:58 -0400 Original-Received: from pastel.home ([206.248.178.205]) by smtp.teksavvy.com (Internet Mail Server v1.0) with ESMTP id KJK60958; Sun, 30 Mar 2008 02:06:58 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 319F77FDF; Sun, 30 Mar 2008 02:06:58 -0400 (EDT) In-Reply-To: (Richard Stallman's message of "Sun, 30 Mar 2008 01:49:35 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: 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:93883 Archived-At: > I think the right fix is to introduce a new hook `before-redisplay-hook' > and scroll-lock-mode should use it. > My experience suggests to me that hooks to run before or after > whateveritis are not quite the right thing for any complex feature. Indeed. But, for example, fontification-functions is just the right thing for lazy font-lock. > I think that if you study what this feature is trying to do, > you'll probably find a different design that suits it better. Could be. The way I see it "scroll-lock-mode" is basically a mode where the buffer should always be scrolled such that the cursor is always maintained at the same (vertical) screen position. So it very much has to do with redisplay and `before-redisplay-hook' might be just the right thing. Then again, it's not clear what `before-redisplay-hook' really is, so it may very well be that it won't work. Especially since auto-scrolling in response to point-motion seems to be wickedly complex. Stefan