Closed japhir closed 5 years ago
I couldn't reproduce the issue in macOS Mojave and Manjaro. According to the backtrace you provided, I suspect it's related to the fonts you are using. Can you try other fonts? The built-in function font-info
doesn't return. It's wired, and may be an issue of Emacs. BTW, which version of Emacs you are using?
I have the same problem with C-5 b
. It won't create another frame, I can C-g
my way out of it.
I'm using Windows with the Consolas font.
Didn't get a chance to test in Linux yet.
@sebasmonia Which version of Emacs? Can you please get the output before quiting? M-x toggle-debug-on-quit
and C-g
.
doom-modeline-refresh-bars()
#f(compiled-function (&rest _) #<bytecode 0x38a3e79>)(which-key-note-face #<frame emacs@SMONIA8793 00000004008eab10>)
apply(#f(compiled-function (&rest _) #<bytecode 0x38a3e79>) (which-key-note-face #<frame emacs@SMONIA8793 00000004008eab10>))
set-face-attribute(which-key-note-face #<frame emacs@SMONIA8793 00000004008eab10>)
apply(set-face-attribute which-key-note-face #<frame emacs@SMONIA8793 00000004008eab10> nil)
face-spec-set-2(which-key-note-face #<frame emacs@SMONIA8793 00000004008eab10> nil)
face-spec-recalc(which-key-note-face #<frame emacs@SMONIA8793 00000004008eab10>)
frame-set-background-mode(#<frame emacs@SMONIA8793 00000004008eab10>)
internal-set-lisp-face-attribute(default :background "#1b182c" #<frame emacs@SMONIA8793 00000004008eab10>)
#f(compiled-function (face frame &rest args) "Set attributes of FACE on FRAME from ARGS.\nThis function overrides the face attributes specified by FACE's\nface spec. It is mostly intended for internal use only.\n\nIf FRAME is nil, set the attributes for all existing frames, as\nwell as the default for new frames. If FRAME is t, change the\ndefault for new frames only.\n\nARGS must come in pairs ATTRIBUTE VALUE. ATTRIBUTE must be a\nvalid face attribute name. All attributes can be set to\n`unspecified'; this fact is not further mentioned below.\n\nThe following attributes are recognized:\n\n`:family'\n\nVALUE must be a string specifying the font family\n(e.g. \"Monospace\").\n\n`:foundry'\n\nVALUE must be a string specifying the font foundry,\ne.g., \"adobe\". If a font foundry is specified, wild-cards `*'\nand `?' are allowed.\n\n`:width'\n\nVALUE specifies the relative proportionate width of the font to use.\nIt must be one of the symbols `ultra-condensed', `extra-condensed',\n`condensed', `semi-condensed', `normal', `semi-expanded', `expanded',\n`extra-expanded', or `ultra-expanded'.\n\n`:height'\n\nVALUE specifies the relative or absolute height of the font. An\nabsolute height is an integer, and specifies font height in units\nof 1/10 pt. A relative height is either a floating point number,\nwhich specifies a scaling factor for the underlying face height;\nor a function that takes a single argument (the underlying face\nheight) and returns the new height. Note that for the `default'\nface, you must specify an absolute height (since there is nothing\nfor it to be relative to).\n\n`:weight'\n\nVALUE specifies the weight of the font to use. It must be one of the\nsymbols `ultra-bold', `extra-bold', `bold', `semi-bold', `normal',\n`semi-light', `light', `extra-light', `ultra-light'.\n\n`:slant'\n\nVALUE specifies the slant of the font to use. It must be one of the\nsymbols `italic', `oblique', `normal', `reverse-italic', or\n`reverse-oblique'.\n\n`:foreground', `:background'\n\nVALUE must be a color name, a string.\n\n`:underline'\n\nVALUE specifies whether characters in FACE should be underlined.\nIf VALUE is t, underline with foreground color of the face.\nIf VALUE is a string, underline with that color.\nIf VALUE is nil, explicitly don't underline.\n\nOtherwise, VALUE must be a property list of the form:\n\n`(:color COLOR :style STYLE)'.\n\nCOLOR can be either a color name string or `foreground-color'.\nSTYLE can be either `line' or `wave'.\nIf a keyword/value pair is missing from the property list, a\ndefault value will be used for the value.\nThe default value of COLOR is the foreground color of the face.\nThe default value of STYLE is `line'.\n\n`:overline'\n\nVALUE specifies whether characters in FACE should be overlined. If\nVALUE is t, overline with foreground color of the face. If VALUE is a\nstring, overline with that color. If VALUE is nil, explicitly don't\noverline.\n\n`:strike-through'\n\nVALUE specifies whether characters in FACE should be drawn with a line\nstriking through them. If VALUE is t, use the foreground color of the\nface. If VALUE is a string, strike-through with that color. If VALUE\nis nil, explicitly don't strike through.\n\n`:box'\n\nVALUE specifies whether characters in FACE should have a box drawn\naround them. If VALUE is nil, explicitly don't draw boxes. If\nVALUE is t, draw a box with lines of width 1 in the foreground color\nof the face. If VALUE is a string, the string must be a color name,\nand the box is drawn in that color with a line width of 1. Otherwise,\nVALUE must be a property list of the form `(:line-width WIDTH\n:color COLOR :style STYLE)'. If a keyword/value pair is missing from\nthe property list, a default value will be used for the value, as\nspecified below. WIDTH specifies the width of the lines to draw; it\ndefaults to 1. If WIDTH is negative, the absolute value is the width\nof the lines, and draw top/bottom lines inside the characters area,\nnot around it. COLOR is the name of the color to draw in, default is\nthe foreground color of the face for simple boxes, and the background\ncolor of the face for 3D boxes. STYLE specifies whether a 3D box\nshould be draw. If STYLE is `released-button', draw a box looking\nlike a released 3D button. If STYLE is `pressed-button' draw a box\nthat appears like a pressed button. If STYLE is nil, the default if\nthe property list doesn't contain a style specification, draw a 2D\nbox.\n\n`:inverse-video'\n\nVALUE specifies whether characters in FACE should be displayed in\ninverse video. VALUE must be one of t or nil.\n\n`:stipple'\n\nIf VALUE is a string, it must be the name of a file of pixmap data.\nThe directories listed in the `x-bitmap-file-path' variable are\nsearched. Alternatively, VALUE may be a list of the form (WIDTH\nHEIGHT DATA) where WIDTH and HEIGHT are the size in pixels, and DATA\nis a string containing the raw bits of the bitmap. VALUE nil means\nexplicitly don't use a stipple pattern.\n\nFor convenience, attributes `:family', `:foundry', `:width',\n`:height', `:weight', and `:slant' may also be set in one step\nfrom an X font name:\n\n`:font'\n\nSet font-related face attributes from VALUE.\nVALUE must be a valid font name or font object. It can also\nbe a fontset name. Setting this attribute will also set\nthe `:family', `:foundry', `:width', `:height', `:weight',\nand `:slant' attributes.\n\n`:inherit'\n\nVALUE is the name of a face from which to inherit attributes, or\na list of face names. Attributes from inherited faces are merged\ninto the face like an underlying face would be, with higher\npriority than underlying faces.\n\nFor backward compatibility, the keywords `:bold' and `:italic'\ncan be used to specify weight and slant respectively. This usage\nis considered obsolete. For these two keywords, the VALUE must\nbe either t or nil. A value of t for `:bold' is equivalent to\nsetting `:weight' to `bold', and a value of t for `:italic' is\nequivalent to setting `:slant' to `italic'. But if `:weight' is\nspecified in the face spec, `:bold' is ignored, and if `:slant'\nis specified, `:italic' is ignored." #<bytecode 0x1000977ef>)(default #<frame emacs@SMONIA8793 00000004008eab10> :background "#1b182c" :foreground "#cbe3e7")
apply(#f(compiled-function (face frame &rest args) "Set attributes of FACE on FRAME from ARGS.\nThis function overrides the face attributes specified by FACE's\nface spec. It is mostly intended for internal use only.\n\nIf FRAME is nil, set the attributes for all existing frames, as\nwell as the default for new frames. If FRAME is t, change the\ndefault for new frames only.\n\nARGS must come in pairs ATTRIBUTE VALUE. ATTRIBUTE must be a\nvalid face attribute name. All attributes can be set to\n`unspecified'; this fact is not further mentioned below.\n\nThe following attributes are recognized:\n\n`:family'\n\nVALUE must be a string specifying the font family\n(e.g. \"Monospace\").\n\n`:foundry'\n\nVALUE must be a string specifying the font foundry,\ne.g., \"adobe\". If a font foundry is specified, wild-cards `*'\nand `?' are allowed.\n\n`:width'\n\nVALUE specifies the relative proportionate width of the font to use.\nIt must be one of the symbols `ultra-condensed', `extra-condensed',\n`condensed', `semi-condensed', `normal', `semi-expanded', `expanded',\n`extra-expanded', or `ultra-expanded'.\n\n`:height'\n\nVALUE specifies the relative or absolute height of the font. An\nabsolute height is an integer, and specifies font height in units\nof 1/10 pt. A relative height is either a floating point number,\nwhich specifies a scaling factor for the underlying face height;\nor a function that takes a single argument (the underlying face\nheight) and returns the new height. Note that for the `default'\nface, you must specify an absolute height (since there is nothing\nfor it to be relative to).\n\n`:weight'\n\nVALUE specifies the weight of the font to use. It must be one of the\nsymbols `ultra-bold', `extra-bold', `bold', `semi-bold', `normal',\n`semi-light', `light', `extra-light', `ultra-light'.\n\n`:slant'\n\nVALUE specifies the slant of the font to use. It must be one of the\nsymbols `italic', `oblique', `normal', `reverse-italic', or\n`reverse-oblique'.\n\n`:foreground', `:background'\n\nVALUE must be a color name, a string.\n\n`:underline'\n\nVALUE specifies whether characters in FACE should be underlined.\nIf VALUE is t, underline with foreground color of the face.\nIf VALUE is a string, underline with that color.\nIf VALUE is nil, explicitly don't underline.\n\nOtherwise, VALUE must be a property list of the form:\n\n`(:color COLOR :style STYLE)'.\n\nCOLOR can be either a color name string or `foreground-color'.\nSTYLE can be either `line' or `wave'.\nIf a keyword/value pair is missing from the property list, a\ndefault value will be used for the value.\nThe default value of COLOR is the foreground color of the face.\nThe default value of STYLE is `line'.\n\n`:overline'\n\nVALUE specifies whether characters in FACE should be overlined. If\nVALUE is t, overline with foreground color of the face. If VALUE is a\nstring, overline with that color. If VALUE is nil, explicitly don't\noverline.\n\n`:strike-through'\n\nVALUE specifies whether characters in FACE should be drawn with a line\nstriking through them. If VALUE is t, use the foreground color of the\nface. If VALUE is a string, strike-through with that color. If VALUE\nis nil, explicitly don't strike through.\n\n`:box'\n\nVALUE specifies whether characters in FACE should have a box drawn\naround them. If VALUE is nil, explicitly don't draw boxes. If\nVALUE is t, draw a box with lines of width 1 in the foreground color\nof the face. If VALUE is a string, the string must be a color name,\nand the box is drawn in that color with a line width of 1. Otherwise,\nVALUE must be a property list of the form `(:line-width WIDTH\n:color COLOR :style STYLE)'. If a keyword/value pair is missing from\nthe property list, a default value will be used for the value, as\nspecified below. WIDTH specifies the width of the lines to draw; it\ndefaults to 1. If WIDTH is negative, the absolute value is the width\nof the lines, and draw top/bottom lines inside the characters area,\nnot around it. COLOR is the name of the color to draw in, default is\nthe foreground color of the face for simple boxes, and the background\ncolor of the face for 3D boxes. STYLE specifies whether a 3D box\nshould be draw. If STYLE is `released-button', draw a box looking\nlike a released 3D button. If STYLE is `pressed-button' draw a box\nthat appears like a pressed button. If STYLE is nil, the default if\nthe property list doesn't contain a style specification, draw a 2D\nbox.\n\n`:inverse-video'\n\nVALUE specifies whether characters in FACE should be displayed in\ninverse video. VALUE must be one of t or nil.\n\n`:stipple'\n\nIf VALUE is a string, it must be the name of a file of pixmap data.\nThe directories listed in the `x-bitmap-file-path' variable are\nsearched. Alternatively, VALUE may be a list of the form (WIDTH\nHEIGHT DATA) where WIDTH and HEIGHT are the size in pixels, and DATA\nis a string containing the raw bits of the bitmap. VALUE nil means\nexplicitly don't use a stipple pattern.\n\nFor convenience, attributes `:family', `:foundry', `:width',\n`:height', `:weight', and `:slant' may also be set in one step\nfrom an X font name:\n\n`:font'\n\nSet font-related face attributes from VALUE.\nVALUE must be a valid font name or font object. It can also\nbe a fontset name. Setting this attribute will also set\nthe `:family', `:foundry', `:width', `:height', `:weight',\nand `:slant' attributes.\n\n`:inherit'\n\nVALUE is the name of a face from which to inherit attributes, or\na list of face names. Attributes from inherited faces are merged\ninto the face like an underlying face would be, with higher\npriority than underlying faces.\n\nFor backward compatibility, the keywords `:bold' and `:italic'\ncan be used to specify weight and slant respectively. This usage\nis considered obsolete. For these two keywords, the VALUE must\nbe either t or nil. A value of t for `:bold' is equivalent to\nsetting `:weight' to `bold', and a value of t for `:italic' is\nequivalent to setting `:slant' to `italic'. But if `:weight' is\nspecified in the face spec, `:bold' is ignored, and if `:slant'\nis specified, `:italic' is ignored." #<bytecode 0x1000977ef>) (default #<frame emacs@SMONIA8793 00000004008eab10> :background "#1b182c" :foreground "#cbe3e7"))
set-face-attribute(default #<frame emacs@SMONIA8793 00000004008eab10> :background "#1b182c" :foreground "#cbe3e7")
apply(set-face-attribute default #<frame emacs@SMONIA8793 00000004008eab10> (:background "#1b182c" :foreground "#cbe3e7"))
face-spec-set-2(default #<frame emacs@SMONIA8793 00000004008eab10> (:background "#1b182c" :foreground "#cbe3e7"))
face-spec-recalc(default #<frame emacs@SMONIA8793 00000004008eab10>)
face-set-after-frame-default(#<frame emacs@SMONIA8793 00000004008eab10> ((vertical-scroll-bars) (fullscreen . maximized)))
x-create-frame-with-faces(((vertical-scroll-bars) (fullscreen . maximized)))
#f(compiled-function (params) #<bytecode 0x100248279>)(((vertical-scroll-bars) (fullscreen . maximized)))
apply(#f(compiled-function (params) #<bytecode 0x100248279>) ((vertical-scroll-bars) (fullscreen . maximized)))
frame-creation-function(((vertical-scroll-bars) (fullscreen . maximized)))
#f(compiled-function (&optional parameters) "Return a newly created frame displaying the current buffer.\nOptional argument PARAMETERS is an alist of frame parameters for\nthe new frame. Each element of PARAMETERS should have the\nform (NAME . VALUE), for example:\n\n (name . STRING)\011The frame should be named STRING.\n\n (width . NUMBER)\011The frame should be NUMBER characters in width.\n (height . NUMBER)\011The frame should be NUMBER text lines high.\n\n (minibuffer . t)\011The frame should have a minibuffer.\n (minibuffer . nil)\011The frame should have no minibuffer.\n (minibuffer . only)\011The frame should contain only a minibuffer.\n (minibuffer . WINDOW)\011The frame should use WINDOW as its minibuffer window.\n\n (window-system . nil)\011The frame should be displayed on a terminal device.\n (window-system . x)\011The frame should be displayed in an X window.\n\n (display . \":0\") The frame should appear on display :0.\n\n (terminal . TERMINAL) The frame should use the terminal object TERMINAL.\n\nIn addition, any parameter specified in `default-frame-alist',\nbut not present in PARAMETERS, is applied.\n\nBefore creating the frame (via `frame-creation-function'), this\nfunction runs the hook `before-make-frame-hook'. After creating\nthe frame, it runs the hook `after-make-frame-functions' with one\nargument, the newly created frame.\n\nIf a display parameter is supplied and a window-system is not,\nguess the window-system from the display.\n\nOn graphical displays, this function does not itself make the new\nframe the selected frame. However, the window system may select\nthe new frame according to its own rules." (interactive nil) #<bytecode 0x1000bc519>)(nil)
apply(#f(compiled-function (&optional parameters) "Return a newly created frame displaying the current buffer.\nOptional argument PARAMETERS is an alist of frame parameters for\nthe new frame. Each element of PARAMETERS should have the\nform (NAME . VALUE), for example:\n\n (name . STRING)\011The frame should be named STRING.\n\n (width . NUMBER)\011The frame should be NUMBER characters in width.\n (height . NUMBER)\011The frame should be NUMBER text lines high.\n\n (minibuffer . t)\011The frame should have a minibuffer.\n (minibuffer . nil)\011The frame should have no minibuffer.\n (minibuffer . only)\011The frame should contain only a minibuffer.\n (minibuffer . WINDOW)\011The frame should use WINDOW as its minibuffer window.\n\n (window-system . nil)\011The frame should be displayed on a terminal device.\n (window-system . x)\011The frame should be displayed in an X window.\n\n (display . \":0\") The frame should appear on display :0.\n\n (terminal . TERMINAL) The frame should use the terminal object TERMINAL.\n\nIn addition, any parameter specified in `default-frame-alist',\nbut not present in PARAMETERS, is applied.\n\nBefore creating the frame (via `frame-creation-function'), this\nfunction runs the hook `before-make-frame-hook'. After creating\nthe frame, it runs the hook `after-make-frame-functions' with one\nargument, the newly created frame.\n\nIf a display parameter is supplied and a window-system is not,\nguess the window-system from the display.\n\nOn graphical displays, this function does not itself make the new\nframe the selected frame. However, the window system may select\nthe new frame according to its own rules." (interactive nil) #<bytecode 0x1000bc519>) nil)
make-frame(nil)
#f(compiled-function () #<bytecode 0x1001bbe05>)()
display-buffer-pop-up-frame(#<buffer *scratch*> ((reusable-frames . 0) (inhibit-same-window . t)))
display-buffer(#<buffer *scratch*> ((display-buffer-reuse-window display-buffer-pop-up-frame) (reusable-frames . 0) (inhibit-same-window . t)))
#f(compiled-function (buffer-or-name &optional action norecord) "Display buffer specified by BUFFER-OR-NAME and select its window.\nBUFFER-OR-NAME may be a buffer, a string (a buffer name), or nil.\nIf it is a string not naming an existent buffer, create a buffer\nwith that name. If BUFFER-OR-NAME is nil, choose some other\nbuffer. In either case, make that buffer current and return it.\n\nThis uses `display-buffer' as a subroutine. The optional ACTION\nargument is passed to `display-buffer' as its ACTION argument.\nSee `display-buffer' for more information. ACTION is t if called\ninteractively with a prefix argument, which means to pop to a\nwindow other than the selected one even if the buffer is already\ndisplayed in the selected window.\n\nIf a suitable window is found, select that window. If it is not\non the selected frame, raise that window's frame and give it\ninput focus.\n\nOptional third arg NORECORD non-nil means do not put this buffer\nat the front of the list of recently selected ones." (interactive #f(compiled-function () #<bytecode 0x3b4f471>)) #<bytecode 0x10008fc0b>)("*scratch*" ((display-buffer-reuse-window display-buffer-pop-up-frame) (reusable-frames . 0) (inhibit-same-window . t)) nil)
apply(#f(compiled-function (buffer-or-name &optional action norecord) "Display buffer specified by BUFFER-OR-NAME and select its window.\nBUFFER-OR-NAME may be a buffer, a string (a buffer name), or nil.\nIf it is a string not naming an existent buffer, create a buffer\nwith that name. If BUFFER-OR-NAME is nil, choose some other\nbuffer. In either case, make that buffer current and return it.\n\nThis uses `display-buffer' as a subroutine. The optional ACTION\nargument is passed to `display-buffer' as its ACTION argument.\nSee `display-buffer' for more information. ACTION is t if called\ninteractively with a prefix argument, which means to pop to a\nwindow other than the selected one even if the buffer is already\ndisplayed in the selected window.\n\nIf a suitable window is found, select that window. If it is not\non the selected frame, raise that window's frame and give it\ninput focus.\n\nOptional third arg NORECORD non-nil means do not put this buffer\nat the front of the list of recently selected ones." (interactive #f(compiled-function () #<bytecode 0x3b5c031>)) #<bytecode 0x10008fc0b>) ("*scratch*" ((display-buffer-reuse-window display-buffer-pop-up-frame) (reusable-frames . 0) (inhibit-same-window . t)) nil))
pop-to-buffer("*scratch*" ((display-buffer-reuse-window display-buffer-pop-up-frame) (reusable-frames . 0) (inhibit-same-window . t)) nil)
switch-to-buffer-other-frame("*scratch*")
ido-visit-buffer("*scratch*" other-frame t)
ido-buffer-internal(other-frame)
ido-switch-buffer-other-frame()
funcall-interactively(ido-switch-buffer-other-frame)
call-interactively(ido-switch-buffer-other-frame nil nil)
command-execute(ido-switch-buffer-other-frame)
TIL about toggle-debub-on-quit
:)
@sebasmonia What version of Emacs please?
Mine's
GNU Emacs 26.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.8) of 2019-04-12
Can you evaluate these codes on your env?
(font-info (face-font 'mode-line))
(doom-modeline--char-height)
Ooops yeah forgot the version.
GNU Emacs 26.2 (build 1, x86_64-w64-mingw32) of 2019-04-13
(font-info (face-font 'mode-line))
["-outline-Consolas-normal-normal-normal-mono-20-*-*-*-c-*-iso8859-1" "Consolas-12.0" 20 23 0 0 18 22 18 5 11 11 ...]
(doom-modeline--char-height)
40
So the issue occurs on Emacs 26.2. I didn't observe on Emacs 27. Will check later.
Please test new version.
Seems to work fine again! :+1: But I've also updated some fonts, so it may have to do with that. Thanks!
Worked for me too. Thank you!
Great! My pleasure.
Describe When I open a new frame in emacsclient using the latest doom-modeline update with my init file it seems to work, but when I open up another frame with
emacsclient -c -n -e '(switch-to-buffer nil)'
it hangs for a very long time, ultimately failing.Steps and Expected Steps to reproduce the behavior:
Environment:
Additional context M-x toggle-debug-on-quit output here CPU profiler report: