From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.devel Subject: Re: scrollbar alternative Date: Tue, 16 Mar 2010 13:44:50 +0100 Message-ID: References: <87vdcxwd7r.fsf@engster.org> <4B9EF736.2040203@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=001485f795f43be65c0481ea5e21 X-Trace: dough.gmane.org 1268743536 31578 80.91.229.12 (16 Mar 2010 12:45:36 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 16 Mar 2010 12:45:36 +0000 (UTC) Cc: emacs-devel@gnu.org, "Zhu, Shenli" To: Drew Adams Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Mar 16 13:45:32 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 1NrW9F-0003Lj-4N for ged-emacs-devel@m.gmane.org; Tue, 16 Mar 2010 13:45:25 +0100 Original-Received: from localhost ([127.0.0.1]:52720 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NrW9E-00077L-3I for ged-emacs-devel@m.gmane.org; Tue, 16 Mar 2010 08:45:24 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NrW97-000758-Qt for emacs-devel@gnu.org; Tue, 16 Mar 2010 08:45:17 -0400 Original-Received: from [140.186.70.92] (port=39113 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NrW94-000707-8T for emacs-devel@gnu.org; Tue, 16 Mar 2010 08:45:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NrW92-0002zs-6g for emacs-devel@gnu.org; Tue, 16 Mar 2010 08:45:14 -0400 Original-Received: from mail-fx0-f210.google.com ([209.85.220.210]:36574) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NrW91-0002zo-OK for emacs-devel@gnu.org; Tue, 16 Mar 2010 08:45:12 -0400 Original-Received: by fxm2 with SMTP id 2so588408fxm.26 for ; Tue, 16 Mar 2010 05:45:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:cc:content-type; bh=fANwyMtjHkqaWuAvrrst0oe0R0UiZCtt4Uo4DTt7Wjg=; b=uOYUweJr18OU05PaDbKoABG/z5TRFL16euPY1t2q4mBBNcq4iiJo1XnqfOeNkiLRLP dF/+1yYIuhA9r0zVCBu9T8x+h/gxyOusjcRafIoHrrU+rJc3hbn0IfM+aKczj3JIyZ4I VuBmtHCns8t2QK6a1rhtzNxQrl+PWKI9ERu0M= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=VFMHweHNHpavk1woUalWEQNUUphvS8DyFV2bprrpGREFsQNpgwX3yrZTrfZUi+9wqZ RZabVUydV1e0ULOPaFqm6rhETXONLI1g7N2Hy6U0BG5JUI7/tWAhvxSjnbZEXdpHAMv7 GDfS2KPcPfFAZjdSQ5GFqra4D6js2+tCED5p4= Original-Received: by 10.239.188.146 with SMTP id p18mr1075511hbh.208.1268743510156; Tue, 16 Mar 2010 05:45:10 -0700 (PDT) In-Reply-To: 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:122055 Archived-At: --001485f795f43be65c0481ea5e21 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Tue, Mar 16, 2010 at 5:34 AM, Drew Adams wrote: >> I tried to copy your code to my .emacs file, but my mode bar >> doesn't change like yours. Shall I change something else? > > If your window is not wide enough, it might actually be "showing", but of= f to > the right, too far for you to see (outside the window). =C2=A0The mode li= ne can be > truncated at the right, depending on the window width. If you make your w= indow > wider, you might see the indicator. > > (That explanation doesn't apply if your Emacs version is 21 - in that cas= e, the > indicator appears just after the buffer name.) > > Try this (same code, just tweaked a bit, mainly to avoid wrapping by my m= ailer). > The last line here moves the indicator to where the size indicator normal= ly is, > just after the buffer name, so you should be able to see it OK. I like the feature. I think something like this should be in Emacs. Attached is a little bit more elaborated version. Name suggestions are welc= ome. --001485f795f43be65c0481ea5e21 Content-Type: text/plain; charset=US-ASCII; name="sml-modeline.el" Content-Disposition: attachment; filename="sml-modeline.el" Content-Transfer-Encoding: base64 X-Attachment-Id: f_g6up1tea0 Ozs7IHNtbC1tb2RlbGluZS5lbCAtLS0gU2hvdyBwb3NpdGlvbiBpbiBhIHNjcm9sbGJhciBsaWtl IHdheSBpbiBtb2RlLWxpbmUKOzsKOzsgQXV0aG9yOiBMZW5uYXJ0IEJvcmdtYW4gKGxlbm5hcnQg TyBib3JnbWFuIEEgZ21haWwgTyBjb20pCjs7IENyZWF0ZWQ6IDIwMTAtMDMtMTYgVHVlCjs7IFZl cnNpb246Cjs7IExhc3QtVXBkYXRlZDoKOzsgVVJMOgo7OyBLZXl3b3JkczoKOzsgQ29tcGF0aWJp bGl0eToKOzsKOzsgRmVhdHVyZXMgdGhhdCBtaWdodCBiZSByZXF1aXJlZCBieSB0aGlzIGxpYnJh cnk6Cjs7Cjs7ICAgTm9uZQo7Owo7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7 Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Oz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bC4iCiAg OnR5cGUgJyhjaG9pY2UgKGNvbnN0IDp0YWcgIk5vbmUiIG5pbCkKICAgICAgICAgICAgICAgICAo Y29ucyAoc3RyaW5nIDp0YWcgIkxlZnQgYm9yZGVyIikKICAgICAgICAgICAgICAgICAgICAgICAo c3RyaW5nIDp0YWcgIlJpZ2h0IGJvcmRlciIpKSkKICA6Z3JvdXAgJ3NtbC1tb2RlbGluZSkKCjs7 KHNtbC1jcmVhdGUpCihkZWZ1biBzbWwtY3JlYXRlICgpCiAobGV0KiAoKHdzdGFydCAod2luZG93 LXN0YXJ0KSkKICAgICAgICAod2VuZCAod2luZG93LWVuZCkpCiAgICAgICAgKHJlYWwtcG9pbnQt bWF4IChzYXZlLXJlc3RyaWN0aW9uICh3aWRlbikgKHBvaW50LW1heCkpKQogICAgICAgIChwZXJj ZW50YWdlLWJlZyAoLyAoZmxvYXQgd3N0YXJ0KSAoZmxvYXQgcmVhbC1wb2ludC1tYXgpKSkKICAg ICAgICAocGVyY2VudGFnZS1lbmQgKC8gKGZsb2F0IHdlbmQpIChmbG9hdCByZWFsLXBvaW50LW1h eCkpKQogICAgICAgIChzbWwtYmVnaW4gKG9yIChjYXIgc21sLWJvcmRlcnMpICIiKSkKICAgICAg ICAoc21sLWVuZCAgIChvciAoY2RyIHNtbC1ib3JkZXJzKSAiIikpCiAgICAgICAgKGlubmVyLWxl biAoLSBzbWwtbGVuIChsZW5ndGggc21sLWJlZ2luKSAobGVuZ3RoIHNtbC1lbmQpKSkKICAgICAg ICBicGFkLWxlbgogICAgICAgIGVwYWQtbGVuCiAgICAgICAgKHN0YXJ0IChmbG9vciAoKiBwZXJj ZW50YWdlLWJlZyBpbm5lci1sZW4pKSkKICAgICAgICAoZW5kIChjZWlsaW5nICgqIHBlcmNlbnRh Z2UtZW5kIGlubmVyLWxlbikpKQogICAgICAgIHN0cmluZykKICAgKGlmIChub3QgKG9yICg8IHdl bmQgcmVhbC1wb2ludC1tYXgpICg+IHdzdGFydCAxKSkpCiAgICAgICAiIgogICAgIChzZXRxIHN0 cmluZwogICAgICAgICAgIChjb25jYXQgKGZvcm1hdCAiJTAyZCIgKHJvdW5kICgqIHBlcmNlbnRh Z2UtYmVnIDEwMCkpKSAiIgogICAgICAgICAgICAgICAgICAgIi0iCiAgICAgICAgICAgICAgICAg ICAoZm9ybWF0ICIlMDJkIiAocm91bmQgKCogcGVyY2VudGFnZS1lbmQgMTAwKSkpICIlJSIKICAg ICAgICAgICAgICAgICAgICkpCiAgICAgKHNldHEgYnBhZC1sZW4gKC8gKC0gaW5uZXItbGVuIChs ZW5ndGggc3RyaW5nKSkgMikpCiAgICAgKHNldHEgZXBhZC1sZW4gKC0gaW5uZXItbGVuIChsZW5n dGggc3RyaW5nKSBicGFkLWxlbikpCiAgICAgKHNldHEgc3RyaW5nIChjb25jYXQgc21sLWJlZ2lu CiAgICAgICAgICAgICAgICAgICAgICAgICAgKG1ha2Utc3RyaW5nIGJwYWQtbGVuIDMyKQogICAg ICAgICAgICAgICAgICAgICAgICAgIHN0cmluZwogICAgICAgICAgICAgICAgICAgICAgICAgICht YWtlLXN0cmluZyBlcGFkLWxlbiAzMikKICAgICAgICAgICAgICAgICAgICAgICAgICBzbWwtZW5k KSkKICAgICAoYXNzZXJ0ICg9IChsZW5ndGggc3RyaW5nKSBzbWwtbGVuKSB0KQogICAgIChzZXRx IHN0YXJ0ICgrIHN0YXJ0IChsZW5ndGggc21sLWJlZ2luKSkpCiAgICAgKHdoZW4gKD0gc3RhcnQK ICAgICAgICAgICAgICAoc2V0cSBlbmQgKCsgZW5kIChsZW5ndGggc21sLWJlZ2luKSkpKQogICAg ICAgKHNldHEgZW5kICAoMSsgZW5kKSkpCiAgICAgKHdoZW4gKGFuZCAoPSAoZWx0IHN0cmluZyBz dGFydCkgMzcpCiAgICAgICAgICAgICAgICAoPSAoZWx0IHN0cmluZyBlbmQpIDM3KSkKICAgICAg IChzZXRxIGVuZCAgKDErIGVuZCkpKQogICAgIChwdXQtdGV4dC1w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