From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.devel Subject: Re: Native display of line numbers Date: Sun, 18 Jun 2017 18:03:18 +0700 Message-ID: References: <83lgoqzm0v.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1497783831 11684 195.159.176.226 (18 Jun 2017 11:03:51 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 18 Jun 2017 11:03:51 +0000 (UTC) Cc: Emacs developers To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jun 18 13:03:47 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 1dMXzf-0002oA-7J for ged-emacs-devel@m.gmane.org; Sun, 18 Jun 2017 13:03:47 +0200 Original-Received: from localhost ([::1]:37892 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dMXzk-0001Xz-Gq for ged-emacs-devel@m.gmane.org; Sun, 18 Jun 2017 07:03:52 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34617) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dMXzb-0001Xq-Vm for emacs-devel@gnu.org; Sun, 18 Jun 2017 07:03:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dMXzb-00049m-2M for emacs-devel@gnu.org; Sun, 18 Jun 2017 07:03:44 -0400 Original-Received: from mail-wr0-x235.google.com ([2a00:1450:400c:c0c::235]:34707) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dMXzZ-00045K-Fy; Sun, 18 Jun 2017 07:03:41 -0400 Original-Received: by mail-wr0-x235.google.com with SMTP id 77so57957501wrb.1; Sun, 18 Jun 2017 04:03:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-transfer-encoding; bh=Nt3nLAbmuNe8JMzbdrZOyOui8DomfpBdQCVbeDw987Q=; b=KLnDRDL/qV7CHVeQlOUYCxoGgEpV4B40dgz1Irvx0p9jTnl4z8SXYoVcWMw2K8zuwn k2lSwf4kq0tRZ0nbwc458n1Tzuq0zLZk2BNtbhKw++jTImpXZbDtw/kCD99xHa7ZT08G pdnX1DTMQLK+q+qtBeZiCopWEr1GlfROoNttvEmm6r4JJITLTFFrfZBv3jlZqRHerU4j 1eCCjPSEZ6QQdvWgdaPXoNHqcKWmmvF5ohxrDyNGElFf7xEH+W5wPdWZmsG2MIZcF5Ao yz0KWwg3NirszC8/nWDHgNcPO9QgGCTET3i4tIKWRNUkO6zGsVU+GwgVx/x75Hk7SZPv p25Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-transfer-encoding; bh=Nt3nLAbmuNe8JMzbdrZOyOui8DomfpBdQCVbeDw987Q=; b=PoRrylIKZfTiCvS1X7h0AlHKfZDitHg/r717Lqx+Qu/JbGzpu/i2GpLhRWik/S8B+t SCVcO5YZ507XB5hz/Y34tppcWI3GdpZ1YFEAmGEjklPQ9Rsa6cFq6mwunOvbIM8iqJMi pQoGXMDsZ+l74yp4HpMOwmLwibt6haGVLHH05/Y65G1f6O2Ty9LEMYWXwCs/SC79+5MD nqnbswfAmR53AaQTsTO4gdQR+Qywp6PBsWENocoUjD99nZEJLqCPYBOIaY1+dh7yKoUh zi/dTxyBDbtNx906Ynh9PV+jxjpSQv84jGR/Psuhcq8pH9iiLTUbgFW3guPfNp1BgtLu 6GrA== X-Gm-Message-State: AKS2vOwuDML9RDkwVDuyaR1UR1gV7xVFaAR72NvvvlOCypKXi3m5rIjf HntZl9FqTO1FhidjtSYVctff5gGZ8Q== X-Received: by 10.223.163.89 with SMTP id d25mr12688057wrb.98.1497783819574; Sun, 18 Jun 2017 04:03:39 -0700 (PDT) Original-Received: by 10.223.164.93 with HTTP; Sun, 18 Jun 2017 04:03:18 -0700 (PDT) In-Reply-To: <83lgoqzm0v.fsf@gnu.org> X-Google-Sender-Auth: 8hRQ5rVYDrBoYlW3788dsXPI6uw X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::235 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:215737 Archived-At: On Sat, Jun 17, 2017 at 10:12 PM, Eli Zaretskii wrote: > I came up with an implementation of a native > display of line numbers. You can find it in the scratch/line-numbers > branch of the Emacs repository. It is nice to have native line numbers. They work with a non-default background, correctly handle line wrapping, and even when their face is customized to a smaller size. (In a larger size, their tops get truncated, but that=E2=80=99s firmly in the =E2=80=9Cdon=E2=80=99t to that,= then=E2=80=9D territory.) But now we have three facilities that can display auxiliary information around the buffer text: margin, fringe, and line numbers, all with their own unique limitations: * The margin=E2=80=99s limitation is that its overall background is defined= by the default face. Fragments of text are displayed in the margin can specify their own background, but the space where nothing is displayed is always the same color as the buffer. Also, overlay performance. * The fringe can only display bitmaps, only monochrome bitmaps, and only bitmaps at native display resolution. Which makes all bitmaps that are designed for low resolution displays unreadably tiny on a HiDPI display. * And the line numbers area only displays line numbers. The relative ordering of the margin and fringe can be customized with =E2=80=98fringes-outside-margins=E2=80=99 but line numbers are always insid= e both of those. That means a line number area with a non-default background color will visually divide the display. Also, the line wrapping indicator in the fringe is visually separated from the wrapped line. IMO, it should be possible to put the fringe, and maybe the margin, inside line numbers.