unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#67678: 30.0.50; Turning off menu-bar-mode after setting some default face attributes causes bad initial rendering
@ 2023-12-07  7:35 Mekeor Melire
  2023-12-07 10:06 ` Eli Zaretskii
  0 siblings, 1 reply; 3+ messages in thread
From: Mekeor Melire @ 2023-12-07  7:35 UTC (permalink / raw)
  To: 67678

[-- Attachment #1: Type: text/plain, Size: 2255 bytes --]

When I run "emacs -Q -l the-following-snippet.el",

--8<---------------cut here---------------start------------->8---
;; this snippet does provoke the bug.
(set-face-attribute 'default nil :weight 'medium)
(menu-bar-mode 0)
--8<---------------cut here---------------end--------------->8---

I find an Emacs frame with bad initial rendering: There is no text
visible. See attached screenshot.

When I resize the frame, the rendering is corrected, i.e. the text of
the scratch buffer becomes visible.

The bug IS ALSO provoked when the first S-expressions is replaced with
one of the following:

--8<---------------cut here---------------start------------->8---
;; either
(custom-set-faces '(default ((t :weight medium)) t))
;; or
(custom-set-faces '(default ((t :height 110)) t))
;; or
(custom-theme-set-faces 'user '(default ((t :slant italic)) t))
;; or similar.
--8<---------------cut here---------------end--------------->8---

The bug IS NOT provoked when the order of the two S-expressions is
reversed, for example:

--8<---------------cut here---------------start------------->8---
;; this snippet does not provoke the bug.
(menu-bar-mode 0)
(set-face-attribute 'default nil :weight 'medium)
--8<---------------cut here---------------end--------------->8---

The bug IS NOT provoked when any face other than "default" is altered,
for example:

--8<---------------cut here---------------start------------->8---
;; this snippet does not provoke the bug.
(set-face-attribute 'link nil :weight 'medium)
(menu-bar-mode 0)
--8<---------------cut here---------------end--------------->8---

The bug IS NOT provoked for some face-attributes, e.g. ":box" and
":underline":

--8<---------------cut here---------------start------------->8---
;; this snippet does not provoke the bug.
(set-face-attribute 'default nil :box t)
(menu-bar-mode 0)
--8<---------------cut here---------------end--------------->8---

The person with nickname "twb" in #emacs on irc.libera.chat suggests
"there is just a 'and then rerender' command missing somewhere".
Personally, I wonder if there is a mistake how menu-bar.el handles
a customized default face. See:

https://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/menu-bar.el?h=e4e1e268c8e9f7de6fe5d4b05beb595a1781c02c#n839



[-- Attachment #2: 2023-12-07-082617_640x480_scrot.png --]
[-- Type: image/png, Size: 6234 bytes --]

[-- Attachment #3: Type: text/plain, Size: 4129 bytes --]



I'm not sure if it's relevant but I use the tiling window manager
XMonad.

In GNU Emacs 30.0.50 (build 1, x86_64-unknown-linux-gnu, Motif Version
2.3.8, cairo version 1.16.0)
Windowing system distributor 'The X.Org Foundation', version 11.0.12101004
System Description: Guix System

Configured using:
 'configure
 CONFIG_SHELL=/gnu/store/rib9g2ig1xf3kclyl076w28parmncg4k-bash-minimal-5.1.16/bin/bash
 SHELL=/gnu/store/rib9g2ig1xf3kclyl076w28parmncg4k-bash-minimal-5.1.16/bin/bash
 --prefix=/gnu/store/whmdrrv8db90a238jgjy24hd13diljfl-emacs-next-motif-30.0.50-1.9d27b95
 --enable-fast-install --build=x86_64-unknown-linux-gnu
 --with-x-toolkit=motif --with-modules --with-native-compilation=aot
 --disable-build-details'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES
NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3
THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER X11 XDBE XIM XPM MOTIF ZLIB

Important settings:
  value of $EMACSLOADPATH: /home/user/.guix-profile/share/emacs/site-lisp:/home/user/.guix-profile/share/emacs/site-lisp:/gnu/store/whmdrrv8db90a238jgjy24hd13diljfl-emacs-next-motif-30.0.50-1.9d27b95/share/emacs/30.0.50/lisp
  value of $EMACSNATIVELOADPATH: /home/user/.guix-profile/lib/emacs/native-site-lisp:/home/user/.guix-profile/lib/emacs/native-site-lisp
  value of $LANG: en_US.utf8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  minibuffer-regexp-mode: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
/gnu/store/0mifjgb3nk2swyj2m6b2zqdf63y1m6aj-emacs-transient-0.4.3-0.cc0fa80/share/emacs/site-lisp/transient-0.4.3-0.cc0fa80/transient hides /gnu/store/whmdrrv8db90a238jgjy24hd13diljfl-emacs-next-motif-30.0.50-1.9d27b95/share/emacs/30.0.50/lisp/transient

Features:
(shadow sort mail-extr compile comint ansi-osc ansi-color ring comp
comp-cstr warnings icons rx cl-seq cl-macs gv cl-extra help-mode
bytecomp byte-compile emacsbug message mailcap yank-media puny dired
dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068
epg-config gnus-util text-property-search time-date subr-x mm-decode
mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader
cl-loaddefs cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util
mail-prsvr mail-utils rmc iso-transl tooltip cconv eldoc paren electric
uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel
term/x-win x-win term/common-win x-dnd touch-screen tool-bar dnd fontset
image regexp-opt fringe tabulated-list replace newcomment text-mode
lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch
easymenu timer select scroll-bar mouse jit-lock font-lock syntax
font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic
indonesian philippine cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
composite emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs
theme-loaddefs faces cus-face macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget keymap
hashtable-print-readable backquote threads dbusbind inotify lcms2
dynamic-setting system-font-setting font-render-setting cairo motif
x-toolkit x multi-tty move-toolbar make-network-process native-compile
emacs)

Memory information:
((conses 16 90564 9685) (symbols 48 7873 0) (strings 32 22105 3160)
 (string-bytes 1 748587) (vectors 16 17797)
 (vector-slots 8 354875 6922) (floats 8 33 41) (intervals 56 279 0)
 (buffers 992 11))

^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#67678: 30.0.50; Turning off menu-bar-mode after setting some default face attributes causes bad initial rendering
  2023-12-07  7:35 bug#67678: 30.0.50; Turning off menu-bar-mode after setting some default face attributes causes bad initial rendering Mekeor Melire
@ 2023-12-07 10:06 ` Eli Zaretskii
  2023-12-07 11:49   ` Mekeor Melire
  0 siblings, 1 reply; 3+ messages in thread
From: Eli Zaretskii @ 2023-12-07 10:06 UTC (permalink / raw)
  To: Mekeor Melire, Po Lu; +Cc: 67678

> From: Mekeor Melire <mekeor@posteo.de>
> Date: Thu, 07 Dec 2023 07:35:36 +0000
> 
> When I run "emacs -Q -l the-following-snippet.el",
> 
> --8<---------------cut here---------------start------------->8---
> ;; this snippet does provoke the bug.
> (set-face-attribute 'default nil :weight 'medium)
> (menu-bar-mode 0)
> --8<---------------cut here---------------end--------------->8---
> 
> I find an Emacs frame with bad initial rendering: There is no text
> visible. See attached screenshot.

I cannot reproduce this here.

Does the font you use for the default face have the medium weight
variant?  What happens if you replace 'medium with 'bold in the
snippet above?

> When I resize the frame, the rendering is corrected, i.e. the text of
> the scratch buffer becomes visible.

Is the display also corrected if you invoke "M-x redraw-display"
instead of resizing the frame?

> Personally, I wonder if there is a mistake how menu-bar.el handles
> a customized default face. See:
> 
> https://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/menu-bar.el?h=e4e1e268c8e9f7de6fe5d4b05beb595a1781c02c#n839

That's unlikely, since that code deals with saving the options changed
via menu-bar menus.  That is, that code is in a function invoked when
you click on the menu bar and select Options->Save Options.  It is not
supposed to be used when processing your snippet file.

Adding Po Lu, in case he has some ideas.





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#67678: 30.0.50; Turning off menu-bar-mode after setting some default face attributes causes bad initial rendering
  2023-12-07 10:06 ` Eli Zaretskii
