From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Line height issues with display-line-number-mode Date: Tue, 07 May 2019 16:30:55 -0400 Message-ID: References: <6fd496f0-7dd5-6c0e-5121-b618e7dca831@gmail.com> <83sgtqi02k.fsf@gnu.org> <83r29ahyz2.fsf@gnu.org> <83pnouhwxs.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="140691"; 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 To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue May 07 22:32:10 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 1hO6ky-000aPk-J5 for ged-emacs-devel@m.gmane.org; Tue, 07 May 2019 22:32:08 +0200 Original-Received: from localhost ([127.0.0.1]:54237 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hO6kx-0002ll-Hq for ged-emacs-devel@m.gmane.org; Tue, 07 May 2019 16:32:07 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:60466) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hO6jt-0002lA-W3 for emacs-devel@gnu.org; Tue, 07 May 2019 16:31:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hO6js-0000w8-Sr for emacs-devel@gnu.org; Tue, 07 May 2019 16:31:01 -0400 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:59817) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hO6js-0000vF-Gd; Tue, 07 May 2019 16:31:00 -0400 Original-Received: from ceviche.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id x47KUuw3009256; Tue, 7 May 2019 16:30:57 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id E88816652C; Tue, 7 May 2019 16:30:55 -0400 (EDT) In-Reply-To: <83pnouhwxs.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 07 May 2019 22:43:59 +0300") X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 2 Rules triggered EDT_SA_DN_PASS=0, RV6541=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6541> : inlines <7074> : streams <1820863> : uri <2841694> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.20 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:236262 Archived-At: >> Rather than try and guess it based on the presence of a display/overlay, >> maybe we could require a specific text-property like `no-line-number`? > > We already have such a text property (display-line-number-disable), > but it cannot help here, But it *can* help for the *vc-log* case, tho it's a bit cumbersome, see patch below. Also the line then runs not just through the text but also through the line-number-area (I guess that's OK, but that's not the behavior I was expecting). Stefan diff --git a/lisp/vc/log-edit.el b/lisp/vc/log-edit.el index 1ae219eed5..1cf58b994c 100644 --- a/lisp/vc/log-edit.el +++ b/lisp/vc/log-edit.el @@ -383,7 +383,8 @@ log-edit-font-lock-keywords nil lax)) ("^\n" (progn (goto-char (match-end 0)) (1+ (match-end 0))) nil - (0 '(:height 0.1 :inverse-video t)))) + (0 '(face (:height 0.1 :inverse-video t) + display-line-numbers-disable t rear-nonsticky t)))) (log-edit--match-first-line (0 'log-edit-summary)))) (defvar log-edit-font-lock-gnu-style nil @@ -487,6 +488,9 @@ log-edit-mode \\{log-edit-mode-map}" (set (make-local-variable 'font-lock-defaults) '(log-edit-font-lock-keywords t)) + (make-local-variable 'font-lock-extra-managed-props) + (cl-pushnew 'rear-nonsticky font-lock-extra-managed-props) + (cl-pushnew 'display-line-numbers-disable font-lock-extra-managed-props) (setq-local jit-lock-contextually t) ;For the "first line is summary". (make-local-variable 'log-edit-comment-ring-index) (add-hook 'kill-buffer-hook 'log-edit-remember-comment nil t)