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: Fri, 6 Oct 2017 00:50:10 -0700 Message-ID: <6CA5DFB3-8D0C-4B3D-9F72-3434F83B5895@gmail.com> References: <83h8vdwh7t.fsf@gnu.org> <83d161wenj.fsf@gnu.org> <1507259379.15251.27.camel@gmail.com> <834lrcwxd0.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1507276256 3597 195.159.176.226 (6 Oct 2017 07:50:56 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 6 Oct 2017 07:50:56 +0000 (UTC) Cc: rswgnu@gmail.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 06 09:50: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 1e0NPB-0007oo-Mz for ged-emacs-devel@m.gmane.org; Fri, 06 Oct 2017 09:50:45 +0200 Original-Received: from localhost ([::1]:43434 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e0NPG-0007DP-22 for ged-emacs-devel@m.gmane.org; Fri, 06 Oct 2017 03:50:50 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54224) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e0NOi-0007DI-NU for emacs-devel@gnu.org; Fri, 06 Oct 2017 03:50:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e0NOh-0002eU-QB for emacs-devel@gnu.org; Fri, 06 Oct 2017 03:50:16 -0400 Original-Received: from mail-pf0-x234.google.com ([2607:f8b0:400e:c00::234]:50860) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e0NOf-0002c3-KF; Fri, 06 Oct 2017 03:50:13 -0400 Original-Received: by mail-pf0-x234.google.com with SMTP id m63so9196002pfk.7; Fri, 06 Oct 2017 00:50:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=fM/1/dDDNIfcrQpRj+/v7WURHQdgERex6TENBm5ntw4=; b=bFS8EamBomGVvBauOQ2BWiaUmjeOyXUg+UAFXLWzZalkY0oD64VLhrhAwhHR4DS5SC 08DyoZ5iH1J6pnu2dhjCmXlNmpWRV/BSn0cHCadIbP9NXBn/fbrYaivlgTlQHcDFOVIs pSZxs7Mk2UJKiVWm0Y/ZlMTPqWM37JI2dbelDfczcMpkSrY/zPk50wExKprZc9gBILDk eWQMYoKSBhHN6Cx5ueegk4T1EaIpoVOUtzFDRR9uaSGydq2V9TYqfimfxl/br1Aj59f2 PH4yqcgOrbGUzjy4hIxV34uDAVsdGUqYenYU/GxdgslnTeLjifJIN8ra9uJ4lSMHU7zz Hj6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=fM/1/dDDNIfcrQpRj+/v7WURHQdgERex6TENBm5ntw4=; b=FH5UVRApBlWjESYldKdWDRRcMserj+vZqN6eeQMQxbtoBwNU/8ie0Y8BfBx+zsE6dZ x3GFjU/E4XOgsRAv2LqxaLkkkoYCZKtfhT3bNGEDPD5/Lirv7wZ5zdZFublHZ+YlLKp9 N1J4VKBEyxzYDtemF0Lau3Nerf3ZXWQXHoLrWrNyyBI6t/u297LB5cQzNLnLP6HZV4Xo i6Dcu6Qn4DHRyo8+IhKg/AOYoi+hBc6hi7WZmlVTsTuvS669K8VMpAKVXmjNGtvQDOfi AuEpqy0RB9v7ODpVm4IOWa+PbJQtiHR4sYwmStwRYLbTgWKuZkuoBitifQcuDFLTB8bQ 0YcA== X-Gm-Message-State: AMCzsaWvhV5y0q6Squ3NgmZzrb/dvjLzewfCQpg9RIh+ytr7HYMiJ9+t 9wwBQ0Mhp3uOrGXpC9l+DJ7CsrtW X-Google-Smtp-Source: AOwi7QAFgHSYuUgXCDA6Bhufsibx7s3sCHoNUejcyC+ZsEkrFeLudepMFbHilfbiW9ite6sreciCww== X-Received: by 10.99.4.129 with SMTP id 123mr1267604pge.20.1507276212259; Fri, 06 Oct 2017 00:50:12 -0700 (PDT) Original-Received: from ?IPv6:2601:647:4e00:bb4b:c130:ac0b:c011:d4ac? ([2601:647:4e00:bb4b:c130:ac0b:c011:d4ac]) by smtp.gmail.com with ESMTPSA id t87sm1817387pfi.180.2017.10.06.00.50.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Oct 2017 00:50:11 -0700 (PDT) In-Reply-To: <834lrcwxd0.fsf@gnu.org> X-Mailer: Apple Mail (2.3273) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c00::234 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:219167 Archived-At: Yes, I should have read the comment literally right above the line I = suggested changing.=20 I didn=E2=80=99t mean to offer that snippet as a solution, just as a = suggestion for anyone compiling themselves. I would be more formal = otherwise. If I understand the problem correctly, since orientation depends on = paragraph, does that mean line numbers could be on different sides in = the same window? I think I have an approach for fixing this > On Oct 6, 2017, at 12:26 AM, Eli Zaretskii wrote: >=20 >> From: Matthew Plant >> Cc: emacs-devel@gnu.org >> Date: Thu, 05 Oct 2017 20:09:39 -0700 >>=20 >>> 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. >>>=20 >> For now, you can go to src/xdisp.c:20996 and change the line: >> strcat (lnum_buf, " "); >> to =20 >> strcat (lnum_buf, "|"); >=20 > The problem with this is that in R2L paragraphs the glyph should > _precede_ the number, i.e. be to the left of the number. And when the > number is generated for the first line to be redrawn, the paragraph > direction was not yet computed. This is the technical problem to > which I alluded. Until I find a way to solve it, such solutions > cannot be accepted, sorry. >=20 >> Although I think I like the pipe character better than the space. >=20 > That definitely depends on the font you are using. Some fonts have an > extremely ugly pipe glyphs. So this will have to be another > customization option, not just a hard-coded character.