From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Kaushal Modi Newsgroups: gmane.emacs.devel Subject: Re: Proposal: new mode-line `%'-construct %o meaning "Degree of travel of window through buffer". Date: Mon, 22 May 2017 02:22:49 +0000 Message-ID: References: <20170515204416.GA7349@acm.fritz.box> <20170517211552.2a4dab7e@jabberwock.cb.piermont.com> <8360gy6b5y.fsf@gnu.org> <20170518120116.161c1098@jabberwock.cb.piermont.com> <83r2zm3zqz.fsf@gnu.org> <20170518124541.4cce1567@jabberwock.cb.piermont.com> <83pof63q9f.fsf@gnu.org> <20170518161304.456e6dce@jabberwock.cb.piermont.com> <83lgpt52uh.fsf@gnu.org> <20170518165124.7f19ef9b@jabberwock.cb.piermont.com> <83fug14bg0.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="001a113cc734cd67aa0550138c5f" X-Trace: blaine.gmane.org 1495419837 13895 195.159.176.226 (22 May 2017 02:23:57 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 22 May 2017 02:23:57 +0000 (UTC) Cc: emacs-devel@gnu.org To: acm@muc.de Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon May 22 04:23:50 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 1dCd0g-0003SJ-9u for ged-emacs-devel@m.gmane.org; Mon, 22 May 2017 04:23:50 +0200 Original-Received: from localhost ([::1]:40051 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dCd0l-0005Ty-Il for ged-emacs-devel@m.gmane.org; Sun, 21 May 2017 22:23:55 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49304) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dCczv-0005SQ-8N for emacs-devel@gnu.org; Sun, 21 May 2017 22:23:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dCczu-0008Bv-8O for emacs-devel@gnu.org; Sun, 21 May 2017 22:23:03 -0400 Original-Received: from mail-lf0-x22c.google.com ([2a00:1450:4010:c07::22c]:34204) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dCczt-0008Bn-SK for emacs-devel@gnu.org; Sun, 21 May 2017 22:23:02 -0400 Original-Received: by mail-lf0-x22c.google.com with SMTP id 99so23194350lfu.1 for ; Sun, 21 May 2017 19:23:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=8U+xPQCkXVii4pc6yCtCqf2+FcIBs4ElHC6erjXV7no=; b=Z9jwHITfXIvJvufzgh1m/RgpM5grxyc4XXOnPUFHOOyz1LHHXnDZxmeXcShrknhydJ Z2Vu+4QentA86tV5doY5Ecny7dwgtM/oWSLd2oknabAx2fiaRDzPbTNzXJxhXjRjl6Wj 5sleSBbt0Q7lmDUnUTjQrYn4RzzXCSeV9O3nwHFDX9TWWl824Yop0fHDva3VYPN8POlJ Qwu9D+mhgiO/mSZKFVwLJbrZ0idtrBjmIWHM+r3SJAVXH1d9Hc3eJjlJXpEjDiZHGVB4 zJYE/eFHLMvAw7NyAZcbH61JAm5PZ6g6wK/rT0Y1UllEpw6oWRGb5zQtS+at9EOWS3i8 3VgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=8U+xPQCkXVii4pc6yCtCqf2+FcIBs4ElHC6erjXV7no=; b=FW/gRoXQ3lv1PLJMfV+tYIyr0UUUp9IKBFyTqiyAVcwQsskfr/DYPCKl5Ncjc6Wrky I47YVNpv9bLBptb1i3ga2hAcNydt3zSUpbcXc4q9nCzba9O6zAUV2rgJVJaBEELbucnE SN8EMKAGe8ufF5QHZyZxn4FtgvlEr2xjghEmzAsibq8a+VPUzUHe5e9Kz8kqw6tu9c/1 8oRm083U/lQJJ5CyaVFUmXqRVeO4NM9h0vpczIsJS+HQH9lJIq8Gi2Bx6Q0ntlvYKq9+ 0FfYI7AGUdb+S7kbCHWKNIMcquphPCfiSnrWz1YzF5KzZ1L7EXr2qYQeX91vKO/Fj13N hWBw== X-Gm-Message-State: AODbwcA7NS1cpDq9Lo+dOsktTOms5zmE2x/plPCZbHIz21ZZhhYNNbn3 8Vjj7rk4OvhJWBzUFDpNlrda+pW9lA== X-Received: by 10.46.82.144 with SMTP id n16mr5325589lje.0.1495419780424; Sun, 21 May 2017 19:23:00 -0700 (PDT) In-Reply-To: <83fug14bg0.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4010:c07::22c 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:215075 Archived-At: --001a113cc734cd67aa0550138c5f Content-Type: text/plain; charset="UTF-8" Hi Alan, I like this feature. Thanks for implementing it. I like both %o and %q.. not sure which one to pick yet. I only have comments regarding the variable docstrings. (1) I suggest adding more detail to the docstring of the new variable along these lines: diff --git a/lisp/bindings.el b/lisp/bindings.el index 0e6ffc275e..2a079000bf 100644 --- a/lisp/bindings.el +++ b/lisp/bindings.el @@ -366,10 +366,20 @@ column-number-indicator-zero-based :version "26.1") (defcustom mode-line-percent-position '(-3 "%p") - "Specification of \"percentage offset\" of window through buffer -This option specifies both the field width and the type of offset -displayed in `mode-line-position', a component of the default -`mode-line-format'." + "Specification of \"percentage offset\" of window through buffer. + +This option is a list where the first element specifies the field +width to space-fill or truncate to, and the second element specifies +the type of buffer offset to display in `mode-line-position'. + +The field width is specified as an integer. If the integer is +negative (-N), the width is truncated to N characters, and if it is +positive (N), padding is added if needed to make the field N +characters wide. + +The buffer offset component can be one of \"%o\", \"%p\", \"%P\" or +\"%q\". See `mode-line-format' for more information on these % +constructs." :type `(radio (const :tag "nil: No offset is displayed" nil) (const :tag "\"%o\": Proportion of \"travel\" of the window through the buffer" -- (2) The docstring of mode-line-format also needs to be update to explain the new options %o and %q. -- Kaushal Modi --001a113cc734cd67aa0550138c5f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Alan,

I like this feature. Thanks fo= r implementing it. I like both %o and %q.. not sure which one to pick yet.<= /div>

I only have comments regarding the variable docstr= ings.

(1) I suggest adding more detail to the docs= tring of the new variable along these lines:

= diff --git a/lisp/bindings.el b/lisp/bindings.el
index 0e6ffc275e= ..2a079000bf 100644
--- a/lisp/bindings.el
+++ b/lisp/b= indings.el
@@ -366,10 +366,20 @@ column-number-indicator-zero-bas= ed
=C2=A0 =C2=A0:version "26.1")
=C2=A0
=
=C2=A0(defcustom mode-line-percent-position '(-3 "%p")
- =C2=A0"Specification of \"percentage offset\" of = window through buffer
-This option specifies both the field width= and the type of offset
-displayed in `mode-line-position', a= component of the default
-`mode-line-format'."
+ =C2=A0"Specification of \"percentage offset\" of window = through buffer.
+
+This option is a list where the firs= t element specifies the field
+width to space-fill or truncate to= , and the second element specifies
+the type of buffer offset to = display in `mode-line-position'.
+
+The field width= is specified as an integer.=C2=A0 If the integer is
+negative (-= N), the width is truncated to N characters, and if it is
+positiv= e (N), padding is added if needed to make the field N
+characters= wide.
+
+The buffer offset component can be one of \&q= uot;%o\", \"%p\", \"%P\" or
+\"%q\&= quot;. See `mode-line-format' for more information on these %
+constructs."
=C2=A0 =C2=A0:type `(radio
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(const :tag "nil: =C2=A0No offset is= displayed" nil)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(c= onst :tag "\"%o\": Proportion of \"travel\" of the= window through the buffer"
--=C2=A0

(2) The docstring of mode-line-format also needs to be update to ex= plain the new options %o and %q.

--

Kausha= l Modi

--001a113cc734cd67aa0550138c5f--