From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Matthew Plant Newsgroups: gmane.emacs.devel Subject: Re: Emacs26: Quick thoughts on display-line-numbers-mode Date: Thu, 05 Oct 2017 20:09:39 -0700 Message-ID: <1507259379.15251.27.camel@gmail.com> References: <83h8vdwh7t.fsf@gnu.org> <83d161wenj.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1507259422 3027 195.159.176.226 (6 Oct 2017 03:10:22 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 6 Oct 2017 03:10:22 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii , rswgnu@gmail.com Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 06 05:10:18 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 1e0J1l-000089-8N for ged-emacs-devel@m.gmane.org; Fri, 06 Oct 2017 05:10:17 +0200 Original-Received: from localhost ([::1]:42737 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e0J1s-0000ff-OA for ged-emacs-devel@m.gmane.org; Thu, 05 Oct 2017 23:10:24 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34926) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e0J1E-0000fa-V8 for emacs-devel@gnu.org; Thu, 05 Oct 2017 23:09:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e0J1D-00033m-TE for emacs-devel@gnu.org; Thu, 05 Oct 2017 23:09:44 -0400 Original-Received: from mail-pf0-x22b.google.com ([2607:f8b0:400e:c00::22b]:51104) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e0J1C-00031f-9r; Thu, 05 Oct 2017 23:09:42 -0400 Original-Received: by mail-pf0-x22b.google.com with SMTP id m63so8911840pfk.7; Thu, 05 Oct 2017 20:09:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:subject:from:to:cc:date:in-reply-to:references :mime-version:content-transfer-encoding; bh=cStnRG9O6yiNA3btJbtTTSWmNdl9ZFMcYeGVR5aCguk=; b=c5unumDsalYxzMZkRIpmX4f81gMTtX5CREIBRIsgtiFhsHSrvImfg0dNNSmGENNK3P oLgMCM9uav7r4/gd8aZlsVqzbS5xi6qaCk3UHg4GAvzucxo0uLZ2Jpf9KnnQ1Pl5i+su x9jFqSXzkzyPAts5nknd2eM0dJLpVngig4edBzvFBHWEYaV6bneSxApCHH10ikZKG6nZ RkXFDHZe7mD1aq+cAt6z9K9Fj/z17+2vIuVU6I8ZZllphGnq0760zQ91LaFBg8O26X0+ q0riqgdVFMsQl/m8FRl5zCR/tT9vzH8ZXeGxjQUXlm1h7v3PJqe+rcLj8DyG/CMz2qC8 Y7HQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:mime-version:content-transfer-encoding; bh=cStnRG9O6yiNA3btJbtTTSWmNdl9ZFMcYeGVR5aCguk=; b=L319IqdrgUdkvRI1CFntIIb8cgdnf3irm1eUKESx5ieR9wwYg7cl13WlWniL0OysBW Yz3+vX5dx2YuEKBb7OcgmiQPOHluHBOIsgFIvoB805SOj91JGAoNl3ExoyP6EeqHlJU8 HyTbZLNM6o9jzUEPf4UvmxVLFA/vkL9Kf5/eDZ0ocgtarKFFxtTGQ0mn+tU6mQCDrG93 KgWVUgw81y0qJYDaF+/kArJPr2crlBPuvuxlChen00dUT8nLj9sFr4KhwJamQzaACXtU 2nPNUk1ly2VnxIZVASXpp7uycx3EZDJvRPGkZWobzuEQ04pJPhq7Ts6FoC4WnV3O04bo yggA== X-Gm-Message-State: AMCzsaX2U9OcyjvUV9Xz1G8zzW2jwSdAioY9EkmteK1H3B7mysQBONY1 uM3uGCJVViM/N+A6ATZtlhH9Yws2 X-Google-Smtp-Source: AOwi7QCRHjufOnHqrboxO2NlZkaCa1v5wBo4mLD7lepcPWULv956eZw1PdnQEwxftF4pQdAChq2HcQ== X-Received: by 10.98.102.216 with SMTP id s85mr723117pfj.334.1507259381114; Thu, 05 Oct 2017 20:09:41 -0700 (PDT) Original-Received: from Monolith ([2601:647:4e00:bb4b:da0a:30ed:edf:f4e9]) by smtp.googlemail.com with ESMTPSA id z74sm533521pfi.156.2017.10.05.20.09.40 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 05 Oct 2017 20:09:40 -0700 (PDT) In-Reply-To: <83d161wenj.fsf@gnu.org> X-Mailer: Evolution 3.24.5 (3.24.5-1.fc26) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c00::22b 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:219159 Archived-At: On Thu, 2017-10-05 at 22:58 +0300, Eli Zaretskii wrote: > > From: Robert Weiner > > Date: Thu, 5 Oct 2017 15:44:54 -0400 > > Cc: emacs-devel > > > > Separation between the numbers and the text is still kept, by > > means of > > a white-space glyph. > > > > So could you add a customization option for this glyph that would > > provide some visual separation, e.g. a > > hairline or something similar to the visual linum-mode provides? > > There's a technical problem with doing that, for which I didn't have > a > solution at the time and still don't. Such an option would also slow > redisplay, albeit in minor ways. > For now, you can go to src/xdisp.c:20996 and change the line: strcat (lnum_buf, " "); to strcat (lnum_buf, "|"); This change works pretty well, although it's not as nice as having a complete line. Although I think I like the pipe character better than the space. > > > 2. The mode-line popup menu that displays/hides line and col > > numbers in the mode=line could be > > expanded to > > > toggle this mode on and off locally and globally, as well as > > providing options for its various display > > settings: > > > relative, visual and absolute. > > > > I'm not sure I agree. The mode-line menu is for displays on the > > mode > > line. The display-line-numbers-mode and its variants can be > > turned on > > or off from the menu bar's Options menu. > > > > I see your point but do think in practice a lot of people would > > look to the mode-line menu if they could. Also, > > having all the options in one place would let people decide which > > to use at any given point without hunting > > around. I know I look at mode-lines a lot more than the menubar. > > Well, currently the mode line offers customization only of the stuff > that is displayed on the mode line, so I'm not sure why people would > look there or something else. > > > It would also force a cleanup of the menu item > > naming so that it was obvious where each option will display its > > numbers. > > Not sure I understand: the Options menu has Hide/Show sub-menu, which > is where we put all the toggle-type options. Line-number display is > one of them. So it looks like the current arrangement is consistent > with how we provide similar customizations. >