all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Juri Linkov <juri@linkov.net>
Cc: 39649@debbugs.gnu.org, joca.bt@gmail.com
Subject: bug#39649: 27.0.60; tab-line doesn't scroll
Date: Sun, 01 Mar 2020 18:12:06 +0200	[thread overview]
Message-ID: <83tv38yrzd.fsf@gnu.org> (raw)
In-Reply-To: <87blphrulz.fsf@mail.linkov.net> (message from Juri Linkov on Sat, 29 Feb 2020 23:44:56 +0200)

> From: Juri Linkov <juri@linkov.net>
> Cc: joca.bt@gmail.com,  39649@debbugs.gnu.org
> Date: Sat, 29 Feb 2020 23:44:56 +0200
> 
> > Why would we need that?  The related display code is in C, so we never
> > needed to expose this to Lisp.
> 
> format-mode-line already exposes it, but fails to properly
> handle its arg FACE.

So you are saying that we already have the API exposed to Lisp, but it
(format-mode-line) doesn't work well?

> >> 6. C-x b test2
> >> 7. M-: (insert (format-mode-line (tab-line-format) 'tab-line))
> >> 8. Note how the the tab-line now uses the face tab-line,
> >>    but this face overrides the faces of individual tabs that
> >>    should have the face tab-line-tab with released-button box style.
> >
> > And here I don't understand what you mean by "overrides".
> 
> Do you see the same button styles with the faces tab-line-tab-inactive and
> tab-line-tab-current as in the case above like they are on the real tab-line?
> These faces are lost when the arg FACE is specified.

I don't think this is a bug, the code behaves as intended.  It's just
that its intent might be not what you expect, and the available
documentation doesn't help to expect what the code does.

The doc string says, inter alia:


  Optional second arg FACE specifies the face property to put on all
  characters for which no face is specified.

But what it really means is that text produced by the various
%-constructs will have FACE if the %-constructs don't provide a face.
In your case, you supply the function with a fixed string, so
specifying FACE overrides the faces you have there, see
store_mode_line_string (which is called in this case with PROPS set to
nil).

At this point let me turn the table and ask why did you need to pass
FACE to format-mode-line in your case?  What did you want to achieve?





  reply	other threads:[~2020-03-01 16:12 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-17 18:51 bug#39649: 27.0.60; tab-line doesn't scroll João Guerra
2020-02-17 23:03 ` Juri Linkov
2020-02-18 20:27   ` João Guerra
2020-02-18 22:39     ` Juri Linkov
2020-02-19  0:24       ` Juri Linkov
2020-02-19 20:57         ` João Guerra
2020-02-20 23:07           ` Juri Linkov
2020-02-21  1:34             ` Noam Postavsky
2020-02-22 23:52               ` Juri Linkov
2020-02-23 10:35                 ` João Guerra
2020-02-23 23:06                   ` Juri Linkov
2020-02-24 19:11                     ` João Guerra
2020-02-25 21:20                       ` Juri Linkov
2020-02-25 21:49                         ` João Guerra
2020-02-26 23:16                           ` Juri Linkov
2020-02-26 23:33                             ` Juri Linkov
2020-02-28  9:12                               ` Eli Zaretskii
2020-02-29 21:44                                 ` Juri Linkov
2020-03-01 16:12                                   ` Eli Zaretskii [this message]
2020-03-01 23:40                                     ` Juri Linkov
2020-09-20  8:40                                       ` Lars Ingebrigtsen
2020-02-27 21:13                             ` João Guerra
2020-02-27 22:37                               ` Juri Linkov
2020-02-28 18:30                                 ` João Guerra
2020-02-29 21:49                                   ` Juri Linkov
2020-03-04 17:25                                     ` João Guerra
2020-03-04 23:52                                       ` Juri Linkov
2020-03-05  8:04                                         ` João Guerra
2020-03-05 23:53                                           ` Juri Linkov
2020-09-20  8:41                                     ` Lars Ingebrigtsen
2020-10-14  6:16                                       ` Lars Ingebrigtsen
2020-02-28 13:16                         ` Eli Zaretskii

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83tv38yrzd.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=39649@debbugs.gnu.org \
    --cc=joca.bt@gmail.com \
    --cc=juri@linkov.net \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.