From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#26909: 25.1; A face for margins Date: Tue, 12 May 2020 20:21:49 +0300 Message-ID: <835zd183wy.fsf@gnu.org> References: <83lgq096iz.fsf@gnu.org> <83ftc5859u.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="11106"; mail-complaints-to="usenet@ciao.gmane.io" Cc: yuri.v.khan@gmail.com, 26909@debbugs.gnu.org To: =?UTF-8?Q?Cl=C3=A9ment?= Pit-Claudel Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue May 12 19:23:12 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jYYca-0002gF-AH for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 12 May 2020 19:23:12 +0200 Original-Received: from localhost ([::1]:46492 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jYYcZ-0006Xo-Bi for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 12 May 2020 13:23:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57536) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jYYcQ-0006UI-30 for bug-gnu-emacs@gnu.org; Tue, 12 May 2020 13:23:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44888) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jYYcP-00021U-Op for bug-gnu-emacs@gnu.org; Tue, 12 May 2020 13:23:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jYYcP-0001qm-LP for bug-gnu-emacs@gnu.org; Tue, 12 May 2020 13:23:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 12 May 2020 17:23:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 26909 X-GNU-PR-Package: emacs Original-Received: via spool by 26909-submit@debbugs.gnu.org id=B26909.15893041377024 (code B ref 26909); Tue, 12 May 2020 17:23:01 +0000 Original-Received: (at 26909) by debbugs.gnu.org; 12 May 2020 17:22:17 +0000 Original-Received: from localhost ([127.0.0.1]:56434 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jYYbh-0001pE-AC for submit@debbugs.gnu.org; Tue, 12 May 2020 13:22:17 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:54426) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jYYbf-0001oz-ID for 26909@debbugs.gnu.org; Tue, 12 May 2020 13:22:15 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:45768) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jYYba-0001tK-As; Tue, 12 May 2020 13:22:10 -0400 Original-Received: from [176.228.60.248] (port=4690 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jYYbZ-0001tR-KI; Tue, 12 May 2020 13:22:10 -0400 In-Reply-To: (message from =?UTF-8?Q?Cl=C3=A9ment?= Pit-Claudel on Tue, 12 May 2020 13:06:00 -0400) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:180110 Archived-At: > Cc: yuri.v.khan@gmail.com, 26909@debbugs.gnu.org > From: Clément Pit-Claudel > Date: Tue, 12 May 2020 13:06:00 -0400 > > > Something like that, yes. But you will need to make sure > > extend_face_to_end_of_line is called also for empty lines. And of > > course the "silly" changes need to be made less silly. > > Where the less silly strategy would be to only run the extend_face code when the margins face isn't customized, right? The other way around, surely? > > And you need > > to compute the pixel-width of the stretch glyph, since the code you > > cited only places a single SPC character there, which is not what you > > want if the margin is wider than one column. > > Hmm, I think the code already does that? Does it where? space_glyph is initiated in init_display_interactive, and I don't see its pixel_width changed anywhere. What do you get in the width of that glyph in the margins? > >> + case MARGIN_FACE_ID: name = Qmargin; break; > > > > If this is going to be an additional basic face, then why do you call > > lookup_named_face and not lookup_basic_face? > > It's because I have no idea what a basic face is, so I just cribbed from places that use the fringe face. It does things like the following, and I have no idea what those mean: > > face_id = NILP (face) ? lookup_named_face (w, f, Qfringe, false) > : lookup_derived_face (w, f, face, FRINGE_FACE_ID, 0); > if (face_id < 0) > face_id = FRINGE_FACE_ID; Why not "crib" from a few lines above the code you hacked, where it gets at the default face?