From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Proposal: new mode-line `%'-construct %o meaning "Degree of travel of window through buffer". Date: Wed, 17 May 2017 05:30:35 +0300 Message-ID: <83o9us5i5w.fsf@gnu.org> References: <20170515204416.GA7349@acm.fritz.box> <8337c57bgj.fsf@gnu.org> <20170516203759.GA5238@acm.fritz.box> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1494988255 22594 195.159.176.226 (17 May 2017 02:30:55 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 17 May 2017 02:30:55 +0000 (UTC) Cc: emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 17 04:30:52 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 1dAojj-0005mk-TJ for ged-emacs-devel@m.gmane.org; Wed, 17 May 2017 04:30:52 +0200 Original-Received: from localhost ([::1]:45129 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dAojp-00014p-AN for ged-emacs-devel@m.gmane.org; Tue, 16 May 2017 22:30:57 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33975) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dAoji-00014Q-Nl for emacs-devel@gnu.org; Tue, 16 May 2017 22:30:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dAoje-0000RS-8G for emacs-devel@gnu.org; Tue, 16 May 2017 22:30:50 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:50393) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dAoje-0000RK-5K; Tue, 16 May 2017 22:30:46 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2764 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dAojd-00078F-Gm; Tue, 16 May 2017 22:30:45 -0400 In-reply-to: <20170516203759.GA5238@acm.fritz.box> (message from Alan Mackenzie on Tue, 16 May 2017 20:37:59 +0000) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e 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:214901 Archived-At: > Date: Tue, 16 May 2017 20:37:59 +0000 > Cc: emacs-devel@gnu.org > From: Alan Mackenzie > > How about this as a design? We introduce a new variable > `mode-line-window-position', which will be a short propertised string > typically holding "%p", "%P", or "%o" (or even "%O") with the properties > currently on the corresponding part of mode-line-position. > The new `mode-line-position' "includes" `mode-line-window-position' in > the standard `mode-line-format' way. > > We also introduce a new customizable variable to set it with, which will > take one of these values: > nil: don't display the window position at all; > 'top: display the window position with "%p"; > 'bottom: display it with "%P"; > 'middle: display it with (the proposed) "%O"; > 'travel: display it with "%o"; > . > > That new variable will have as a :set value the (new) function > `mode-line-generate-window-position', which will do the obvious thing. Something like that is what I had in mind, yes. (Do we really need 2 variables?)