From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.bugs Subject: bug#31745: =?UTF-8?Q?=E5=9B=9E=E5=A4=8D=EF=BC=9A?= bug#31745: =?UTF-8?Q?=E5=9B=9E=E5=A4=8D=EF=BC=9A=E5=9B=9E=E5=A4=8D=EF=BC=9ARe:_?= =?UTF-8?Q?=E5=9B=9E=E5=A4=8D=EF=BC=9Abug#31745:?= Frame's bug whenwindow-system Date: Wed, 27 Jun 2018 11:01:20 +0200 Message-ID: <871scsr4bj.fsf@gmail.com> References: <878t7pms1e.fsf@gmail.com> <87r2lho3cg.fsf@gmail.com> <5B2CB9B3.1000600@gmx.at> <87r2ky2852.fsf@gmail.com> <5B2E077E.7070907@gmx.at> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: blaine.gmane.org 1530090020 4897 195.159.176.226 (27 Jun 2018 09:00:20 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 27 Jun 2018 09:00:20 +0000 (UTC) Cc: 31745@debbugs.gnu.org, =?UTF-8?Q?=E5=88=98=E5=8A=9B=E9=93=AD?= To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jun 27 11:00:16 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fY6JD-0001BC-ON for geb-bug-gnu-emacs@m.gmane.org; Wed, 27 Jun 2018 11:00:15 +0200 Original-Received: from localhost ([::1]:57495 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fY6LL-0000rt-4u for geb-bug-gnu-emacs@m.gmane.org; Wed, 27 Jun 2018 05:02:27 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43054) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fY6L1-0000nG-6w for bug-gnu-emacs@gnu.org; Wed, 27 Jun 2018 05:02:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fY6Kx-0001CG-4f for bug-gnu-emacs@gnu.org; Wed, 27 Jun 2018 05:02:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:57179) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fY6Kw-0001Be-Tf for bug-gnu-emacs@gnu.org; Wed, 27 Jun 2018 05:02:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fY6Kw-0004yB-Df for bug-gnu-emacs@gnu.org; Wed, 27 Jun 2018 05:02:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Robert Pluim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 27 Jun 2018 09:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 31745 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 31745-submit@debbugs.gnu.org id=B31745.153009009219067 (code B ref 31745); Wed, 27 Jun 2018 09:02:02 +0000 Original-Received: (at 31745) by debbugs.gnu.org; 27 Jun 2018 09:01:32 +0000 Original-Received: from localhost ([127.0.0.1]:36843 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fY6KS-0004xR-9E for submit@debbugs.gnu.org; Wed, 27 Jun 2018 05:01:32 -0400 Original-Received: from mail-wm0-f43.google.com ([74.125.82.43]:52217) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fY6KQ-0004xF-IX for 31745@debbugs.gnu.org; Wed, 27 Jun 2018 05:01:31 -0400 Original-Received: by mail-wm0-f43.google.com with SMTP id w137-v6so4886319wmw.1 for <31745@debbugs.gnu.org>; Wed, 27 Jun 2018 02:01:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:mail-copies-to:gmane-reply-to-list :date:in-reply-to:message-id:mime-version; bh=rl94AuzWilzqKT4yXGlpMQFKBGCsCiY+zyWzbkoTxC4=; b=WeY4XWrkCNsIfAPzXfpq1gk1nY3DIna0F416wZas5TXg7ZAoaGrsD5+5LlVfdBcbK/ 4R6Gc5YHMKmZqjjeMTQ69h3UYFDVNtqQFvhr4HxrM1UCg/7zX/q1OSmzqvUHDdEph7Cd bEf/f7fun08ZdeVqv6IHQ6yqRqIFBvpq7+2VYJLf7HyZzxaumpZPV2F/GQCD5OGZR2uI i1xUrrS1tJ9piv3jtQC0c1cMUk2ArSuQzQUJZNbBdf1G2fp637mmKK4GfGZEhYuqHT2c 1K6OAQE8czAPDz439+HtMDy452/PzIghtbB3YxPiTSe+LCp8RDVvw+uijK7knNohk3az qDCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:mail-copies-to :gmane-reply-to-list:date:in-reply-to:message-id:mime-version; bh=rl94AuzWilzqKT4yXGlpMQFKBGCsCiY+zyWzbkoTxC4=; b=rjn3lpH8lQJJTV8L4+F4yZcCtvhFQ3a8jG0gGuaHgQ9iM8ROstiRVCiipjxHxtFMXx 0SMpa7W4ykETu2KdmzKqqIPmlkVDjwX8EGQMRoyqqicb+9mOrzAYeiM8Hg0czOHAR08W 3CBxQikDci8jKXOb8aIf5NyW1RLhDDwv9GhORS97GXcSQdtMiPBnusI78eDzwj1TVn7v OG/lEUwKi3uCaNo9+A67CaDhdRYDcoWDfPFqCZiEmpVLJ3TNSIiSAtRepJwb3xQGI6n8 NYL0l8GozH5SKWwRSn0fhq9DpEVRAvj15bETtvcrBI7xYrkJUxqQlfAEl6uR6xl4hOo5 MzWg== X-Gm-Message-State: APt69E0B+IjtjqW1iZi0E2Px+OA6kTkGkyb0kJgSBFrln2HwZKctIk1M 2/9O8gR413yjRlJTMhA0eg4= X-Google-Smtp-Source: AAOMgpfct3eZObQrz0kjxZsijAiQdztUPXiPvi5nUpTI2QZjhUzjGni/46WtJPKhtH+OzIlIE90PVg== X-Received: by 2002:a1c:3046:: with SMTP id w67-v6mr4056005wmw.47.1530090084633; Wed, 27 Jun 2018 02:01:24 -0700 (PDT) Original-Received: from rpluim-ubuntu (36.28.158.77.rev.sfr.net. [77.158.28.36]) by smtp.gmail.com with ESMTPSA id n18-v6sm9056485wrj.58.2018.06.27.02.01.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 Jun 2018 02:01:23 -0700 (PDT) Mail-Copies-To: never Gmane-Reply-To-List: yes In-Reply-To: <5B2E077E.7070907@gmx.at> (martin rudalics's message of "Sat, 23 Jun 2018 10:40:30 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:147855 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable martin rudalics writes: >> So when everything kinda works: > [...] >> So we start small, go big, then go small again, but the end result, >> even though it looks correct, is actually wrong: >> >> (frame-parameter nil 'height) >> 36 >> (frame-parameter nil 'width) >> 80 >> >> Although I asked for: >> >> (add-to-list 'default-frame-alist '(width . 130)) >> (add-to-list 'default-frame-alist '(height . 56)) >> >> in the .el I=CA=BCm loading. > > Isn't "when everything kinda works" the end result "is actually wrong" > somehow contradictory? I think you mean to say that the end result is > consistent but fails to process the values you specified. > Yes, which is why I used the modifier 'kinda'. The emacs state is consistent and usable, but not as requested. >> When it doesn=CA=BCt work: > [...] >> we start big, go small, and stay small. The frame is actually the same >> size as previous, but emacs' state is messed up: >> >> (frame-parameter nil 'height) >> 56 >> (frame-parameter nil 'width) >> 130 > > This means that you get the expected values for the parameters but the > frame itself has the wrong sizes? Yes, plus parts of emacs obviously believe the frame-parameters, since the minibuffer and modeline are not visible. > What did you use to produce this and does it only happen with scaling? > I still do not understand the nature of this bug in the first place. src/emacs -q --no-site-file --no-site-lisp --no-splash --eval '(setq x-wait-for-event-timeout nil)' -l ../emacs-real-26/31745.el (although it happens with non-nil x-wait-for-event-timeout as well) where 31745.el is based off the original reporter's .emacs (attached). Scaling is not in effect. Regards Robert --=-=-= Content-Type: application/emacs-lisp Content-Disposition: attachment; filename=31745.el Content-Transfer-Encoding: quoted-printable (add-to-list 'default-frame-alist '(top . 0)) (add-to-list 'default-frame-alist '(left . 0)) (add-to-list 'default-frame-alist '(width . 130)) (add-to-list 'default-frame-alist '(height . 56)) ;(add-to-list 'default-frame-alist '(font . "Sarasa Mono CL 12")) (when nil (when window-system (set-fontset-font "fontset-default" 'han "Sarasa Mono CL") (set-fontset-font "fontset-default" 'kana "Sarasa Mono CL") (define-fringe-bitmap 'right-arrow [#b00000000 #b00000000 #b11000000 #b11000000 #b00000000 #b00000000 #b11000000 #b11000000 #b00000000 #b00000000 #b11000000 #b11000000 #b00000000 #b00000000 #b11000000 #b11000000 #b00000000 #b00000000]) (define-fringe-bitmap 'left-arrow [#b00000000 #b00000000 #b00000011 #b00000011 #b00000000 #b00000000 #b00000011 #b00000011 #b00000000 #b00000000 #b00000011 #b00000011 #b00000000 #b00000000 #b00000011 #b00000011 #b00000000 #b00000000]) (define-fringe-bitmap 'right-curly-arrow [#b00000000 #b00000000 #b11000000 #b11000000 #b00000000 #b00000000 #b11000000 #b11000000 #b00000000 #b00000000 #b11000000 #b11000000 #b00000000 #b00000000 #b11000000 #b11000000 #b00000000 #b00000000]) (define-fringe-bitmap 'left-curly-arrow [#b00000000 #b00000000 #b00000011 #b00000011 #b00000000 #b00000000 #b00000011 #b00000011 #b00000000 #b00000000 #b00000011 #b00000011 #b00000000 #b00000000 #b00000011 #b00000011 #b00000000 #b00000000])) ;; (require 'url) ;; (setq url-proxy-services ;; '(("http" . "127.0.0.1:8087") ;; ("https" . "127.0.0.1:8087"))) (setq load-prefer-newer t) (require 'package) ;; You might already have this line (let* ((no-ssl (and (memq system-type '(windows-nt ms-dos)) (not (gnutls-available-p)))) (proto (if no-ssl "http" "https"))) ;; Comment/uncomment these two lines to enable/disable MELPA and MELPA St= able as desired (add-to-list 'package-archives (cons "melpa" (concat proto "://melpa.org/= packages/")) t) ;;(add-to-list 'package-archives (cons "melpa-stable" (concat proto "://s= table.melpa.org/packages/")) t) (when (< emacs-major-version 24) ;; For important compatibility libraries like cl-lib (add-to-list 'package-archives '("gnu" . (concat proto "://elpa.gnu.org= /packages/"))))) (when (< emacs-major-version 27) (package-initialize)) ;; You might already= have this line (require 'auto-compile) ;;(auto-compile-on-load-mode) (auto-compile-on-save-mode) (add-to-list 'exec-path "/usr/bin") (setq make-backup-files nil) (setq auto-save-default nil) ) (push "/home/rpluim/repos/emacs-master/lisp/smart-mode-line-master" load-pa= th) (require 'smart-mode-line) (setq sml/no-confirm-load-theme t) (sml/setup) (when nil (require 'geiser-mode) (setq scheme-program-name "guile") (setq geiser-guile-binary "guile") (setq geiser-active-implementations '(guile)) (setq geiser-mode-start-repl-p t) (setq geiser-repl-query-on-kill-p nil) (electric-indent-mode -1) (setq-default indent-tabs-mode nil) (smart-tabs-insinuate 'c 'c++ 'java) (add-hook 'before-save-hook 'delete-trailing-whitespace) (add-hook 'before-save-hook (lambda () (untabify (point-min) (point-max)))) (require 'yasnippet) (yas-reload-all) (add-hook 'c-mode-common-hook #'yas-minor-mode) (require 'lsp-ui) (add-hook 'lsp-mode-hook 'lsp-ui-mode) ;;company-lsp is -ls ;company-c-headers is c-c-h (require 'cquery) (setq cquery-executable "/usr/bin/cquery") (eval-when-compile (require 'cl)) (defun company-cquery-headers-fun () (defun get-suffix (list) (if (eq list nil) nil (if (eq (cdr list) nil) (car list) (get-suffix (c= dr list))))) (defun is-file (filename) ((lambda (suffix) (if (eq nil suffix) nil (member-ignore-case suffix '("c" "cc" "cpp" "cxx" "cp" "c++" "m" "= mm" "h" "hh" "hpp" "hxx" "hp" "h++")))) (get-suffix ((lambda (filename) (split-string filename "." t)) filenam= e)))) (defun filter-file (list) (if (eq nil list) nil (let ((suffix-list (is-file (car list))) (processed-list (filter-file (cdr list)))) (if (eq nil suffix-list) (let ((str (car list))) (cons (if (char-equal (string-to-char str) ?%) "clang" str) p= rocessed-list)) (cons (concat "-x" ((lambda (addr) (if (string=3D addr "objc") "objective-c" a= ddr)) (car (split-string (format "%s" major-mode) "= -" t)))) processed-list))))) (defun build-command (list) (if (eq nil list) "-E -v - < /dev/null" (concat (car list) " " (build-command (cdr list))))) (defun command-output () ((lambda (output) (split-string output "\n" t)) (shell-command-to-string (build-command (filter-file (gethash "args" (cquery-file-info))))))) (let ((rest-list nil)) (defun export-user (list not-noise) (if not-noise (if (string=3D "#include <...> search starts here:" (car list)) (progn (setq rest-list (cdr list)) nil) (cons (car (split-string (car list) " " t)) (export-user (cdr l= ist) t))) (export-user (cdr list) (string=3D "#include \"...\" search starts = here:" (car list))))) (lexical-let ((user-list (cons "." (export-user (command-output) nil)))) (defun export-system (list) (if (string=3D "End of search list." (car list)) nil (cons (car (split-string (car list) " " t)) (export-system (cdr l= ist))))) (lexical-let ((system-list (export-system rest-list))) #'(lambda (t4user-nil4system) (if t4user-nil4system user-list syste= m-list)))))) (require 'company-c-headers) (defun set-headers-from-cquery () (let ((timer nil) (noerror nil)) (let ((set-path (lambda () (setq noerror (ignore-errors (gethash "args" (cquery-file-info= ) nil))) (if noerror (progn (ignore-errors (cancel-timer timer)) (let ((path-fun (company-cquery-headers-fun= ))) (setq company-c-headers-path-user (funcal= l path-fun t)) (setq company-c-headers-path-system (func= all path-fun nil)))) nil)))) (setq timer (run-with-idle-timer 1 t set-path))))) (add-hook 'c-mode-common-hook (lambda () (setq tab-width 4) (smart-tabs-mode 1) (add-hook 'lsp-after-initialize-hook 'set-headers-from-cquery) (require 'company-lsp) (lsp-cquery-enable))) ;;column line (require 'fill-column-indicator) (add-hook 'prog-mode-hook 'fci-mode) (setq-default fill-column 80) (setq fci-rule-color "dimgray") ;;column line with company mode (defvar-local company-fci-mode-on-p nil) (defun company-turn-off-fci (&rest ignore) (when (boundp 'fci-mode) (setq company-fci-mode-on-p fci-mode) (when fci-mode (fci-mode -1)))) (defun company-maybe-turn-on-fci (&rest ignore) (when company-fci-mode-on-p (fci-mode 1))) (add-hook 'company-completion-started-hook 'company-turn-off-fci) (add-hook 'company-completion-finished-hook 'company-maybe-turn-on-fci) (add-hook 'company-completion-cancelled-hook 'company-maybe-turn-on-fci) (smartparens-global-mode 1) (show-smartparens-global-mode 1) (global-set-key (kbd "M-p s") 'sp-splice-sexp) (global-set-key (kbd "M-p r") 'sp-rewrap-sexp) ;; lisps (global-set-key (kbd "M-p ,") 'sp-forward-barf-sexp) (global-set-key (kbd "M-p .") 'sp-forward-slurp-sexp) (global-set-key (kbd "M-p ]") 'sp-down-sexp) (global-set-key (kbd "M-p [") 'sp-backward-up-sexp) ;; non lisps (global-set-key (kbd "M-p /") 'sp-forward-slurp-hybrid-sexp) (global-set-key (kbd "M-p =3D") 'sp-forward-sexp) (global-set-key (kbd "M-p -") 'sp-backward-sexp) (add-hook 'after-init-hook 'global-company-mode) (global-flycheck-mode) (setq-default flycheck-disabled-checkers '(emacs-lisp-checkdoc c/c++-cppche= ck c/c++-gcc c/c++-clang)) (require 'linum) (defvar my-linum-format-string "%6d") (defun my-linum-get-format-string () (let* ((width (length (number-to-string (count-lines (point-min) (point-max))))) (format (concat "%" (number-to-string width) "d")) (mode-line-number (concat "%" (number-to-string width) "l"))) (setq my-linum-format-string format) (setq mode-line-front-space `(:propertize ,mode-line-number face (:weig= ht bold))))) (defun my-linum-format (line-number) (propertize (format my-linum-format-string line-number) 'face 'linum)) (add-hook 'find-file-hook (lambda () (linum-mode 1))) (add-hook 'linum-before-numbering-hook 'my-linum-get-format-string) (setq linum-format 'my-linum-format) (defun set-no-process-query-on-exit () (let ((proc (get-buffer-process (current-buffer)))) (when (processp proc) (set-process-query-on-exit-flag proc nil)))) (add-hook 'term-exec-hook 'set-no-process-query-on-exit) (add-hook 'eshell-mode-hook (lambda () (company-mode -1))) ) (require 'em-tramp) (when nil (custom-set-variables ;; custom-set-variables was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(auth-source-save-behavior nil) '(auto-compile-display-buffer nil) '(byte-compile-warnings nil) '(company-backends '(company-c-headers company-lsp company-bbdb company-nxml company-css co= mpany-cmake company-capf company-files (company-dabbrev-code company-keywords) company-oddmuse company-dabbrev)) '(company-lsp-async t) '(company-lsp-cache-candidates nil) '(company-lsp-enable-recompletion t) '(custom-enabled-themes '(smart-mode-line-respectful)) '(custom-safe-themes '("c74e83f8aa4c78a121b52146eadb792c9facc5b1f02c917e3dbb454fca931223" "a2= 7c00821ccfd5a78b01e4f35dc056706dd9ede09a8b90c6955ae6a390eb1c1e" "3c83b3676d= 796422704082049fc38b6966bcad960f896669dfc21a7a37a748fa" default)) '(eshell-prefer-lisp-functions t) '(eshell-prefer-lisp-variables t) '(flycheck-check-syntax-automatically '(save mode-enabled)) '(inhibit-startup-screen t) '(lsp-enable-indentation nil) '(lsp-highlight-symbol-at-point nil) '(lsp-ui-imenu-enable nil) '(lsp-ui-sideline-enable nil) '(package-selected-packages '(auto-compile lsp-ui yasnippet company-c-headers company-lsp cquery lsp= -mode smart-tabs-mode fill-column-indicator flycheck-clang-analyzer flychec= k ## clang-format cl-lib company geiser smart-mode-line smartparens)) '(password-cache-expiry 3600)) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. ) ) --=-=-=--