From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Zhu, Shenli" Newsgroups: gmane.emacs.devel Subject: Re: scrollbar alternative Date: Tue, 16 Mar 2010 11:12:54 +0800 Message-ID: <4B9EF736.2040203@gmail.com> References: <87vdcxwd7r.fsf@engster.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="------------000401030704050708030908" X-Trace: dough.gmane.org 1268709412 30968 80.91.229.12 (16 Mar 2010 03:16:52 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 16 Mar 2010 03:16:52 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Mar 16 04:16:48 2010 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.69) (envelope-from ) id 1NrNE5-0001UX-9m for ged-emacs-devel@m.gmane.org; Tue, 16 Mar 2010 04:16:48 +0100 Original-Received: from localhost ([127.0.0.1]:40672 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NrNDo-0008Rp-HY for ged-emacs-devel@m.gmane.org; Mon, 15 Mar 2010 23:13:32 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NrNDj-0008Rk-DQ for emacs-devel@gnu.org; Mon, 15 Mar 2010 23:13:27 -0400 Original-Received: from [140.186.70.92] (port=37271 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NrNDZ-0008Rb-7y for emacs-devel@gnu.org; Mon, 15 Mar 2010 23:13:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NrNDM-0006dR-FJ for emacs-devel@gnu.org; Mon, 15 Mar 2010 23:13:05 -0400 Original-Received: from mail-yw0-f181.google.com ([209.85.211.181]:52627) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NrNDM-0006dG-7K for emacs-devel@gnu.org; Mon, 15 Mar 2010 23:13:04 -0400 Original-Received: by ywh11 with SMTP id 11so1253514ywh.27 for ; Mon, 15 Mar 2010 20:13:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type; bh=iaVkykLM368QZ1Br78982QRGq58DZK5488bs+SQkCuY=; b=BRKL+SWPqzfJV7PoApL1f1LAf0xBPIBSlTZcfgokArasa7QFr1hrMzCToPlQWVKedL txVt0yWSyIu+gQBouo3TYm4zdH/F7H7s3+mNVwrls2dcZMdjFPolJvpshkmWNkBotapx s1OgzJJZj+kHTL8wk16KcVq7WJz/bEStexLUM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type; b=MJev9CYw1f//V22I1vqI6O0NFC1TwViphYP+v/EIATOlY0UdRl7DUbuG0agKfCUeGh equcVoUHiKp68pVqb1AY3OSF8omD3VHN6CU1lwArav9GuyYni2KHYlsj5i/LRawmL2XO P7s4/M8DwOCNrAVWXupXjmw2CgfPfzMucEa6A= Original-Received: by 10.101.191.4 with SMTP id t4mr2098480anp.232.1268709181976; Mon, 15 Mar 2010 20:13:01 -0700 (PDT) Original-Received: from [116.232.92.100] ([116.232.92.100]) by mx.google.com with ESMTPS id 9sm1858750ywe.22.2010.03.15.20.12.58 (version=SSLv3 cipher=RC4-MD5); Mon, 15 Mar 2010 20:13:00 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3 In-Reply-To: <87vdcxwd7r.fsf@engster.org> X-detected-operating-system: by eggs.gnu.org: GNU/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:122036 Archived-At: This is a multi-part message in MIME format. --------------000401030704050708030908 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 03/16/2010 04:18 AM, David Engster wrote: > Leo writes: > >> On 2010-03-15 17:28 +0000, David Engster wrote: >> >>> To me, the GTK scrollbars always behaved a bit strange in this regard, >>> anyway. For example, I think scrollbars should be hidden when there is >>> nothing to scroll, this way giving you an immediate optical hint that >>> you're currently seeing everything there is. But in Emacs, you can >>> always scroll the window until (window-start) reaches (point-max). >>> >>> Therefore, I also disabled the scrollbar and now use some code to get a >>> scrollbar-like display in the mode-line. I know there's >>> size-indication-mode, but I find an information like "13% of 2.8k" not >>> very helpful. >>> >> Does your code just show the percentage in a fancy face? >> >> I turned off scrollbar too and use fringe arrows and percentage on the >> modeline. I tried your code but didn't notice any difference. >> > It displays the percentage and displays a moving bar, just like a > scrollbar, but you can't drag it. It should look something like this: > > > > > > -David > Hi David, I tried to copy your code to my .emacs file, but my mode bar doesn't change like yours. Shall I change something else? My mode bar look like: mode bar only percentage Thanks in advance! Shenli --------------000401030704050708030908 Content-Type: multipart/related; boundary="------------060505070001060909040304" --------------060505070001060909040304 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On 03/16/2010 04:18 AM, David Engster wrote:
Leo <sdl.web@gmail.com> writes:
  