@ 2023-12-07 11:49   ` Mekeor Melire
  0 siblings, 0 replies; 3+ messages in thread
From: Mekeor Melire @ 2023-12-07 11:49 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Po Lu, 67678

2023-12-07 12:06 eliz@gnu.org:

> > From: Mekeor Melire <mekeor@posteo.de>
> > Date: Thu, 07 Dec 2023 07:35:36 +0000

> Does the font you use for the default face have the medium weight
> variant?

I'd guess so but I do not know for sure.

> What happens if you replace 'medium with 'bold in the snippet above?

The bug is provoked with :weight 'bold as well.

> Is the display also corrected if you invoke "M-x redraw-display"
> instead of resizing the frame?

No, calling `redraw-display' does not correct the display.

> That's unlikely, since that code deals with saving the options changed
> via menu-bar menus.  That is, that code is in a function invoked when
> you click on the menu bar and select Options->Save Options.  It is not
> supposed to be used when processing your snippet file.

I see, thanks for explaining.





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-12-07 11:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-07  7:35 bug#67678: 30.0.50; Turning off menu-bar-mode after setting some default face attributes causes bad initial rendering Mekeor Melire
2023-12-07 10:06 ` Eli Zaretskii
2023-12-07 11:49   ` Mekeor Melire

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).