From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?K=C3=A9vin_Le_Gouguec?= Newsgroups: gmane.emacs.devel Subject: Re: Line height issues with display-line-number-mode Date: Fri, 10 May 2019 08:15:36 +0200 Message-ID: <87pnoq6div.fsf@gmail.com> References: <6fd496f0-7dd5-6c0e-5121-b618e7dca831@gmail.com> <83sgtqi02k.fsf@gnu.org> <83r29ahyz2.fsf@gnu.org> <83pnouhwxs.fsf@gnu.org> <83ef59igzc.fsf@gnu.org> <83tve5ghyd.fsf@gnu.org> <83h8a4hj5d.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="96888"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: emacs-devel@gnu.org, Noam Postavsky , monnier@iro.umontreal.ca To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri May 10 08:40:41 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hOzCw-000OwJ-K3 for ged-emacs-devel@m.gmane.org; Fri, 10 May 2019 08:40:38 +0200 Original-Received: from localhost ([127.0.0.1]:37787 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOzCv-0000fI-Ex for ged-emacs-devel@m.gmane.org; Fri, 10 May 2019 02:40:37 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:40860) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOyon-0006UF-KB for emacs-devel@gnu.org; Fri, 10 May 2019 02:15:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hOyom-0001QQ-Il for emacs-devel@gnu.org; Fri, 10 May 2019 02:15:41 -0400 Original-Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]:37864) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hOyom-0001Q5-6r; Fri, 10 May 2019 02:15:40 -0400 Original-Received: by mail-wr1-x433.google.com with SMTP id a12so6219117wrn.4; Thu, 09 May 2019 23:15:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=KLgZcQOvNW5ATOG9F6YNVCA0uCusSMf0u4oyMIe21qs=; b=R7+R4En38JNYgdLph/e9yBbCjFoYnv0GYaGHYDR/2vWMqhA6U2FJb0QP97H2f7SZTc qTXnq5sRYV5vhg9+gB7mLT+jnp+JRnWbtlL1JO8ma/B5PVVMfKyl0c1EvAm4wwc7yLea PCi6dyfg1dvk5FfuDtYbNlu69ojuy0LoU3NFiYQovPHJYIGljRduTRS0n/KpJJCvQdOG 1xAQtijtWsJeL3oI98/vpO69ursMNW+/GRG6XEK0j5eoTabCsmnWRE68FdNytA4ISFaM dbA19kL53jP00EbsHzHbY02MqVt6RBjov3h2amtBDBB/rVuxa3Hjk2S65//cXAmw4aXq OHuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=KLgZcQOvNW5ATOG9F6YNVCA0uCusSMf0u4oyMIe21qs=; b=VY++8Bm50mcAewgBDqH4V+qRuHkdvEph0ErCUBb7wNlFnCnug+oHE8Zbhs6swXs5qI JPTkkKeVxUOEKO7OP/rYLk2V9uzkyHzFkJpxisqfHGbJSPDOO9Qo6NWgLYs9wJfc0vvN UqsQvwZbdMShbhCC3qsHZs8J2LdrwOswY4503TuRI/x9WsnaU0VKL7KWG0amn7iTS1xw M0SKAtXobw7nq3HmUtZv01lTQS15+HuV08KQ6JPzaG5nViIWMxXKf8xVwZq5mA7WwSes oRI1p/6odxvAa8DhJAc5RBzukL1c0yX99OUtI7OaFpAsj4Y8XzcVT1ccYNK9iKKOd0G5 izfQ== X-Gm-Message-State: APjAAAWGfrvgMmIKfCTfHocO/JV9A+zZ9b9A1Hy6EFmAWzopLd3W6EXP huHel3SecVaiEnAkBmy+KdhDraAJk6M= X-Google-Smtp-Source: APXvYqxTMAIqxF35jeYSpoi+3ybktvamyQNMGEx3tX29QccXMLSg1L/hXzY8bevioqEdhKNCncKfEA== X-Received: by 2002:adf:ee01:: with SMTP id y1mr6216434wrn.51.1557468938319; Thu, 09 May 2019 23:15:38 -0700 (PDT) Original-Received: from my-little-tumbleweed (71.142.13.109.rev.sfr.net. [109.13.142.71]) by smtp.gmail.com with ESMTPSA id o8sm8620466wra.4.2019.05.09.23.15.37 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 09 May 2019 23:15:37 -0700 (PDT) In-Reply-To: <83h8a4hj5d.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 08 May 2019 21:54:06 +0300") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::433 X-Mailman-Approved-At: Fri, 10 May 2019 02:40:05 -0400 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:236354 Archived-At: Eli Zaretskii writes: > Maybe we should simply add a feature that would allow display of a > thin line across the window. Then all of the problems we discussed > will just go away. There does seem to several use-cases for this feature (in addition to Cl=C3=A9ment's), where it is emulated in various ways each, having its own deficiencies. I don't think I saw a post in this thread cataloguing all of these methods (though most of them have been mentioned), so for the record, if it helps anyone: - describe-symbol (insert "\n\n" (eval-when-compile (propertize "\n" 'face '(:height 0.1 :inverse-video t))) "\n") - custom-group-value-create ;; Draw a horizontal line (this works for both graphical ;; and text displays): (let ((p (point))) (insert "\n") (put-text-property p (1+ p) 'face '(:underline t)) (overlay-put (make-overlay p (1+ p)) 'before-string (propertize "\n" 'face '(:underline t) 'display '(space :align-to 999)))) - log-edit-font-lock-keywords (0 '(:height 0.1 :inverse-video t)) On MELPA: - magit-blame--format-separator https://github.com/magit/magit/blob/master/lisp/magit-blame.el (concat (propertize "\s" 'display '(space :height (2))) (propertize "\n" 'line-height t)) - transient--show https://github.com/magit/transient/blob/master/lisp/transient.el (insert (propertize "__" 'face 'transient-separator 'display '(space :height (1)))) (insert (propertize "\n" 'face 'transient-separator 'line-height t))) - page-break-lines.el https://github.com/purcell/page-break-lines/blob/master/page-break-lines.= el (let ((default-height (face-attribute 'default :height nil 'default))) (set-face-attribute 'page-break-lines nil :height default-height) (let* ((cwidth (char-width page-break-lines-char)) (wwidth-pix (- (window-width nil t) (if (bound-and-true-p display-line-numbers) (line-number-display-width t) 0))) (width (- (/ wwidth-pix (frame-char-width) cwidth) (if (display-graphic-p) 0 1))) (glyph (make-glyph-code page-break-lines-char 'page-break-line= s)) (new-display-entry (vconcat (make-list width glyph)))) (unless (equal new-display-entry (elt buffer-display-table ?\^L)) (aset buffer-display-table ?\^L new-display-entry)))) - form-feed.el https://github.com/wasamasa/form-feed/blob/master/form-feed.el (The latter two are both packages for displaying ^L as thin lines; I wasn't sure which sections of form-feed would be relevant to include.) FWIW, page-break-lines does seem to behave correctly when display-line-numbers is enabled; not sure how applicable its method is in the general case.