From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: =?UTF-8?Q?Cl=C3=A9ment?= Pit-Claudel Newsgroups: gmane.emacs.bugs Subject: bug#26909: 25.1; A face for margins Date: Tue, 12 May 2020 13:28:27 -0400 Message-ID: <92f9039a-ef7e-bcae-fb97-1ecb4ffc6d3a@gmail.com> References: <83lgq096iz.fsf@gnu.org> <83ftc5859u.fsf@gnu.org> <835zd183wy.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="39911"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 Cc: yuri.v.khan@gmail.com, 26909@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue May 12 19:29:15 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 1jYYiP-000AEl-9N for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 12 May 2020 19:29:13 +0200 Original-Received: from localhost ([::1]:55138 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jYYiO-0003Xc-7k for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 12 May 2020 13:29:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58464) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jYYiE-0003Rc-Dm for bug-gnu-emacs@gnu.org; Tue, 12 May 2020 13:29:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44892) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jYYiE-00035E-4F for bug-gnu-emacs@gnu.org; Tue, 12 May 2020 13:29:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jYYiE-0001zv-0p for bug-gnu-emacs@gnu.org; Tue, 12 May 2020 13:29:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Cl=C3=A9ment?= Pit-Claudel Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 12 May 2020 17:29: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.15893045197648 (code B ref 26909); Tue, 12 May 2020 17:29:01 +0000 Original-Received: (at 26909) by debbugs.gnu.org; 12 May 2020 17:28:39 +0000 Original-Received: from localhost ([127.0.0.1]:56438 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jYYho-0001zG-13 for submit@debbugs.gnu.org; Tue, 12 May 2020 13:28:39 -0400 Original-Received: from mail-qv1-f53.google.com ([209.85.219.53]:42400) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jYYhm-0001z2-7y for 26909@debbugs.gnu.org; Tue, 12 May 2020 13:28:34 -0400 Original-Received: by mail-qv1-f53.google.com with SMTP id g20so3770184qvb.9 for <26909@debbugs.gnu.org>; Tue, 12 May 2020 10:28:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=VIZfqkBmE0USRUR3l085OviQp0HbZl5/zuNqi5rdfHM=; b=EnPd4qiJ/szklMwx/LtKCaOm/QEvfWrAjkOPeYxb0046LSs64lHueTytcBEJiKnlko ZaSk3alrWLOhhVWKXJole9BOZDBq88xPnuJ+D4CDU55LwS6iJyd38Mv91mVpMb/YMOOU HFX3cHPppYUEzgY6vBFhcBRN9cmF/joZu3m9s/P0a+pak/9jSJYfcnGKGRtZ51rNjFWT mTNdvU92VPymsn+t9CIVS1ZD5fTgfWh59p2dQLIggzU+S6qzGRsJcSHf2EhTJ8M7ZngJ H6eA5ycnuHoRP2X29NVreuaMxmi9S7Cf0cyUvE9LWuqbwvND/PUC0ydBC9LWJhHoIKe9 D9Tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=VIZfqkBmE0USRUR3l085OviQp0HbZl5/zuNqi5rdfHM=; b=CN+3MjWb1KDROwlHQkPVa7Q0SpYQY/eqRGBJW/lUpnJpNQvrQlkRVpAX7q9E+Acyk6 b9gZVr6RNupU5+eYZ1asAE9s7nPSNcq80DJt3w15WfqCIqSMLtLw++Ts1UhZtHoL4a3M AmL+MXC7nXvQ+H6qxwKgnRYSbGPIdRgEUxM+ElvsBPqOns4b668gW9TRHSPHFyL6spzM vP0iLYybtmP0slk6YNkanKADci/srjZWgT/Lj3YJLb1YRLvLlUDF32KBApzAoHh0RkN7 nzPuh3CzOc8XCRP4/DiPpzlH4WK6fXGrujbtrszb+4HcdGZuJAMrdJi43NqDY1Hz9RbD G8Dg== X-Gm-Message-State: AGi0PubqOeheV2XO6HKrrEzP1IC5gFb9w5AU1CEv70mbteEM3q/6OBTd /HeFgIDIHpSJrLUwukqctdalqwCVpcs= X-Google-Smtp-Source: APiQypK6pJq/EEIcQAlLRB9vOxOpPflkyUl3Krx+gnjaKdVmUtpubX702U/nY10c5k+igh8ON17ojw== X-Received: by 2002:a05:6214:18c9:: with SMTP id cy9mr21386680qvb.35.1589304508471; Tue, 12 May 2020 10:28:28 -0700 (PDT) Original-Received: from ?IPv6:2601:184:4180:66e7:4d17:b25e:8d9:2188? ([2601:184:4180:66e7:4d17:b25e:8d9:2188]) by smtp.googlemail.com with ESMTPSA id x124sm11940434qkb.108.2020.05.12.10.28.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 12 May 2020 10:28:28 -0700 (PDT) In-Reply-To: <835zd183wy.fsf@gnu.org> Content-Language: en-GB 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:180111 Archived-At: On 12/05/2020 13.21, Eli Zaretskii wrote: >> 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? Indeed. >>> 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? Or from below, where it says "face_id = FRINGE_FACE_ID;"… I don't know: I don't know what this code does. I will try to take the time to understand it; the original silly patch was just a few lines thrown together as a proof of concept.