From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: "Perry E. Metzger" Newsgroups: gmane.emacs.devel Subject: Re: Advice needed on modeline customization hack... Date: Sun, 16 Apr 2017 18:06:20 -0400 Message-ID: <20170416180620.3615b4b6@jabberwock.cb.piermont.com> References: <20170415212800.5be89037@jabberwock.cb.piermont.com> <20170416094929.51e94c82@jabberwock.cb.piermont.com> <20170416104633.1768bbb6@jabberwock.cb.piermont.com> <20170416120942.36af8967@jabberwock.cb.piermont.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1492380420 15457 195.159.176.226 (16 Apr 2017 22:07:00 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 16 Apr 2017 22:07:00 +0000 (UTC) Cc: Stefan Monnier , emacs-devel@gnu.org To: =?ISO-8859-1?Q?Cl=E9ment?= Pit-Claudel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Apr 17 00:06:56 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 1czsJs-0003sR-3t for ged-emacs-devel@m.gmane.org; Mon, 17 Apr 2017 00:06:56 +0200 Original-Received: from localhost ([::1]:33678 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1czsJt-0002VO-2s for ged-emacs-devel@m.gmane.org; Sun, 16 Apr 2017 18:06:57 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55458) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1czsJK-0002V7-W1 for emacs-devel@gnu.org; Sun, 16 Apr 2017 18:06:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1czsJJ-0007JG-V2 for emacs-devel@gnu.org; Sun, 16 Apr 2017 18:06:22 -0400 Original-Received: from hacklheber.piermont.com ([2001:470:30:84:e276:63ff:fe62:3400]:52315) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1czsJJ-0007JC-RN for emacs-devel@gnu.org; Sun, 16 Apr 2017 18:06:21 -0400 Original-Received: from snark.cb.piermont.com (localhost [127.0.0.1]) by hacklheber.piermont.com (Postfix) with ESMTP id 0B7711F9; Sun, 16 Apr 2017 18:06:21 -0400 (EDT) Original-Received: from jabberwock.cb.piermont.com (jabberwock.cb.piermont.com [10.160.2.107]) by snark.cb.piermont.com (Postfix) with ESMTP id E21C02DE021; Sun, 16 Apr 2017 18:06:20 -0400 (EDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:470:30:84:e276:63ff:fe62:3400 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:214029 Archived-At: On Sun, 16 Apr 2017 16:59:01 -0400 Cl=E9ment Pit-Claudel wrote: > On 2017-04-16 12:09, Perry E. Metzger wrote: > >>> +(defvar column-number-mode-starts-from-zero t > >>> + "When set to true, Column Number mode displays columns > >>> starting from zero. +Otherwise, column numbers start from > >>> one.") =20 > >> Maybe "displayed column numbers" instead of "column numbers"? =20 > > So how would you like the final version to read? =20 >=20 > Would "Otherwise, displayed column numbers start from one." work? > Or does it sound unnatural? It seems fine to me, I'll make your suggested change. I found an issue, though, which is that there's code throughout xdisp.c that checks if w->column_number_displayed is the same as current_column() in order to decide if it should update the modeline. Naturally what I've done will break that. I'm thinking perhaps I should add a flag to the window structure instead that says "add one when printing this" instead of changing the value of w->column_number_displayed, but I can't quite figure out where the modeline actually gets printed, only where column_number_displayed gets set. (I'll keep hunting unless someone pipes up.) Perry --=20 Perry E. Metzger perry@piermont.com