From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Dani Moncayo Newsgroups: gmane.emacs.devel Subject: Re: Proposal: new mode-line `%'-construct %o meaning "Degree of travel of window through buffer". Date: Thu, 18 May 2017 21:16:06 +0200 Message-ID: References: <20170515204416.GA7349@acm.fritz.box> <8337c57bgj.fsf@gnu.org> <20170516203759.GA5238@acm.fritz.box> <20170517213237.GA4156@acm.fritz.box> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: blaine.gmane.org 1495134973 12509 195.159.176.226 (18 May 2017 19:16:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 18 May 2017 19:16:13 +0000 (UTC) Cc: Emacs development discussions To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu May 18 21:16:10 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dBQu9-0003As-VV for ged-emacs-devel@m.gmane.org; Thu, 18 May 2017 21:16:10 +0200 Original-Received: from localhost ([::1]:55214 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dBQuF-0001up-KB for ged-emacs-devel@m.gmane.org; Thu, 18 May 2017 15:16:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54320) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dBQu9-0001uk-2L for emacs-devel@gnu.org; Thu, 18 May 2017 15:16:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dBQu8-0001NF-6G for emacs-devel@gnu.org; Thu, 18 May 2017 15:16:09 -0400 Original-Received: from mail-wr0-x236.google.com ([2a00:1450:400c:c0c::236]:33841) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dBQu7-0001MZ-W2 for emacs-devel@gnu.org; Thu, 18 May 2017 15:16:08 -0400 Original-Received: by mail-wr0-x236.google.com with SMTP id l9so1953133wre.1 for ; Thu, 18 May 2017 12:16:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=6oBtfWFF6Fs4WkM39Py8UBBcrFyI8TKZPzJmKK2jz+M=; b=IlOJDgZcWEDR9SdbGGXplb/6a9t22nurBqb3DmZbi77RYFke5cob+Lu7076w9sTRaL 4/5vydERBRxXkgXhoOtHsNWIOU5KRl3e7ZWD4XBfIwwOay9ilb4BmSQgjuLyPGErq0eV GIut/eh/hXC+YB2DUWk18BFD9/55DX6NNb8ARzD2cuj4FueHXhRDbNGEQHJeej5HONsY R4K5ZSn2SEomxh9z64Q5ttoUIFbUNNV0bzk7GlvG468QAp4rNVzf44BO1qt38O5gGLDH 1G47K1OQNYsmicDdqR13mik+Su5ocrX6SutASmOdkM7pBKE5CIM9TGOY8LXxTy1kQQ7h 1jhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=6oBtfWFF6Fs4WkM39Py8UBBcrFyI8TKZPzJmKK2jz+M=; b=awziVtiyb335ts9hoDmHcdF8uODpEoX+xIYDyBFeecNC9+M4XOGWKSgt1K248SEuOi hgqZ5fHvDmxyKjwSHuSJCmfoZHUZXdkqqvF/pTFUfBiS/gbslMWLy85nDt1UBZTVjFiF qN4iyEa8OUilRTQyI3Ubio4dhkNH5lSzox66SLOjC3IMLsd1i02nIIJ4pNHqeV90hG2j KtwW2UMLsw5g5veij93nDwjtJtZT1URH7lNYcWHwb43PcR/TgTUk2GLyusM1BZih020k RuCVDs0WoNPoCu6AYl5dR42zl50H64/Q1a5xCY/M4Jfg2S+dOCEqFRubfkvYCpm73ayR yVfA== X-Gm-Message-State: AODbwcB9dr1k02KF0FHwhvvYjE/QoLvUuHkKw1IXcH9ZSkt0m3Vougtx FZ/OGf06qZd/f7EYgL7DERHQ34oACw== X-Received: by 10.46.83.94 with SMTP id t30mr1530397ljd.24.1495134966682; Thu, 18 May 2017 12:16:06 -0700 (PDT) Original-Received: by 10.25.29.6 with HTTP; Thu, 18 May 2017 12:16:06 -0700 (PDT) In-Reply-To: <20170517213237.GA4156@acm.fritz.box> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::236 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:214956 Archived-At: On Wed, May 17, 2017 at 11:32 PM, Alan Mackenzie wrote: > Hello, Eli and Dani. Hi Alan, thanks for working on this. > For %q, I haven't included the parentheses Dani suggested, and it's a > bit DWIMy, with things like "All", "Top-5%", "63%-Bot", "15-25%". > > Just to save you some work, I found the following useful for trying them > out, by setting the pertinent part of the standard mode-line format. > (i) (For %O): (aset (cadr (car mode-line-position)) 1 ?O) > (ii) (For %q): (aset (cadr (car mode-line-position)) 1 ?q) > and (setcar (car mode-line-position) -7) > > Thoughts? Wrt %q, I find the format to be too irregular. I'd prefer to stick to "N-M%" (with no whitespace around the hyphen), even when N is 0 or M is 100. The only exception to that format would be when N=0 _and_ M=100, in which case I'd prefer "All" rather than "0-100%". Also, I'd like the whole text related to %q to take a constant amount of space in the modeline, to avoid shifting any text to the right side of %q. Thanks. -- Dani Moncayo