On 2010-03-15 17:28 +0000, David Engster wrote:
    
To me, the GTK scrollbars always behaved a bit strange in this regard,
anyway. For example, I think scrollbars should be hidden when there is
nothing to scroll, this way giving you an immediate optical hint that
you're currently seeing everything there is. But in Emacs, you can
always scroll the window until (window-start) reaches (point-max).

Therefore, I also disabled the scrollbar and now use some code to get a
scrollbar-like display in the mode-line. I know there's
size-indication-mode, but I find an information like "13% of 2.8k" not
very helpful.
      
Does your code just show the percentage in a fancy face?

I turned off scrollbar too and use fringe arrows and percentage on the
modeline. I tried your code but didn't notice any difference.
    
It displays the percentage and displays a moving bar, just like a
scrollbar, but you can't drag it. It should look something like this:

  
-David
Hi David,

I tried to copy your code to my .emacs file, but my mode bar doesn't change like yours. Shall I change something else?

My mode bar look like:
mode bar only percentage

Thanks in advance!
Shenli
--------------060505070001060909040304 Content-Type: image/png; name="mode-bar.png" Content-Transfer-Encoding: base64 Content-ID: Content-Disposition: attachment; filename="mode-bar.png" iVBORw0KGgoAAAANSUhEUgAAAbkAAAAnCAIAAAAdLaH4AAAAAXNSR0IArs4c6QAAAAlwSFlz AAAQdQAAEHUBmDo42wAAAAd0SU1FB9oDEAMGH7HcrIwAAAAZdEVYdENvbW1lbnQAQ3JlYXRl ZCB3aXRoIEdJTVBXgQ4XAAASpUlEQVR42u2dd1xT1xfAz8uGQCDMMMIQiQjKUsHianAAdeAC RRS1KtatoBZx1NZtxQXigFrceyBacSBoVVyA4AQRRQUCBoJAQuZ7vz8IiMpQf9RavN+/ePe9 z7nhnHPPPfe8cTGCIKAlqKysbLBdW1sbEAgE4j8OCakAgUAgUKxEIBCIFoACACrhnb/OpT99 UVguA+7w+T920MTUZ1Xlj1POXLz9RCgFTJPj6jtmQDsmBoCLn14+efr6E5GCrG3R2XtoPwdd MlIlAoFo5bESV0gxNs/Drs3thKv1ThHSZ2d3HsxkuXsFDOQw8arSSiYJAAAvzzi8//IbxyGT RhlX3o0/cmSfpuFPvTSQLhEIROuOlVST7gNMAGSPHyaA6m2orHyQlKF0HjXa24aBAQCYq3NN 0b3UfLJ9oJejGQMD/oDOWTG3bxd59NRBykQgEK06VjaMXJBdTDbvUJK449g9gYxuaOvmNaCn jRZJUfKsFAw8OHQMAIBiYMMh33xZKAEdVPpEIBCtlkYDHCF9U6mQ5yalYZ39Jk0e7WkiSNl/ KK1cRciqJARJUwsK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eC5MEoVuzlu WXBsNVD07X2meJABgEavTN+1bPfaChVQ9e37hK76sV2zTwxVJK+aXu+2heXkPdu6X/1pzPZ8 dUPYAD4AmI+P2xlk1rB8AgDI2t8NNrn629it5VSjTqOWhXsZkz/DOw9ObLBfSyoAkNjdZod4 Lto4J3AnQLu3GV5j7R/YHSssLETvgyO+LlSC+NnBZ3pER/ubt/zMLHscGTgl+buNe0KcmB8R /XDhhZ9/3Gu/IWa8Da1V6eErWq2ILs7wi7LceHBeh69nj8MP7Y7eB0d8fZA5XrPHWOdnFv8D 70ErS9LTJQ5jR3VgflSaiJc9eqwzJHR4G1or0wPiU+2O8koEAoHyyubBQkNDkbEQCASimVhZ UVHR4Am0pxgCgUDUgeqVCAQCgWIlAoFAoFiJQCAQKFYiEAjE18L/ACEWaHIxvHLFAAAAAElF TkSuQmCC --------------060505070001060909040304-- --------------000401030704050708030908--