From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "David De La Harpe Golden" Newsgroups: gmane.emacs.devel Subject: Re: Suggestion: A fringe indicator that shows the last/first line before scrolling Date: Fri, 29 Feb 2008 17:57:14 +0000 Message-ID: <8e24944a0802290957i12765c67y8433cae9e8a8f242@mail.gmail.com> References: <8763w9mhdm.fsf@member.fsf.org> <47C6F4F8.5040703@gmail.com> <8e24944a0802281001l7022dedfg19846275cba15ef0@mail.gmail.com> <47C6F9A5.5050406@gmail.com> <8e24944a0802281018v6804526yad1bd02191ede989@mail.gmail.com> <47C6FE9F.1060800@gmail.com> <8e24944a0802281518x19bcbfd5ndf2ce1ca55a77dc@mail.gmail.com> <8e24944a0802281850l28ab99fcrc92f02d0399630aa@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1204307851 20116 80.91.229.12 (29 Feb 2008 17:57:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 29 Feb 2008 17:57:31 +0000 (UTC) Cc: David O'Toole , "Lennart Borgman \(gmail\)" , emacs-devel@gnu.org To: "Stefan Monnier" , "Tassilo Horn" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Feb 29 18:57:57 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 1JV9Ua-0002xA-Iz for ged-emacs-devel@m.gmane.org; Fri, 29 Feb 2008 18:57:56 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JV9U4-0000Cq-6D for ged-emacs-devel@m.gmane.org; Fri, 29 Feb 2008 12:57:24 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JV9U0-0000CX-0Y for emacs-devel@gnu.org; Fri, 29 Feb 2008 12:57:20 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JV9Ty-0000C7-Hr for emacs-devel@gnu.org; Fri, 29 Feb 2008 12:57:19 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JV9Ty-0000C2-Be for emacs-devel@gnu.org; Fri, 29 Feb 2008 12:57:18 -0500 Original-Received: from wf-out-1314.google.com ([209.85.200.173]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JV9Tx-0001oB-Ps for emacs-devel@gnu.org; Fri, 29 Feb 2008 12:57:18 -0500 Original-Received: by wf-out-1314.google.com with SMTP id 29so4425805wff.24 for ; Fri, 29 Feb 2008 09:57:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=eSYcjsDf3v0+xsNgjmAvTl3e2O2tuDbENqSO6cv88ro=; b=WK38URFYEVlqP19wF3+kzrgOI6sLmkdm3sJxoFGbRggwATqPl9HT2D7Vfa46n2mhDPjdbx/3iYcJZPi6UtVl0G14f172XJHn2KTdIaXw2ZhF+AC5a8SJkVFizxEpOamG8NlkVjgUFZhKpCy7Yk2h9bjFsYKQKJqU9ImlDog9bBk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=p2AshhxT6MEKV5DobcBtxu+b0T+GdFfmDQs5Z0s5R3ZWDMKEyjskurIutnd32rEX4A95wwO2dAA4aMnPCqmODX1sPhw4VGLVDcfhWvBnJt/EUKmIAn+zaxYLjg5vuWHmlu3uNZIC+OOszr+sBpOkS9JwmK+heWZ+IYGV7wR4T5w= Original-Received: by 10.142.241.10 with SMTP id o10mr7208770wfh.27.1204307834486; Fri, 29 Feb 2008 09:57:14 -0800 (PST) Original-Received: by 10.142.111.4 with HTTP; Fri, 29 Feb 2008 09:57:14 -0800 (PST) In-Reply-To: Content-Disposition: inline X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) 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:90900 Archived-At: On 29/02/2008, Stefan Monnier wrote: > Not really. It just means it will only work 99%. > Quite different 99% approach sketched below, uses our old friend the idle timer, to show the window position in the fringe with a 2 sec lag. Works better than I expected. I think I'm not quite getting something though: why are fringe marks "replacing" display properties (i.e. if a character pos has a fringe display property, the character isn't displayed)? - that leads to my use of before and after string properties. I wanted to hide the fringe marks conditionally while they align with the real window-start and window-end (they're not useful then), but because the fringe marks are "replacing", the magic "when" conditional display property is unsuitable for that. If before/after-string properties supported "when" or fringe marks weren't "replacing" display properties.... (defface window-pos-fringe '((t (:foreground "cyan"))) "Window pos fringe face" :group 'scrolling) (defvar show-old-window-pos-overlay (make-overlay (window-start) (window-end))) (overlay-put show-old-window-pos-overlay 'before-string (concat (propertize "[" 'display (list 'left-fringe 'top-left-angle 'window-pos-fringe)) (propertize "[" 'display (list 'right-fringe 'top-right-angle 'window-pos-fringe)))) (overlay-put show-old-window-pos-overlay 'after-string (concat (propertize "]" 'display (list 'left-fringe 'bottom-left-angle 'window-pos-fringe)) (propertize "]" 'display (list 'right-fringe 'bottom-right-angle 'window-pos-fringe)))) (defun update-window-pos-overlay () (move-overlay show-old-window-pos-overlay (window-start) (- (window-end) 1) (window-buffer)) (redisplay)) (run-with-idle-timer 2 t 'update-window-pos-overlay)