From: Eli Zaretskii <eliz@gnu.org>
To: "Clément Pit-Claudel" <cpitclaudel@gmail.com>
Cc: yuri.v.khan@gmail.com, 26909@debbugs.gnu.org
Subject: bug#26909: 25.1; A face for margins
Date: Tue, 12 May 2020 19:52:29 +0300 [thread overview]
Message-ID: <83ftc5859u.fsf@gnu.org> (raw)
In-Reply-To: <f33cb5cf-1779-991b-4b1d-6852cfdd1dc5@gmail.com> (message from Clément Pit-Claudel on Mon, 11 May 2020 17:01:23 -0400)
> Cc: 26909@debbugs.gnu.org
> From: Clément Pit-Claudel <cpitclaudel@gmail.com>
> Date: Mon, 11 May 2020 17:01:23 -0400
>
> A margin face would be great to have.
> How reasonable would it be to fill the margins with a stretched space? Would it be too costly?
It would slow down redisplay, especially if the window is large, but
maybe the slow-down will not be so awful.
> The (silly) attached patch confirms that removing the short-circuits makes it possible to set a face in the margins, but besides the performance aspect it only applies to lines that have contents.
>
> Is this a reasonable way to go?
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. 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.
> --- a/src/xfaces.c
> +++ b/src/xfaces.c
> @@ -4768,6 +4768,7 @@ lookup_basic_face (struct window *w, struct frame *f, int face_id)
> case TAB_BAR_FACE_ID: name = Qtab_bar; break;
> case TOOL_BAR_FACE_ID: name = Qtool_bar; break;
> case FRINGE_FACE_ID: name = Qfringe; break;
> + 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?
Also, this face should have a defface definition in faces.el. (And
NEWS, and update for the manuals...)
Thanks.
next prev parent reply other threads:[~2020-05-12 16:52 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-13 14:07 bug#26909: 25.1; A face for margins Yuri Khan
2017-05-13 14:27 ` Eli Zaretskii
2017-05-13 14:59 ` Yuri Khan
2017-05-13 16:40 ` Eli Zaretskii
2017-05-13 17:19 ` Yuri Khan
2017-05-13 17:42 ` Eli Zaretskii
2020-05-11 21:01 ` Clément Pit-Claudel
2020-05-12 16:52 ` Eli Zaretskii [this message]
2020-05-12 17:06 ` Clément Pit-Claudel
2020-05-12 17:21 ` Eli Zaretskii
2020-05-12 17:28 ` Clément Pit-Claudel
2020-05-12 17:40 ` Eli Zaretskii
2020-10-01 2:49 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83ftc5859u.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=26909@debbugs.gnu.org \
--cc=cpitclaudel@gmail.com \
--cc=yuri.v.khan@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).