From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 03 06:33:21 2016 Received: (at submit) by debbugs.gnu.org; 3 Jun 2016 10:33:21 +0000 Received: from localhost ([127.0.0.1]:52423 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b8mPp-00083h-60 for submit@debbugs.gnu.org; Fri, 03 Jun 2016 06:33:21 -0400 Received: from eggs.gnu.org ([208.118.235.92]:58341) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b8mPn-00083V-Cp for submit@debbugs.gnu.org; Fri, 03 Jun 2016 06:33:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b8mPg-0001jy-RB for submit@debbugs.gnu.org; Fri, 03 Jun 2016 06:33:14 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:56031) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b8mPg-0001je-Ne for submit@debbugs.gnu.org; Fri, 03 Jun 2016 06:33:12 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49304) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b8mPd-0001zP-Ov for bug-gnu-emacs@gnu.org; Fri, 03 Jun 2016 06:33:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b8mPX-0001fB-NN for bug-gnu-emacs@gnu.org; Fri, 03 Jun 2016 06:33:09 -0400 Received: from mail-wm0-x22e.google.com ([2a00:1450:400c:c09::22e]:35612) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b8mPW-0001es-GX for bug-gnu-emacs@gnu.org; Fri, 03 Jun 2016 06:33:03 -0400 Received: by mail-wm0-x22e.google.com with SMTP id a136so269513429wme.0 for ; Fri, 03 Jun 2016 03:33:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=n+IHfdt1O5VazRx1NI62qEltDH1amLFlghjDZ5bcNbQ=; b=1C/2r0mJYa3M4TIEZrTf3RFky1tNPyCR3XfBNBTgMVp6YKe3N9QfJ4YcXGKiD+Njae OCqYEJmj/v5QsN19qcntANA45vGHBbK04sUddPAAd/jcFdS99uhqHFJ1Rkm1VxhaS6Dj KOCW48yH2nimC78Eybfr3FYcE4VVLrj5tjetOoj/XnCN4QuJMQLpM3/pwCxlZfTSl4Fu o6FKPlRmhvFCVJTED9MOCAA7HumXsSWCE8iiaMZ4L+HUpLP6/BCnB5DP2TDUFCiumNyh sE9bnf3UA1nqQVSxX6ORw1w7wsjya2gzuxxb8yKoaxCPyftaayLx4ljLfqxqocW3zwl+ 9uBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=n+IHfdt1O5VazRx1NI62qEltDH1amLFlghjDZ5bcNbQ=; b=b9LOhMHKDs27dy61aZRUF7KEQSnCVxEgT9RWUAuHBEqesOSW+lTqdhgHWRbldNkHWa mMUVkpM/Q/zsamM2yadGel4fa1C8NUSzPKiPVBIrOti17NiEphdlZrlj5ESuDkJGy7lA yd+1Mhkp60f/eTG3jP0jpyjNwG+uXgM49U3HnJQusnhdwDAO8/RoJhtdlEi3YF5TZOa/ Eyr82Vge8mEKGxcsL+8tNGEVpwFogTYc00f6g7mh1sATbddZynPsF6TVIj34hO+Xc+CO 3ux6N1/EKSYbksVpfTtYFeRaXm6kqgAon23Z2zGJI0R7NBEAjiuMNmAZ+/NyHWDtVqeB EcjQ== X-Gm-Message-State: ALyK8tIwNNPhR/Pz5+NOV0UDL4WxyvV3w/17ppkoVRwhUL4d1VQuK68chP+DKOUFjBBJiPNBefIIXe6giA+LcQ== X-Received: by 10.28.158.8 with SMTP id h8mr3549742wme.1.1464949981087; Fri, 03 Jun 2016 03:33:01 -0700 (PDT) MIME-Version: 1.0 Received: by 10.194.108.136 with HTTP; Fri, 3 Jun 2016 03:33:00 -0700 (PDT) From: Paul Moore Date: Fri, 3 Jun 2016 11:33:00 +0100 Message-ID: Subject: Daemon-mode on Windows - "w32-initialized" is set too early To: bug-gnu-emacs@gnu.org Content-Type: text/plain; charset=UTF-8 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) When Emacs starts in daemon mode on Windows, "w32-initialized" is set to "t" right at the start - before the window system is initialized. Specifically, before (find-font) will work correctly. To demonstrate, start Emacs in daemon mode, with a .emacs.d/init.el containing a statement at the top to display the value of "w32-initialized". The value "t" is shown. In GNU Emacs 25.0.93.1 (x86_64-w64-mingw32) of 2016-04-23 built on KAEL Windowing system distributor 'Microsoft Corp.', version 6.1.7601 Configured using: 'configure --prefix=/tmp/emacs --without-imagemagick 'CFLAGS=-O2 -fomit-frame-pointer -g0'' Configured features: XPM JPEG TIFF GIF PNG RSVG SOUND DBUS NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS Important settings: value of $LANG: ENG locale-coding-system: cp1252 Major mode: Emacs-Lisp Minor modes in effect: auto-compile-mode: t elisp-slime-nav-mode: t goto-address-prog-mode: t bug-reference-prog-mode: t auto-highlight-symbol-mode: t clean-aindent-mode: t highlight-numbers-mode: t highlight-parentheses-mode: t rainbow-delimiters-mode: t helm-descbinds-mode: t helm-mode: t shell-dirtrack-mode: t helm-flx-mode: t projectile-global-mode: t projectile-mode: t recentf-mode: t hl-todo-mode: t winner-mode: t window-numbering-mode: t volatile-highlights-mode: t global-undo-tree-mode: t undo-tree-mode: t spaceline-info-mode: t spaceline-helm-mode: t smooth-scrolling-mode: t save-place-mode: t savehist-mode: t popwin-mode: t persp-mode: t global-page-break-lines-mode: t page-break-lines-mode: t Info-breadcrumbs-in-mode-line-mode: t ido-vertical-mode: t flx-ido-mode: t global-evil-surround-mode: t evil-surround-mode: t global-evil-search-highlight-persist: t evil-search-highlight-persist: t show-smartparens-global-mode: t show-smartparens-mode: t smartparens-mode: t evil-escape-mode: t global-anzu-mode: t anzu-mode: t eval-sexp-fu-flash-mode: t spacemacs-leader-override-mode: t global-spacemacs-leader-override-mode: t global-hl-line-mode: t xterm-mouse-mode: t global-auto-revert-mode: t which-key-mode: t override-global-mode: t evil-mode: t evil-local-mode: t diff-auto-refine-mode: t global-eldoc-mode: t eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t hs-minor-mode: t Recent messages: SPC ESC is undefined Type y, n, ! or SPC (the space bar): SPC n ESC is undefined mode-line-point-position enabled. mode-line-point-position disabled. Quit mode-line-point-position enabled. Quit mode-line-point-position disabled. Type M-x delete-other-windows to remove help window. mwheel-scroll: End of buffer Load-path shadows: c:/Users/UK03306/.emacs.d/elpa/helm-20160530.424/helm-multi-match hides c:/Users/UK03306/.emacs.d/elpa/helm-core-20160530.52/helm-multi-match Features: (shadow sort mail-extr emacsbug message rfc822 mml mml-sec epg mailabbrev gmm-utils mailheader sendmail mail-utils novice helm-command helm-elisp helm-eval edebug apropos auto-compile packed elisp-slime-nav goto-addr bug-reference auto-highlight-symbol clean-aindent-mode highlight-numbers parent-mode highlight-parentheses hideshow rainbow-delimiters org-element org-rmail org-mhe org-irc org-info org-gnus org-docview doc-view jka-compr image-mode org-bibtex bibtex org-bbdb org-w3m org org-macro org-footnote org-pcomplete org-list org-faces org-entities noutline outline org-version ob-emacs-lisp ob ob-tangle ob-ref ob-lob ob-table ob-exp org-src ob-keys ob-comint ob-core ob-eval org-compat org-macs org-loaddefs find-func cal-menu calendar cal-loaddefs two-column iso-transl helm-descbinds helm-mode helm-files image-dired tramp tramp-compat tramp-loaddefs trampver shell pcomplete format-spec dired-x dired-aux ffap helm-buffers helm-elscreen helm-tags helm-bookmark helm-adaptive helm-info bookmark helm-locate helm-grep helm-regexp helm-plugin helm-external helm-net browse-url xml url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util mailcap helm-utils helm-help helm-types helm-flx helm helm-source eieio-compat helm-multi-match helm-lib dired projectile grep compile ibuf-ext ibuffer recentf tree-widget async hl-todo server winner window-numbering etags xref project volatile-highlights undo-tree diff spaceline-config spaceline-segments s ucs-normalize spaceline powerline powerline-separators color powerline-themes smooth-scrolling smartparens-config saveplace savehist popwin persp-mode page-break-lines info+ ido-vertical-mode flx-ido flx ido exec-path-from-shell evil-surround evil-search-highlight-persist evil-numbers evil-lisp-state smartparens dash evil-indent-plus evil-exchange evil-escape evil-args evil-anzu anzu info eval-sexp-fu rx highlight diminish adaptive-wrap hybrid-mode evil-evilified-state ielm pp comint ansi-color hl-line xt-mouse autorevert filenotify quelpa url-parse auth-source gnus-util password-cache url-vars package-build mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mm-util help-fns mail-prsvr json map lisp-mnt use-package which-key bind-key bind-map evil evil-integration evil-maps evil-commands evil-jumps evil-command-window evil-types evil-search evil-ex evil-macros evil-repeat evil-states evil-core evil-common windmove thingatpt rect evil-digraphs evil-vars ring vc-git diff-mode time-date wid-edit spacemacs-dark-theme spacemacs-common finder-inf core-configuration-layer cl-seq ht cl warnings package epg-config seq eieio byte-opt bytecomp byte-compile cl-extra help-mode cconv eieio-core core-spacemacs core-use-package-ext core-micro-state corelv core-toggle core-keybindings core-fonts-support core-spacemacs-buffer derived edmacro kmacro core-funcs easy-mmode cl-macs gv core-themes-support core-display-init core-auto-completion core-release-management core-emacs-backports core-dotspacemacs core-command-line core-debug advice profiler easymenu cl-loaddefs cl-lib subr-x pcase mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel dos-w32 ls-lisp disp-table w32-win w32-vars term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cl-generic 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 charscript case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote w32notify dbusbind w32 multi-tty make-network-process emacs) Memory information: ((conses 16 638422 642621) (symbols 56 52659 47) (miscs 48 502 1408) (strings 32 115680 289769) (string-bytes 1 3503362) (vectors 16 76740) (vector-slots 8 1327928 388588) (floats 8 2128 6063) (intervals 56 1943 2017) (buffers 976 21)) From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 04 06:07:02 2016 Received: (at 23689) by debbugs.gnu.org; 4 Jun 2016 10:07:02 +0000 Received: from localhost ([127.0.0.1]:53742 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b98Tu-0006M4-FB for submit@debbugs.gnu.org; Sat, 04 Jun 2016 06:07:02 -0400 Received: from eggs.gnu.org ([208.118.235.92]:41962) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b98Tt-0006Lb-21 for 23689@debbugs.gnu.org; Sat, 04 Jun 2016 06:07:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b98Tk-0005LY-PR for 23689@debbugs.gnu.org; Sat, 04 Jun 2016 06:06:55 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_40,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:36710) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b98Tk-0005LU-MK; Sat, 04 Jun 2016 06:06:52 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2433 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1b98Ti-0007Pm-Se; Sat, 04 Jun 2016 06:06:51 -0400 Date: Sat, 04 Jun 2016 13:07:19 +0300 Message-Id: <8337otw9m0.fsf@gnu.org> From: Eli Zaretskii To: Paul Moore In-reply-to: (message from Paul Moore on Fri, 3 Jun 2016 11:33:00 +0100) Subject: Re: bug#23689: Daemon-mode on Windows - "w32-initialized" is set too early References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: 23689 Cc: 23689@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.4 (------) > From: Paul Moore > Date: Fri, 3 Jun 2016 11:33:00 +0100 > > When Emacs starts in daemon mode on Windows, "w32-initialized" is set > to "t" right at the start - before the window system is initialized. > Specifically, before (find-font) will work correctly. > > To demonstrate, start Emacs in daemon mode, with a .emacs.d/init.el > containing a statement at the top to display the value of > "w32-initialized". The value "t" is shown. It looks like this is an internal variable whose purpose is to make sure the w32 GUI initialization code is called only once per session; it shouldn't be used for any other purpose. I guess we could make this more explicit in the doc string, but other than that I see no bug here. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 04 06:29:37 2016 Received: (at 23689) by debbugs.gnu.org; 4 Jun 2016 10:29:37 +0000 Received: from localhost ([127.0.0.1]:53761 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b98pk-0007JT-S6 for submit@debbugs.gnu.org; Sat, 04 Jun 2016 06:29:37 -0400 Received: from mail-wm0-f51.google.com ([74.125.82.51]:38067) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b98pi-0007JF-KO for 23689@debbugs.gnu.org; Sat, 04 Jun 2016 06:29:34 -0400 Received: by mail-wm0-f51.google.com with SMTP id m124so17290213wme.1 for <23689@debbugs.gnu.org>; Sat, 04 Jun 2016 03:29:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=mbkEE8guPxHck9DUrumnm8xT2VZWRKTeGgzlIH+OTg4=; b=iUHZkEQncesaaQio3aM0OnzRhMxZr12AjCVC1KkMAsoE2g4v0rIC+pGPhOhL+YNBz9 hOT5x5pbpnL7W6pdU1FYplbX9Pam9HVJ1pWQpzjTQAIuu+EiITfgCo7exGfXLow+fEOR 9xLh71AWbLWLrfM78YASFD/aJkiVyre1v5tSb6YeuBTFg3oN5hroDld7PxI//qAHIiqC fHIaF9yEOvmSegL/z2i0sZMPxQ/iN0DbtYzycUNSwGAdQd/senVEyjpbI/cm/04vIVDg oAHcDfWDfIGm3xlJEDNTahoQDmztORyimtSTOfQv/FF/PvdljFHiCPeQJsAVong8+9J/ Gw2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=mbkEE8guPxHck9DUrumnm8xT2VZWRKTeGgzlIH+OTg4=; b=bIC73hvkn09sNQl5GBi1Tn1/IsQAV29spQ6P+m3r3UFgswTIbsT2+9UKugM6NTAacP 1JM17b5mY94R7IFPekkrLjfhSDOAYruK5SoFP93ITNPJI5jaxF1vqKcRpSiR8bXztafZ eDzRgijqpLx5IhHBAmkSGtXM6Ul3DWOHUO9Slz3cRs9fpakus8NVazuUk1h8clEA0IsF RArHp/rQtEaALPNq0M9mL8PGMA/vkuLPYUwe/FscBabvsz3yVmI/nH23uvcfYkr7zGwX EmMOSVVaG/Flq8cXRePYawlHUHGHKwjGr3J/Q8hVL3WWVukMd7C91N+5sqRkA+cd7X0K VKow== X-Gm-Message-State: ALyK8tKWWQICmb2GgNiSqMCweFUjm42Tr4T7Tubx7pAGR7Mfd5P7jZ8doNhBodKzfRR+H4OqaeZRvxvKua3vxA== X-Received: by 10.28.63.5 with SMTP id m5mr3535604wma.24.1465036169058; Sat, 04 Jun 2016 03:29:29 -0700 (PDT) MIME-Version: 1.0 Received: by 10.194.108.136 with HTTP; Sat, 4 Jun 2016 03:29:28 -0700 (PDT) In-Reply-To: <8337otw9m0.fsf@gnu.org> References: <8337otw9m0.fsf@gnu.org> From: Paul Moore Date: Sat, 4 Jun 2016 11:29:28 +0100 Message-ID: Subject: Re: bug#23689: Daemon-mode on Windows - "w32-initialized" is set too early To: Eli Zaretskii Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 23689 Cc: 23689@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 4 June 2016 at 11:07, Eli Zaretskii wrote: >> From: Paul Moore >> Date: Fri, 3 Jun 2016 11:33:00 +0100 >> >> When Emacs starts in daemon mode on Windows, "w32-initialized" is set >> to "t" right at the start - before the window system is initialized. >> Specifically, before (find-font) will work correctly. >> >> To demonstrate, start Emacs in daemon mode, with a .emacs.d/init.el >> containing a statement at the top to display the value of >> "w32-initialized". The value "t" is shown. > > It looks like this is an internal variable whose purpose is to make > sure the w32 GUI initialization code is called only once per session; > it shouldn't be used for any other purpose. I guess we could make > this more explicit in the doc string, but other than that I see no bug > here. OK. The spacemacs initialisation code uses this variable (along with ns-initialized and x-initialized) to ensure that certain actions (e.c. find-font) are only run after the display is initialized. It's only w32-initialized for which this approach doesn't work. Is there a better way of testing for this situation that should be used? Paul From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 04 06:58:03 2016 Received: (at 23689) by debbugs.gnu.org; 4 Jun 2016 10:58:03 +0000 Received: from localhost ([127.0.0.1]:53769 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b99HH-00085c-EW for submit@debbugs.gnu.org; Sat, 04 Jun 2016 06:58:03 -0400 Received: from eggs.gnu.org ([208.118.235.92]:48515) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b99HG-000857-LQ for 23689@debbugs.gnu.org; Sat, 04 Jun 2016 06:58:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b99H6-0008Sa-Oq for 23689@debbugs.gnu.org; Sat, 04 Jun 2016 06:57:57 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:37171) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b99H6-0008ST-LQ; Sat, 04 Jun 2016 06:57:52 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2524 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1b99H4-00061h-TE; Sat, 04 Jun 2016 06:57:51 -0400 Date: Sat, 04 Jun 2016 13:58:20 +0300 Message-Id: <83shwtusoj.fsf@gnu.org> From: Eli Zaretskii To: Paul Moore In-reply-to: (message from Paul Moore on Sat, 4 Jun 2016 11:29:28 +0100) Subject: Re: bug#23689: Daemon-mode on Windows - "w32-initialized" is set too early References: <8337otw9m0.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: 23689 Cc: 23689@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.4 (------) > From: Paul Moore > Date: Sat, 4 Jun 2016 11:29:28 +0100 > Cc: 23689@debbugs.gnu.org > > > It looks like this is an internal variable whose purpose is to make > > sure the w32 GUI initialization code is called only once per session; > > it shouldn't be used for any other purpose. I guess we could make > > this more explicit in the doc string, but other than that I see no bug > > here. > > OK. The spacemacs initialisation code uses this variable (along with > ns-initialized and x-initialized) to ensure that certain actions (e.c. > find-font) are only run after the display is initialized. It's only > w32-initialized for which this approach doesn't work. Is there a > better way of testing for this situation that should be used? Frankly, I'm not sure what is the situation for which you want to test. Can you describe the original problem in more detail? From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 04 08:55:07 2016 Received: (at 23689) by debbugs.gnu.org; 4 Jun 2016 12:55:07 +0000 Received: from localhost ([127.0.0.1]:53843 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b9B6Z-00041K-BU for submit@debbugs.gnu.org; Sat, 04 Jun 2016 08:55:07 -0400 Received: from mail-wm0-f51.google.com ([74.125.82.51]:36529) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b9B6X-00040q-Kt for 23689@debbugs.gnu.org; Sat, 04 Jun 2016 08:55:06 -0400 Received: by mail-wm0-f51.google.com with SMTP id n184so31005895wmn.1 for <23689@debbugs.gnu.org>; Sat, 04 Jun 2016 05:55:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=97JieatuonxkaAIl89EgpJmlKEj5NszZvkXftuvSBHg=; b=N2L+RX17Mscxfz+bN4s9/7/ZE8spJ57E321eNkuV08O0u2otZGJwipT8FVFkVRSR6v x0YKoonFGdKjmVfVUvvXekXccor5pufmGfsSNPcb+uNNtfw+Dc3U6EA+D6fKyNEPkURv ESvvXPYFHFetZUNiRC4uY7PSatGaz5VXVmAGSO1BdD2T+ID1Yc4+Ex4v2ilzxizQmQTn k/zJvwzj/UoJ1aYch0ds2UOM84DV3vl3vMNeG1cTaNB2bqiyfdgzClaPIHLiFqICts7a ZsuMHMly17XHx5atqOzL6hId1THYynPJnWdec5SQr3p4hBMBIJlHSp8izzSybKBPTfN8 zRuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=97JieatuonxkaAIl89EgpJmlKEj5NszZvkXftuvSBHg=; b=UFbS/tJ/zs+VlfS0pA73y08dkIUfCkpc9wvXnqR/cXYQNnSob7wgtOwP8pv3SqaTka cy1R6kLvh8Sc0RkRf5YvYlsk96qObWxewDC0aaIe8nyoufrphcYQbS5aeRAmdzSLgvlK /GqwEPM8pkcnZggPPISxuUu03m35bS6N3kZKgNyyhDuFYCW0YHoBq3HW/1mUhaaqTHeN Dzft0yYWBQXlGXO4KqneZswGDVT9y/wV4ck+jNvekPT8dpvEQegiMKpjvfEfXGUeKoNs glKvuQKh7qenprJ3MqeUIqibEoqJyfQQBZp5hSZyFRLJ2uGP1oQj1/hUs34ZziKsazuU srKQ== X-Gm-Message-State: ALyK8tIvAFAS/aMW5uH/VyvPpn8qUWmGA7yWCxM6wKykYLbgQymIhzNcYEKZrBrAebRyXooYLYj8Ko3QmQpELg== X-Received: by 10.28.158.8 with SMTP id h8mr4096437wme.1.1465044899917; Sat, 04 Jun 2016 05:54:59 -0700 (PDT) MIME-Version: 1.0 Received: by 10.194.108.136 with HTTP; Sat, 4 Jun 2016 05:54:59 -0700 (PDT) In-Reply-To: <83shwtusoj.fsf@gnu.org> References: <8337otw9m0.fsf@gnu.org> <83shwtusoj.fsf@gnu.org> From: Paul Moore Date: Sat, 4 Jun 2016 13:54:59 +0100 Message-ID: Subject: Re: bug#23689: Daemon-mode on Windows - "w32-initialized" is set too early To: Eli Zaretskii Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 23689 Cc: 23689@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 4 June 2016 at 11:58, Eli Zaretskii wrote: > Frankly, I'm not sure what is the situation for which you want to > test. Can you describe the original problem in more detail? Sure. The issue arises with Spacemacs. I'll give the basic idea (as well as I understand it, I'm not an expert by any means) but the actual code is at https://github.com/syl20bnr/spacemacs/blob/master/core/core-display-init.el#L28 When spacemacs starts up, it wants to set the fonts as configured by the user. To do so, it checks that the user-selected font exists using find-font (there's new code in the develop branch that allows the user to set a list of fonts, and picks the first on the list that actually exists on the system). But in daemon mode, find-font doesn't return a useful value until the display system is initialised, so there's a macro: (defmacro spacemacs|do-after-display-system-init (&rest body) "If the display-system is initialized, run `BODY', otherwise, add it to a queue of actions to perform after the first graphical frame is created." `(let ((init (cond ((boundp 'ns-initialized) 'ns-initialized) ((boundp 'w32-initialized) 'w32-initialized) ((boundp 'x-initialized) 'x-initialized) (t 't)))) ; fallback to normal loading behavior (if (symbol-value init) (progn ,@body) (push (lambda () ,@body) spacemacs--after-display-system-init-list)))) The actions on spacemacs--after-display-system-init-list are executed when the first GUI frame is displayed, via advice on server-create-window-system-frame. This process works fine on non-Windows systems, I guess because ns-initialized and x-initialized are false during daemon startup. But on Windows it fails and from my testing this appears to be because w32-initialized is true at this point (unlike the other two). As a result, the font selection code gets run immediately - specifically *before* the point when find-font will give a correct answer. To demonstrate, create a .emacs.d/init.el containing (progn (message "%S" w32-initialized) (message "%S" (find-font (font-spec :name "Courier New"))) (message "%S" w32-initialized)) Set HOME to the directory containing .emacs.d and run emacs --daemon. The result is t nil t Do the same on Unix (I used Ubuntu) using x-initialized (and a font that exists on the Unix system in place of Courier New) and you get nil nil nil Do the same using emacs (no --daemon) and look in the *Messages* buffer, and you see t t in both cases. Hopefully, that clarifies a little. Paul From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 04 11:00:59 2016 Received: (at 23689) by debbugs.gnu.org; 4 Jun 2016 15:00:59 +0000 Received: from localhost ([127.0.0.1]:54486 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b9D4N-0005BF-KR for submit@debbugs.gnu.org; Sat, 04 Jun 2016 11:00:59 -0400 Received: from eggs.gnu.org ([208.118.235.92]:58324) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b9D4L-0005B0-MC for 23689@debbugs.gnu.org; Sat, 04 Jun 2016 11:00:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b9D4B-0005CG-Nn for 23689@debbugs.gnu.org; Sat, 04 Jun 2016 11:00:52 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:39585) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b9D4B-0005CB-KF; Sat, 04 Jun 2016 11:00:47 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2698 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1b9D49-0000Mx-QE; Sat, 04 Jun 2016 11:00:46 -0400 Date: Sat, 04 Jun 2016 18:01:15 +0300 Message-Id: <83porxuhfo.fsf@gnu.org> From: Eli Zaretskii To: Paul Moore In-reply-to: (message from Paul Moore on Sat, 4 Jun 2016 13:54:59 +0100) Subject: Re: bug#23689: Daemon-mode on Windows - "w32-initialized" is set too early References: <8337otw9m0.fsf@gnu.org> <83shwtusoj.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: 23689 Cc: 23689@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.4 (------) > From: Paul Moore > Date: Sat, 4 Jun 2016 13:54:59 +0100 > Cc: 23689@debbugs.gnu.org > > When spacemacs starts up, it wants to set the fonts as configured by > the user. To do so, it checks that the user-selected font exists using > find-font (there's new code in the develop branch that allows the user > to set a list of fonts, and picks the first on the list that actually > exists on the system). But in daemon mode, find-font doesn't return a > useful value until the display system is initialised, so there's a > macro: > > (defmacro spacemacs|do-after-display-system-init (&rest body) > "If the display-system is initialized, run `BODY', otherwise, > add it to a queue of actions to perform after the first graphical frame is > created." > `(let ((init (cond ((boundp 'ns-initialized) 'ns-initialized) > ((boundp 'w32-initialized) 'w32-initialized) > ((boundp 'x-initialized) 'x-initialized) > (t 't)))) ; fallback to normal loading behavior > (if (symbol-value init) > (progn > ,@body) > (push (lambda () ,@body) spacemacs--after-display-system-init-list)))) > > The actions on spacemacs--after-display-system-init-list are executed > when the first GUI frame is displayed, via advice on > server-create-window-system-frame. If spacemacs has a way to run code when the first GUI frame is created, why cannot it do everything at that time? Why does it have to test the above conditions on top of that? > This process works fine on non-Windows systems, I guess because > ns-initialized and x-initialized are false during daemon startup. But > on Windows it fails and from my testing this appears to be because > w32-initialized is true at this point (unlike the other two). As a > result, the font selection code gets run immediately - specifically > *before* the point when find-font will give a correct answer. I think spacemacs should not rely on the other FOO-initialized variables, either, even if they appear to work for now. They are not intended to serve as evidence or trigger for any application-level logic. Instead, it should do this in a hook function (make-frame provides at least 2). > To demonstrate, create a .emacs.d/init.el containing > > (progn > (message "%S" w32-initialized) > (message "%S" (find-font (font-spec :name "Courier New"))) > (message "%S" w32-initialized)) > > Set HOME to the directory containing .emacs.d and run emacs --daemon. > The result is > > t > nil > t > > Do the same on Unix (I used Ubuntu) using x-initialized (and a font > that exists on the Unix system in place of Courier New) and you get > > nil > nil > nil > > Do the same using emacs (no --daemon) and look in the *Messages* > buffer, and you see > > t > > t > > in both cases. That "window-system initialized" automatically implies that find-font will work is IMO an invalid assumption. Exactly what parts of the initialization are run in FOO-initialize functions is implementation detail. I recommend to stay away of such assumption and instead use the hooks we provide during startup. Even if you come to the conclusion that no existing hook serves spacemacs well enough, and we then (say) add yet another hook, the result will be cleaner than relying on semi-documented variables and undocumented assumptions. From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 04 11:17:53 2016 Received: (at 23689) by debbugs.gnu.org; 4 Jun 2016 15:17:53 +0000 Received: from localhost ([127.0.0.1]:54494 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b9DKj-0005ZG-Eo for submit@debbugs.gnu.org; Sat, 04 Jun 2016 11:17:53 -0400 Received: from mail-wm0-f42.google.com ([74.125.82.42]:35695) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b9DKh-0005Z1-Cj for 23689@debbugs.gnu.org; Sat, 04 Jun 2016 11:17:51 -0400 Received: by mail-wm0-f42.google.com with SMTP id a136so34154202wme.0 for <23689@debbugs.gnu.org>; Sat, 04 Jun 2016 08:17:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=1zLXUQSD+visd6JzxSApkERlcMnDSP9whJXS+ymilrg=; b=BvIx+FrJZ5HvSeRaceI7/9SuLB3M1jSk52uGbioYFhZBnls6jspq67Gf8ABbeZNn/G faZdLEOYv1OYdHPnpb2/KeHsmN0TXDlcuQD3Eiv9RPg3QzuULm6IFTddeCli5FgaFAGn EDpHf5AZvrHYxn+Ezj1/ejTkciKT7p9TN6I7h0Kdxx017zEazmjGUTQeXXurcB+1vgML ojprax8OKuqpISs1VjH9S657Cgw5EOQbI406pXTAarOqzHsCL2gEhCaSWimdxQxCiCPf IFk06+z8OOQ0iAxBifln5tSI4pgWTaqGJagEL4EaN/iCD1dI9xgIkuixBcVRWDgU7edb 7+Dg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=1zLXUQSD+visd6JzxSApkERlcMnDSP9whJXS+ymilrg=; b=NtwEc9Y2R2U5CNfSizJmhP76e7+YuXK6c5h999RHA6FM1y2S827r0k1W66YiD1A25n D5Qrqj/DeUxLrzeQ67a1vvJBcWRCioWimebDWbMhsaJTaTBix4A88/X063UbecsrqMRX hlPBkc50f/AE5t74FyM2IhozsmGgxZDvxraeLIiFyV6OVv4s4fGkiGoAbFMH8aLNcOIs 1TrNuECHigVzeQvYjc3h0LICIlimuthiNDtdIh2vWs3fHgyhIgtwTjWXcC2UKQ5q3LIX Qmc8TJ6FJjiaCm4u0LX3wBxvSfBu1rWVeeb+I5OpyDSzVz4koXSA4zC4MJG1tOepd6Da wK5Q== X-Gm-Message-State: ALyK8tJH4vJ1IKfhfRttEHpvAMEEUALQtW48ZspBW3PLAEP2b+jENGdFbwaP2/l6pwSI9LBmBFlrD8GX6rEe7g== X-Received: by 10.28.13.137 with SMTP id 131mr4476563wmn.52.1465053465807; Sat, 04 Jun 2016 08:17:45 -0700 (PDT) MIME-Version: 1.0 Received: by 10.194.108.136 with HTTP; Sat, 4 Jun 2016 08:17:45 -0700 (PDT) In-Reply-To: <83porxuhfo.fsf@gnu.org> References: <8337otw9m0.fsf@gnu.org> <83shwtusoj.fsf@gnu.org> <83porxuhfo.fsf@gnu.org> From: Paul Moore Date: Sat, 4 Jun 2016 16:17:45 +0100 Message-ID: Subject: Re: bug#23689: Daemon-mode on Windows - "w32-initialized" is set too early To: Eli Zaretskii Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 23689 Cc: 23689@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 4 June 2016 at 16:01, Eli Zaretskii wrote: > If spacemacs has a way to run code when the first GUI frame is > created, why cannot it do everything at that time? Why does it have > to test the above conditions on top of that? [...] > I think spacemacs should not rely on the other FOO-initialized > variables, either, even if they appear to work for now. They are not > intended to serve as evidence or trigger for any application-level > logic. Instead, it should do this in a hook function (make-frame > provides at least 2). [...] > That "window-system initialized" automatically implies that find-font > will work is IMO an invalid assumption. Exactly what parts of the > initialization are run in FOO-initialize functions is implementation > detail. I recommend to stay away of such assumption and instead use > the hooks we provide during startup. Even if you come to the > conclusion that no existing hook serves spacemacs well enough, and we > then (say) add yet another hook, the result will be cleaner than > relying on semi-documented variables and undocumented assumptions. OK. Thanks for the explanation. I'll report back to the spacemacs people. For now, I have a functioning workaround (checking if (font-family-list) is non-nil) that will do for the moment. Longer term, I can't judge why spacemacs splits the initialisation like this, but I'll ask the question. Paul From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 08 09:58:00 2016 Received: (at 23689) by debbugs.gnu.org; 8 Jun 2016 13:58:01 +0000 Received: from localhost ([127.0.0.1]:32968 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bAdzb-0008M5-Nt for submit@debbugs.gnu.org; Wed, 08 Jun 2016 09:57:59 -0400 Received: from mail-wm0-f44.google.com ([74.125.82.44]:37451) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bAdzZ-0008Ls-A7 for 23689@debbugs.gnu.org; Wed, 08 Jun 2016 09:57:57 -0400 Received: by mail-wm0-f44.google.com with SMTP id k204so18445861wmk.0 for <23689@debbugs.gnu.org>; Wed, 08 Jun 2016 06:57:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=YGnGNfeAhktEXKtlH24SqDHykMDgbcgbQCnl2MLJGxk=; b=NUC5+hoxfzuZmFUplWq+xMixjORB7A2I5tqLvcx9w5pwYHfo5XDxszOZvZ/HKfKoVb 3sMwKWfWizi9mHNwvnDOozMBRI7Mir6VVFLULaeMwXBjkh9elhUJ2/3ioz9fhO+wg3v6 NtRV5TGGsMMcaZbnBnzaaMG66ozZLMU9zOg3AVPs3XVp5ElULnw2C8yFmrfYR2DX1OhH WpU5HwupARijd2Mbm4i5SYFY4sT4Alj4gbwPnOS1UQpb8X4UefKt7O5WMjrKAt2XmzKH Uok6ylv2XqquZDBYXmoHlipEuNHqOLIcpsLYGTIjgaBlCVPvVcK2DCIdbIqUExgR3RX0 7pew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=YGnGNfeAhktEXKtlH24SqDHykMDgbcgbQCnl2MLJGxk=; b=YpjI2wIq71BtdxbXUmy5E+ND5L4s1/UsoFpvYyuDCtpZJ/xggXXsj3ODW0yqT+m/oT hWouPwoVVxi/ahHSOZHL4p8C6YHVi1uJ7zfdDuKd1rMdd3BihXDKkTEoAwjvdnYFBKhT TObMkjgX0/qvcbWVbfqmhccY8iLM69tEI20GlYqXZAwCSuRMVv5Eu6SekaIVk4Jo0Z8E s8g6oGR2dp0EWG4ik4rEgJS0eCdEUlFdgGvkAxMvO9DQgrIS1QtuGPXKqtNKpxXQwRlq kxTXoP4/Pdv+CxzKSeQDDyWrEH5gw7WePHz264M5eJ2jkkNzSeikfgaWS6QgYteOirFB +01g== X-Gm-Message-State: ALyK8tI1HdxlUOekhUOySWNfXwdtmVBVEsLh3MRT4gMihZ7fQ7MQz7V8WORgmOAW7pyIE5KPYlW+yLgIDE9QkA== X-Received: by 10.194.148.46 with SMTP id tp14mr4801844wjb.104.1465394270479; Wed, 08 Jun 2016 06:57:50 -0700 (PDT) MIME-Version: 1.0 Received: by 10.194.108.136 with HTTP; Wed, 8 Jun 2016 06:57:49 -0700 (PDT) In-Reply-To: References: <8337otw9m0.fsf@gnu.org> <83shwtusoj.fsf@gnu.org> <83porxuhfo.fsf@gnu.org> From: Paul Moore Date: Wed, 8 Jun 2016 14:57:49 +0100 Message-ID: Subject: Re: bug#23689: Daemon-mode on Windows - "w32-initialized" is set too early To: Eli Zaretskii Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 23689 Cc: 23689@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 4 June 2016 at 16:17, Paul Moore wrote: > OK. Thanks for the explanation. I'll report back to the spacemacs > people. For now, I have a functioning workaround (checking if > (font-family-list) is non-nil) that will do for the moment. Longer > term, I can't judge why spacemacs splits the initialisation like this, > but I'll ask the question. To follow up on this, it probably would be useful to have some additional functionality here (or if I've missed something that already exists, feel free to point me at it!) What we're doing is attempting to select a font from a list provided by the user. So we want to call (find-font spec frame) on a list of font specs in turn. My initial attempt to do this used the after-make-frame-functions hook to call the font selection code at a point when this would work (it doesn't work on startup in daemon mode, as find-font won't work with only the initial daemon frame to work with). However, when trying to check fonts, I was getting an error "Window system frame should be used", which (from a brief look at the source in src/frame.c) seems to imply that the window system is not (yet?) available on the frame, even though the frame has been created (that's what the hook means). As a workaround, I am currently using focus-in-hook, but this is too late, as if the OS window system doesn't actually focus the new frame, there is a visible delay before the font gets reset to the correct value. Ideally, what I would like to use is either a hook that is fired shortly after after-make-frame-functions, but when the window system for the frame is fully initialised, or alternatively a call that I could use in the after-make-frame-functions hook to say "complete the initialisation of the window system for this frame right now". Or I guess maybe it could be considered a bug that when after-make-frame-functions fires, the frame's display isn't fully available - but there may be good reasons for that. I've been trying to put together a reproducible demonstration of the issue. But it's not easy to do so as everything is happening before the system is fully initialised (that's basically the point) and my attempts to track and log what's going on are affecting the results :-( I'll continue to try to produce an example, but hopefully the above explanation is sufficient, at least for now. Paul From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 14 13:09:56 2016 Received: (at 23689) by debbugs.gnu.org; 14 Jun 2016 17:09:56 +0000 Received: from localhost ([127.0.0.1]:40818 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bCrqe-0003lK-4C for submit@debbugs.gnu.org; Tue, 14 Jun 2016 13:09:56 -0400 Received: from eggs.gnu.org ([208.118.235.92]:53200) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bCrqd-0003l8-6b for 23689@debbugs.gnu.org; Tue, 14 Jun 2016 13:09:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bCrqT-0003o0-3d for 23689@debbugs.gnu.org; Tue, 14 Jun 2016 13:09:49 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_20,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:56920) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCrqT-0003nw-0F; Tue, 14 Jun 2016 13:09:45 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4876 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bCrqR-0001Q5-6D; Tue, 14 Jun 2016 13:09:43 -0400 Date: Tue, 14 Jun 2016 20:10:37 +0300 Message-Id: <83k2hrelwy.fsf@gnu.org> From: Eli Zaretskii To: Paul Moore In-reply-to: (message from Paul Moore on Wed, 8 Jun 2016 14:57:49 +0100) Subject: Re: bug#23689: Daemon-mode on Windows - "w32-initialized" is set too early References: <8337otw9m0.fsf@gnu.org> <83shwtusoj.fsf@gnu.org> <83porxuhfo.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: 23689 Cc: 23689@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.4 (------) > From: Paul Moore > Date: Wed, 8 Jun 2016 14:57:49 +0100 > Cc: 23689@debbugs.gnu.org > > What we're doing is attempting to select a font from a list provided > by the user. What do you mean by "select a font"? If the font you want to use is known in advance, then a parameter in default-frame-alist should be all you need. If the font is not known in advance, then how do you "select" it? From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 14 14:20:37 2016 Received: (at 23689) by debbugs.gnu.org; 14 Jun 2016 18:20:37 +0000 Received: from localhost ([127.0.0.1]:40839 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bCsx3-00071p-Ce for submit@debbugs.gnu.org; Tue, 14 Jun 2016 14:20:37 -0400 Received: from mail-wm0-f44.google.com ([74.125.82.44]:35578) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bCswz-00071b-Ce for 23689@debbugs.gnu.org; Tue, 14 Jun 2016 14:20:35 -0400 Received: by mail-wm0-f44.google.com with SMTP id v199so132781843wmv.0 for <23689@debbugs.gnu.org>; Tue, 14 Jun 2016 11:20:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=m6mBWzHELDivBjGvGjschAz7NgGKwvjupcN617zxGhc=; b=xHXxfnXq8Mt0WNBJulIVjYwRz7F/vwN24YXpqjyYEXX0VPADhLxFORL03sMvsg9wvK Kn+JJmFZh0vB1GsXrv/V1rURgejjAPdiLRWectT+ULdOgP0wfL3bDNwHX6VCU0fERGzN HqHhdMl6vXj3GLjWYG0SrR/H+lz8CBpV5NYuWx3w5FlBYBsv/AxSHH2p58DdQKqwGd7/ FvcTFEBgMJBvxRwFGPMksAfB6mg0kU6iItttFLHM0A49+GhnTu7tUwkPHT1FNyd3Y5Bh WVOCDAeo9V6CULnECUlJYMIETUMuWOSqLxJZW63exchtXigpEDrfR6UFtu8m7AX6w+a0 JXOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=m6mBWzHELDivBjGvGjschAz7NgGKwvjupcN617zxGhc=; b=RwpFnt/QXRLicM3TreI6J/WUtUkL1O7jAcaGSMVL2qaRNJbm78TRnqIUzWm25ND4fq LxakV2Xvq2K/LlAcO9oqCjXGPhx8+aiBdlTGyGsTiaWogY1uEZWCZr2ArLVrWxmibTrA oDHoZhrNWSgZI8GvFZtQarV3CGp/jL2grR5is+25TOfBdaWiR2yUSCHGIobCX3X/kUmd rxFX35ilGh/QvlW5K/o9YYnM2A21PUZ9K/VYr8myUkSxj1ntLtCSpv5qwmFxm/MFCzDW VEOC+PV3P6Nf1eBW11G2ZXdYOtv0Hd1YsZ8kG5N0ORS3azFIJqKWEnGALByYADX0LErr IpKg== X-Gm-Message-State: ALyK8tKjCUisHJh5xlD4FgXdjLaYOKrqkKPkVvuJ9z15K+BpGSAiG1VwUltD/S+PbnMa9gzT7oKPqSQV2+nOcQ== X-Received: by 10.194.82.36 with SMTP id f4mr2524841wjy.104.1465928427719; Tue, 14 Jun 2016 11:20:27 -0700 (PDT) MIME-Version: 1.0 Received: by 10.194.93.35 with HTTP; Tue, 14 Jun 2016 11:20:27 -0700 (PDT) In-Reply-To: <83k2hrelwy.fsf@gnu.org> References: <8337otw9m0.fsf@gnu.org> <83shwtusoj.fsf@gnu.org> <83porxuhfo.fsf@gnu.org> <83k2hrelwy.fsf@gnu.org> From: Paul Moore Date: Tue, 14 Jun 2016 19:20:27 +0100 Message-ID: Subject: Re: bug#23689: Daemon-mode on Windows - "w32-initialized" is set too early To: Eli Zaretskii Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 23689 Cc: 23689@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 14 June 2016 at 18:10, Eli Zaretskii wrote: >> What we're doing is attempting to select a font from a list provided >> by the user. > > What do you mean by "select a font"? If the font you want to use is > known in advance, then a parameter in default-frame-alist should be > all you need. If the font is not known in advance, then how do you > "select" it? The user supplies a *list* of fonts. The code then goes through those fonts in turn, checking (via find-font) whether the font exists, and if it does, then sets it as the frame font and adds it to default-frame-alist for the future. The point here is for users who want to move their config between machines, and don't always have the same fonts installed - so they would typically put their preferred font first in the list, with fallback options following. Paul From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 14 14:55:26 2016 Received: (at 23689) by debbugs.gnu.org; 14 Jun 2016 18:55:26 +0000 Received: from localhost ([127.0.0.1]:40851 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bCtUk-0000zj-F0 for submit@debbugs.gnu.org; Tue, 14 Jun 2016 14:55:26 -0400 Received: from eggs.gnu.org ([208.118.235.92]:53597) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bCtUj-0000zY-B5 for 23689@debbugs.gnu.org; Tue, 14 Jun 2016 14:55:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bCtUZ-00041G-6m for 23689@debbugs.gnu.org; Tue, 14 Jun 2016 14:55:20 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:58671) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCtUZ-000412-45; Tue, 14 Jun 2016 14:55:15 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4967 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bCtUW-0004MV-2l; Tue, 14 Jun 2016 14:55:14 -0400 Date: Tue, 14 Jun 2016 21:55:47 +0300 Message-Id: <83inxbeh1o.fsf@gnu.org> From: Eli Zaretskii To: Paul Moore In-reply-to: (message from Paul Moore on Tue, 14 Jun 2016 19:20:27 +0100) Subject: Re: bug#23689: Daemon-mode on Windows - "w32-initialized" is set too early References: <8337otw9m0.fsf@gnu.org> <83shwtusoj.fsf@gnu.org> <83porxuhfo.fsf@gnu.org> <83k2hrelwy.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: 23689 Cc: 23689@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.4 (------) > From: Paul Moore > Date: Tue, 14 Jun 2016 19:20:27 +0100 > Cc: 23689@debbugs.gnu.org > > The user supplies a *list* of fonts. The code then goes through those > fonts in turn, checking (via find-font) whether the font exists, and > if it does, then sets it as the frame font and adds it to > default-frame-alist for the future. > > The point here is for users who want to move their config between > machines, and don't always have the same fonts installed - so they > would typically put their preferred font first in the list, with > fallback options following. Sounds like a perfect use case for a fontset: create a fontset from all those fonts, and then use the name of that fontset as the value of the 'font' parameter in default-frame-alist. Emacs will look up the fonts in the font set one by one until it finds one it can use. From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 14 15:56:05 2016 Received: (at 23689) by debbugs.gnu.org; 14 Jun 2016 19:56:06 +0000 Received: from localhost ([127.0.0.1]:40885 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bCuRR-0002Pl-LV for submit@debbugs.gnu.org; Tue, 14 Jun 2016 15:56:05 -0400 Received: from mail-wm0-f48.google.com ([74.125.82.48]:34933) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bCuRP-0002PI-MG for 23689@debbugs.gnu.org; Tue, 14 Jun 2016 15:56:04 -0400 Received: by mail-wm0-f48.google.com with SMTP id v199so135788384wmv.0 for <23689@debbugs.gnu.org>; Tue, 14 Jun 2016 12:56:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=HsUyFxgJG8WeVdic5AiUXElPd5aJkb3dsPdo/gQVoDw=; b=igKpxkMLfSEz2XZ7TIZB3ofOARDbc99qKYA3sZ5SIWsUK+pqGBz/D69OyDRgxM2rpj pWcBjId7iMd8JFk+bS7wzH9TpkvM1iAtSDMPTwRYqqdlERl6HQz1AN6BVKCJ25tupJSN HZT0qgDPeqjni2b+6IYEWDdFmf+YcUHRNJQiXbe9BzwCSWeq1gU2ghjMwD24Hnzhl7Oo n5/zU9CQxaOksEVVqUZuFTEw8+lepJjJT5ak3Fj+SA7G4xnoLuzsjIJ7dbPdAlcxFuWd KaLPumEpUJvi7QcOSPzuEHgfD8RXedC7UFcydkUtxRYQmvbbECNFYNWhTPcZyGsdolbv lH9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=HsUyFxgJG8WeVdic5AiUXElPd5aJkb3dsPdo/gQVoDw=; b=BtUP5BrRhVAojmeqgtn0/KmWHjZmvE/NgNxwsEDw65fPbg4kZoH6pVFZjHP5OLvmU4 YITzqEGgts8IRkPwC5tbNfar4uENUWPhpUIb4qP9YG6NFThXJSCB3szuXu1QG74nraDw pZjRp8cAE20R8FYM93NJrgPXhPfSSpwJ7Y+PMEaBxSO8OAQv05oqeYWtp6SsevtFnpe4 D7L8g/0aj53cWfL4+8DShxFfhha0lU2oceM4ITY5MJYNd4OtvGAee3ITar7Ogdx5aTx9 mjW/yD4VYvHd3MltDEzV5BjXIVp2ihsmaDclAgN0F4E029mTkJug5r+BHoMn1tlAR44s poxg== X-Gm-Message-State: ALyK8tIdWdZvHwtPAPyOXUQrIauelCHwdMIMZE3bloCWw+XOmZgWgCvrBAv9YBsmw17Jrmsi/3uYR+GQFuPYLw== X-Received: by 10.28.87.208 with SMTP id l199mr6800152wmb.1.1465934157899; Tue, 14 Jun 2016 12:55:57 -0700 (PDT) MIME-Version: 1.0 Received: by 10.194.93.35 with HTTP; Tue, 14 Jun 2016 12:55:57 -0700 (PDT) In-Reply-To: <83inxbeh1o.fsf@gnu.org> References: <8337otw9m0.fsf@gnu.org> <83shwtusoj.fsf@gnu.org> <83porxuhfo.fsf@gnu.org> <83k2hrelwy.fsf@gnu.org> <83inxbeh1o.fsf@gnu.org> From: Paul Moore Date: Tue, 14 Jun 2016 20:55:57 +0100 Message-ID: Subject: Re: bug#23689: Daemon-mode on Windows - "w32-initialized" is set too early To: Eli Zaretskii Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 23689 Cc: 23689@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 14 June 2016 at 19:55, Eli Zaretskii wrote: >> The user supplies a *list* of fonts. The code then goes through those >> fonts in turn, checking (via find-font) whether the font exists, and >> if it does, then sets it as the frame font and adds it to >> default-frame-alist for the future. >> >> The point here is for users who want to move their config between >> machines, and don't always have the same fonts installed - so they >> would typically put their preferred font first in the list, with >> fallback options following. > > Sounds like a perfect use case for a fontset: create a fontset from > all those fonts, and then use the name of that fontset as the value of > the 'font' parameter in default-frame-alist. Emacs will look up the > fonts in the font set one by one until it finds one it can use. Hmm. Are they cross-platform? The "Defining fontsets" page in the Emacs manual talks about X resouces. I'm on Windows, and I don't know how I'd set up an X resource there. To give a concrete example, how would I ask Emacs to choose the first of "Source Code Pro-12", "DevaVu Sans Mono-12", "Consolas-12" or "Courier New-12" that was present on the machine? Thanks, Paul From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 14 22:32:58 2016 Received: (at 23689) by debbugs.gnu.org; 15 Jun 2016 02:32:58 +0000 Received: from localhost ([127.0.0.1]:41028 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bD0dW-0001OT-6v for submit@debbugs.gnu.org; Tue, 14 Jun 2016 22:32:58 -0400 Received: from eggs.gnu.org ([208.118.235.92]:39861) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bD0dU-0001OG-NL for 23689@debbugs.gnu.org; Tue, 14 Jun 2016 22:32:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bD0dM-0003i8-Ix for 23689@debbugs.gnu.org; Tue, 14 Jun 2016 22:32:51 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:36729) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bD0dM-0003i2-Fe; Tue, 14 Jun 2016 22:32:48 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1253 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bD0dL-0003Ts-Lc; Tue, 14 Jun 2016 22:32:48 -0400 Date: Wed, 15 Jun 2016 05:33:42 +0300 Message-Id: <83fusfdvuh.fsf@gnu.org> From: Eli Zaretskii To: Paul Moore In-reply-to: (message from Paul Moore on Tue, 14 Jun 2016 20:55:57 +0100) Subject: Re: bug#23689: Daemon-mode on Windows - "w32-initialized" is set too early References: <8337otw9m0.fsf@gnu.org> <83shwtusoj.fsf@gnu.org> <83porxuhfo.fsf@gnu.org> <83k2hrelwy.fsf@gnu.org> <83inxbeh1o.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: 23689 Cc: 23689@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.4 (------) > From: Paul Moore > Date: Tue, 14 Jun 2016 20:55:57 +0100 > Cc: 23689@debbugs.gnu.org > > > Sounds like a perfect use case for a fontset: create a fontset from > > all those fonts, and then use the name of that fontset as the value of > > the 'font' parameter in default-frame-alist. Emacs will look up the > > fonts in the font set one by one until it finds one it can use. > > Hmm. Are they cross-platform? Yes. > The "Defining fontsets" page in the Emacs manual talks about X > resouces. X resources are supported on Windows as well, but that's unrelated. Look in the ELisp manual, not in the user manual. There are many examples in fontset.el for you to use. > I'm on Windows, and I don't know how I'd set up an X resource there. You don't need X resources to create a fontset. Use create-fontset-from-fontset-spec to create a new fontset, and set-fontset-font to add fonts to the fontset. > To give a concrete example, how would I ask Emacs to choose the first > of "Source Code Pro-12", "DevaVu Sans Mono-12", "Consolas-12" or > "Courier New-12" that was present on the machine? Make a fontset that includes all these fonts, and then use the fontset name in the default-frame-alist's 'font' parameter. From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 15 03:08:15 2016 Received: (at 23689) by debbugs.gnu.org; 15 Jun 2016 07:08:15 +0000 Received: from localhost ([127.0.0.1]:41123 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bD4vu-0001GY-UJ for submit@debbugs.gnu.org; Wed, 15 Jun 2016 03:08:15 -0400 Received: from mail-wm0-f48.google.com ([74.125.82.48]:35132) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bD4vs-0001GJ-NT for 23689@debbugs.gnu.org; Wed, 15 Jun 2016 03:08:13 -0400 Received: by mail-wm0-f48.google.com with SMTP id v199so149692342wmv.0 for <23689@debbugs.gnu.org>; Wed, 15 Jun 2016 00:08:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=7l67At06GdgpHANNOr11/WVhM+vs7eKRw/Vp8Y6uTAY=; b=N+vmqi0DtS01/AyVUkjj2ETXLmmJ6VrbADN6YIoF5zw3islET9AiF7NOVSPsEgFFs1 0LOEyruU1xx1dJmdG/Ut+s405gbfALsORdYDHV+yQn6brpNSIASROFKb50f9I/1zUp65 CXcgsHT1b/uHyu9d2qERHisGuYoIXs1jX+GjcTBGnpND6rh2GGPBHqn0Lvj7/U++gOxC DUWL8o0HbaW1+zMr/rwRjceUiqsBsE1TY2Uw0mQ+Y2BZ/9vtilgS7h0moSdHIOBrhqoa WKHhIJZJCdYUl48jCoYsvMRcZ9mMIjYZkJ9bIk+fQXIN8T9El3lgLnl6aekb8T2RpUf9 vwUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=7l67At06GdgpHANNOr11/WVhM+vs7eKRw/Vp8Y6uTAY=; b=PhtT8PB3dwbveJkD1A1fgZPWYo9VeZJR5uo3KvNklAJs7f4/UQZ1DC2VVAjD8fwA0l w93a/Hlmlph1nEvaM9Y1RuB3CCBRcMThptsU4U9WmC5jAM3/O1IDZRPNpS+IrbXp4TCa LEc6tDT7RpuPX7kQ8JK8+vJt88g5T5ewdl68qIwVvAJ4fhTfvu5maLx02j1uIlpUV0p/ o68LS5+FHozvcFxJ2Z6hIWvKwP+I5sEbqwyV1tFgbR6Kom2HxQlsIdafWautjvrtxb5t gbtEjOBWYtPQQi70HINSWcNOS4Q6e2PDb+EoeZRh1kxL5COwJjdTmO6JrCtFwKJ0UPZv LGTg== X-Gm-Message-State: ALyK8tLtNeOnA+/VUQAlEl/lZUr4Dwcc8WE1vr17OYdAxLQuk3Jwm+/muU+/v6mzGV3tR+Bkxe0QpDYk0GxP8g== X-Received: by 10.28.87.208 with SMTP id l199mr8894185wmb.1.1465974487083; Wed, 15 Jun 2016 00:08:07 -0700 (PDT) MIME-Version: 1.0 Received: by 10.194.93.35 with HTTP; Wed, 15 Jun 2016 00:08:06 -0700 (PDT) In-Reply-To: <83fusfdvuh.fsf@gnu.org> References: <8337otw9m0.fsf@gnu.org> <83shwtusoj.fsf@gnu.org> <83porxuhfo.fsf@gnu.org> <83k2hrelwy.fsf@gnu.org> <83inxbeh1o.fsf@gnu.org> <83fusfdvuh.fsf@gnu.org> From: Paul Moore Date: Wed, 15 Jun 2016 08:08:06 +0100 Message-ID: Subject: Re: bug#23689: Daemon-mode on Windows - "w32-initialized" is set too early To: Eli Zaretskii Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 23689 Cc: 23689@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 15 June 2016 at 03:33, Eli Zaretskii wrote: >> To give a concrete example, how would I ask Emacs to choose the first >> of "Source Code Pro-12", "DevaVu Sans Mono-12", "Consolas-12" or >> "Courier New-12" that was present on the machine? > > Make a fontset that includes all these fonts, and then use the fontset > name in the default-frame-alist's 'font' parameter. OK. Thanks for the explanation. I didn't know about that :-) Paul From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 15 07:11:53 2016 Received: (at 23689) by debbugs.gnu.org; 15 Jun 2016 11:11:53 +0000 Received: from localhost ([127.0.0.1]:41199 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bD8jh-0007LN-2u for submit@debbugs.gnu.org; Wed, 15 Jun 2016 07:11:53 -0400 Received: from mail-wm0-f50.google.com ([74.125.82.50]:37447) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bD8jg-0007LB-1i for 23689@debbugs.gnu.org; Wed, 15 Jun 2016 07:11:52 -0400 Received: by mail-wm0-f50.google.com with SMTP id a66so19231044wme.0 for <23689@debbugs.gnu.org>; Wed, 15 Jun 2016 04:11:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=ADMXltujuXzBH/qZYkyMDTzURLaDYdDQKuFZXlHTIK8=; b=aHFofVvIhoVj899DkYGEgmM4Lo0s7z/3aBYlujFf5btF9ro2Q9vs6R4jKT7H56C0kM VnOSHPLEHFlOJRESEWZVy90YiuAOmRFp6ypjcXSjtfbo9cqgY0K+so0Yk5BLdSXFn/35 juYe10WXx6e/1WHCvdHSARLTJoS/gIa8cm32zm3abMUIBTcfulK8WhM9yC4MyQipo7u4 ig6lnBz05AVoA9Ng/vi7rUyLOWXmpqj0W4D0jZCRoN/vA+CtVqMjK9uWFl1epOsyby+2 ROYJWvgt7YL8r2OakYoukzw3W2jXA2oFIYSCp8toapLwkBqSGE2SQz+xPOx0KhSf0X3j /vPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=ADMXltujuXzBH/qZYkyMDTzURLaDYdDQKuFZXlHTIK8=; b=WgMvFVAgP4yQbX5EjCTQTgLzTmKUufTgLEIiLNvoJCrwTnZwMY/1lgk/tGjTGwiBkh r6TJcZnSkuAvw1xwxfyEZuGlfa+eLBxixevs+7vCAAiWgQ1KjhKzlNjXVrVtdcwgl2It nDq+SQtVhL7J80DiybLgnlbXPz3zdMviWNS17IsOMvB+6MKwHXhHR9exWfw0qeD2I2ME Ydw6fP1aCC6Cq43exe62rmrJVB9fh03JdnT7mvAwCyQfLb2AiQv/C2qz99G1yKKH9ffB Oq6ydUgDOJH2d/aKiUtqzunBHwB0KHiKfu5S6jK4Hc0ZSWEbQGIWd2Jrim8hi6AgvJAp WI3A== X-Gm-Message-State: ALyK8tLvAqqeK3h285vUk+2QY2vUim0yAcNMoM9795pWSmKe5/KNMes+1RMMZPk4nnZGrhaSy4ORmt0ZCIp4bA== X-Received: by 10.194.82.36 with SMTP id f4mr5894792wjy.104.1465989106389; Wed, 15 Jun 2016 04:11:46 -0700 (PDT) MIME-Version: 1.0 Received: by 10.194.93.35 with HTTP; Wed, 15 Jun 2016 04:11:45 -0700 (PDT) In-Reply-To: References: <8337otw9m0.fsf@gnu.org> <83shwtusoj.fsf@gnu.org> <83porxuhfo.fsf@gnu.org> <83k2hrelwy.fsf@gnu.org> <83inxbeh1o.fsf@gnu.org> <83fusfdvuh.fsf@gnu.org> From: Paul Moore Date: Wed, 15 Jun 2016 12:11:45 +0100 Message-ID: Subject: Re: bug#23689: Daemon-mode on Windows - "w32-initialized" is set too early To: Eli Zaretskii Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 23689 Cc: 23689@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 15 June 2016 at 08:08, Paul Moore wrote: >> Make a fontset that includes all these fonts, and then use the fontset >> name in the default-frame-alist's 'font' parameter. > > OK. Thanks for the explanation. I didn't know about that :-) Am I doing something wrong? (create-fontset-from-fontset-spec "-*-fixed-medium-r-normal-*-24-*-*-*-*-*-fontset-xxx") (set-fontset-font "fontset-xxx" nil "Source Code Pro-14") (set-fontset-font "fontset-xxx" nil "DejaVu Sans Mono-14" nil 'append) (set-fontset-font "fontset-xxx" nil "Consolas-14" nil 'append) (set-fontset-font "fontset-xxx" nil "Courier New-14" nil 'append) (setq default-frame-alist '((font . "fontset-xxx") (vertical-scroll-bars))) If I then create a new frame, I get the error "Font 'fontset-xxx' is not defined". The font parameter for a frame is documented as The name of the font for displaying text in the frame. This is a string, either a valid font name for your system or the name of an Emacs fontset (*note Fontsets::). It is equivalent to the =E2=80=98fo= nt=E2=80=99 attribute of the =E2=80=98default=E2=80=99 face. Am I not using a correct fontset name here? Paul From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 15 10:55:12 2016 Received: (at 23689) by debbugs.gnu.org; 15 Jun 2016 14:55:12 +0000 Received: from localhost ([127.0.0.1]:42402 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bDCDo-00062f-Ft for submit@debbugs.gnu.org; Wed, 15 Jun 2016 10:55:12 -0400 Received: from eggs.gnu.org ([208.118.235.92]:40903) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bDCDj-00062F-0X for 23689@debbugs.gnu.org; Wed, 15 Jun 2016 10:55:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bDCDY-00051V-QX for 23689@debbugs.gnu.org; Wed, 15 Jun 2016 10:55:01 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:48627) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDCDY-00051P-NJ; Wed, 15 Jun 2016 10:54:56 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1613 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bDCDX-0002sU-Q1; Wed, 15 Jun 2016 10:54:56 -0400 Date: Wed, 15 Jun 2016 17:55:52 +0300 Message-Id: <8360taec1z.fsf@gnu.org> From: Eli Zaretskii To: Paul Moore In-reply-to: (message from Paul Moore on Wed, 15 Jun 2016 12:11:45 +0100) Subject: Re: bug#23689: Daemon-mode on Windows - "w32-initialized" is set too early References: <8337otw9m0.fsf@gnu.org> <83shwtusoj.fsf@gnu.org> <83porxuhfo.fsf@gnu.org> <83k2hrelwy.fsf@gnu.org> <83inxbeh1o.fsf@gnu.org> <83fusfdvuh.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: 23689 Cc: 23689@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.4 (------) > From: Paul Moore > Date: Wed, 15 Jun 2016 12:11:45 +0100 > Cc: 23689@debbugs.gnu.org > > (create-fontset-from-fontset-spec > "-*-fixed-medium-r-normal-*-24-*-*-*-*-*-fontset-xxx") > (set-fontset-font "fontset-xxx" nil "Source Code Pro-14") > (set-fontset-font "fontset-xxx" nil "DejaVu Sans Mono-14" nil 'append) > (set-fontset-font "fontset-xxx" nil "Consolas-14" nil 'append) > (set-fontset-font "fontset-xxx" nil "Courier New-14" nil 'append) > (setq default-frame-alist '((font . "fontset-xxx") (vertical-scroll-bars))) > > If I then create a new frame, I get the error "Font 'fontset-xxx' is > not defined". You cannot define a fontset using the name of a font that doesn't exist on the system. The doc string of create-fontset-from-fontset-spec hints on this: When a frame uses the fontset as the ‘font’ parameter, the frame’s default font name is derived from FONTSET-NAME by substituting "iso8859-1" for the tail part "fontset-XXX". Since there's no fixed-medium font on Windows, Emacs barfs because the default font of the frame doesn't exist. You need instead to start with a name of a font that surely exists on Windows, like "-*-courier new-normal-r-*-*-13-*-*-*-c-*-fontset-xxx". Then the above will work as expected. On Unix, you should probably start with fixed-medium, as you did. If you want to do that in platform-independent way, you could look up "fontset-standard" in the list returned by fontset-list, and chop off the "fontset-standard" part. Hmm... which could mean it might be easier for you to just modify the standard fontset, by adding your fonts as covering the full range of the characters each one supports. From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 15 11:26:49 2016 Received: (at 23689) by debbugs.gnu.org; 15 Jun 2016 15:26:49 +0000 Received: from localhost ([127.0.0.1]:42419 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bDCiO-0006m9-Tg for submit@debbugs.gnu.org; Wed, 15 Jun 2016 11:26:49 -0400 Received: from mail-lb0-f170.google.com ([209.85.217.170]:34817) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bDCiN-0006lw-1j for 23689@debbugs.gnu.org; Wed, 15 Jun 2016 11:26:47 -0400 Received: by mail-lb0-f170.google.com with SMTP id o4so3680436lbp.2 for <23689@debbugs.gnu.org>; Wed, 15 Jun 2016 08:26:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=qol5yKfoJGDM1EJHqb8QKFCgJVpV2VLhKvK4Ih/KwnM=; b=cK3nZ6KiWAmZ6FcELNlqFSmXwvBtp8ZaykGo0oevTX4c+KbMi8s4U6eqkpD496ymGI yF2/NSvvueVYxrTE+kGjdAaaFjDLqHipwwqDdfMwRBP+r3gFS7m+xuNhXrx3etKD60lx PE8gq5XZBlFfwZOOTeFgI7qDSfDqoa/fO0XYN9gjTtii8FWt3lrtwKBhuQ5qi3F5y4Kl yB4lYQt+BfIt1rFSgIF8J/KcFcq6BDO0m8e16tDbIe+sy45P5vzNXoGjBAbOhN8MeJCH Q5kbm4jZemfuk+MxKqEc7CH3c32cQ/kkQ2Edsh0TVq+SKTrxLWGN98CuruePFLX8qxf2 cKlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=qol5yKfoJGDM1EJHqb8QKFCgJVpV2VLhKvK4Ih/KwnM=; b=d0tTHu1UsNkdrBE51EG+mPHewAlpHjr0C2pPeUv4UuBAjeDH75gjDynaiZMMBmlhOE xqwPEfjX6yLVQZ4jFFHojI/CeScgzP1sUHA87Ok3B4f3ClLg0NnwcbWsjS0N2LvjkB5H CzIXS8HURp8jndtXumYzZ8EDjQfs527au7Q0gP38eUtGdetkNvMcWCvnTtwG0ptXQFzn /lEmeWHhSFejmNgQ7lUtUAWwntCK3kvH1QMz7uTdPlvoPxxtJ1fL7IddYdc3w4LNs6gH T5kFS3SgSJYUN51hydae7zH2AweUl3uPG/F2JxTyzNTuzbfSehCOlQRlwXab5ZpyahwX dZvA== X-Gm-Message-State: ALyK8tKg/9oY5u5KFMvDS4nheqTyKLVcpLPas929rntd8F0Z+0JWl43jt83d1U/Y6fZ/M7l9aFKKrFJRgIi2ow== X-Received: by 10.28.158.17 with SMTP id h17mr12981269wme.1.1466004400932; Wed, 15 Jun 2016 08:26:40 -0700 (PDT) MIME-Version: 1.0 Received: by 10.194.93.35 with HTTP; Wed, 15 Jun 2016 08:26:40 -0700 (PDT) In-Reply-To: <8360taec1z.fsf@gnu.org> References: <8337otw9m0.fsf@gnu.org> <83shwtusoj.fsf@gnu.org> <83porxuhfo.fsf@gnu.org> <83k2hrelwy.fsf@gnu.org> <83inxbeh1o.fsf@gnu.org> <83fusfdvuh.fsf@gnu.org> <8360taec1z.fsf@gnu.org> From: Paul Moore Date: Wed, 15 Jun 2016 16:26:40 +0100 Message-ID: Subject: Re: bug#23689: Daemon-mode on Windows - "w32-initialized" is set too early To: Eli Zaretskii Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 23689 Cc: 23689@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 15 June 2016 at 15:55, Eli Zaretskii wrote: > Hmm... which could mean it might be easier for you to just modify the > standard fontset, by adding your fonts as covering the full range of > the characters each one supports. No disrespect intended here, but this all sounds pretty complex (and there's almost no examples I've been able to find on the web of people doing this in practice). All that's really going on here is that instead of wanting to customize the default font (something you can do with one line of code, or via the customize interface) I want to say "pick whichever one of these 3 fonts actually exists on the system". There are a number of approaches for this on the web, of various levels of complexity. But they have issues when used with Windows daemon mode, which as I reported seems to be due to something peculiar in how Windows daemon mode works meaning that sometimes find-font fails if called "at the wrong time" - and the hooks people currently use seem to trigger that. Spacemacs at the moment has some code that hooks server-create-window-system-frame to do initialisation "that needs to have the display system initialized". That code is fragile, and again doesn't seem to work on Windows daemon mode. It's used for various things, only one of which is font selection. In an attempt to get font selection working, I'm looking at options here - I'm OK with taking the existing font selection code and moving it to a different hook. However, finding such a hook is proving hard. An alternative approach, such as fontsets, to setting the font is possible, but risks breaking other things in spacemacs that I don't currently understand (there's code that sets alternate fonts on fontset-default against certain Unicode characters for a custom modeline package, for example). So while I'm OK with experimenting here, and if I understand the resulting process, modifying the spacemacs code to use it, it would be very easy for me to make things worse rather than better. Also, in the spacemacs code, choosing from a list of fonts is covered, albeit via custom code - so if I could find "the right hook", I wouldn't need to worry about any of this. My problems with where we've got to with the fontset approach are: 1. I've yet to get it working (pretty basic :-)) 2. If I have to define a fontset using the name of a font that's on the system, how do I obtain such a font name in a cross-platform way? Can Emacs tell me what would be suitable? Am I allowed to reuse the font name that was used for the default fontset? 3. I don't want to modify the default fontset, at least in the first instance, as doing so could break the spacemacs code. Once I have something working with a custom fontset, then maybe I would be able to work out how to merge the two bits of code. At the moment, I'm running the spacemacs font code the first time after-make-frame-functions runs, and calling select-frame to select the created frame before I run the spacemacs code. It seems to work, but I'm unclear why I need to call select-frame, and whether there might be hidden issues remaining. Also, because I can't set the font until *after* the frame is created, there's a flicker with the initial frame opening with the "wrong" font and then resetting. So - to summarise. There seems to be a lot of complexity here, in achieving what feels like it ought to be a pretty straightforward requirement. Your fontset suggestion seemed simple, but on digging into it it turned out to be more complex that I'd hoped in practice. If I could get it working it might make sense to rip out the current spacemacs approach in favour of it, but at the moment it seems like I'd lose more than I gained. On the other hand, there's clearly some issues around the idea of a hook that runs "once the display system is ready" - spacemacs' current hack has problems, and so does any alternative approach I've tried. But if there genuinely isn't a good hook we can use (and no likelihood of one being added) then I guess I have to live with that. I do appreciate all of the help you've given - and I completely respect the fact that you don't want to get sucked into what's essentially a spacemacs issue. But if you have any further suggestions on how something like this *should* be handled, I'd appreciate them. Paul From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 15 11:46:37 2016 Received: (at 23689) by debbugs.gnu.org; 15 Jun 2016 15:46:37 +0000 Received: from localhost ([127.0.0.1]:42430 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bDD1Z-0007F5-5s for submit@debbugs.gnu.org; Wed, 15 Jun 2016 11:46:37 -0400 Received: from eggs.gnu.org ([208.118.235.92]:33632) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bDD1V-0007Eo-L0 for 23689@debbugs.gnu.org; Wed, 15 Jun 2016 11:46:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bDD1N-0004Ko-7F for 23689@debbugs.gnu.org; Wed, 15 Jun 2016 11:46:28 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:49666) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDD1N-0004KV-3l; Wed, 15 Jun 2016 11:46:25 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2015 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bDD1L-0002Za-BK; Wed, 15 Jun 2016 11:46:23 -0400 Date: Wed, 15 Jun 2016 18:47:20 +0300 Message-Id: <83vb1acv3r.fsf@gnu.org> From: Eli Zaretskii To: Paul Moore In-reply-to: (message from Paul Moore on Wed, 15 Jun 2016 16:26:40 +0100) Subject: Re: bug#23689: Daemon-mode on Windows - "w32-initialized" is set too early References: <8337otw9m0.fsf@gnu.org> <83shwtusoj.fsf@gnu.org> <83porxuhfo.fsf@gnu.org> <83k2hrelwy.fsf@gnu.org> <83inxbeh1o.fsf@gnu.org> <83fusfdvuh.fsf@gnu.org> <8360taec1z.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: 23689 Cc: 23689@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.4 (------) > From: Paul Moore > Date: Wed, 15 Jun 2016 16:26:40 +0100 > Cc: 23689@debbugs.gnu.org > > 2. If I have to define a fontset using the name of a font that's on > the system, how do I obtain such a font name in a cross-platform way? I suggested a way of doing that in my previous message. > Am I allowed to reuse the font name that was used for the default > fontset? Sure, why not? > So - to summarise. There seems to be a lot of complexity here, in > achieving what feels like it ought to be a pretty straightforward > requirement. It's not straightforward, it's pretty advanced stuff. Most users don't mess with fontsets, and if they want to customize fonts, they know their favorite fonts in advance. > On the other hand, there's clearly some issues around the idea of a > hook that runs "once the display system is ready" - spacemacs' > current hack has problems, and so does any alternative approach I've > tried. But if there genuinely isn't a good hook we can use (and no > likelihood of one being added) then I guess I have to live with > that. The problem is that "hook that runs once the display system is ready" is not well defined. "The display system" includes several components, and the order and timing of their setup do not necessarily fit your specific needs. > I do appreciate all of the help you've given - and I completely > respect the fact that you don't want to get sucked into what's > essentially a spacemacs issue. But if you have any further suggestions > on how something like this *should* be handled, I'd appreciate them. Sorry, I don't know enough about spacemacs to tell anything else. From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 15 12:58:52 2016 Received: (at 23689) by debbugs.gnu.org; 15 Jun 2016 16:58:52 +0000 Received: from localhost ([127.0.0.1]:42475 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bDE9U-0002F1-BP for submit@debbugs.gnu.org; Wed, 15 Jun 2016 12:58:52 -0400 Received: from mail-lb0-f171.google.com ([209.85.217.171]:35148) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bDE9T-0002Eo-5P for 23689@debbugs.gnu.org; Wed, 15 Jun 2016 12:58:51 -0400 Received: by mail-lb0-f171.google.com with SMTP id o4so5195101lbp.2 for <23689@debbugs.gnu.org>; Wed, 15 Jun 2016 09:58:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=RuyavlFJ2co2m2iCgU5Ov4pGMNe8VtsQkR9m3u0Dv3Q=; b=FiDc/LvD0SZmPOXGXuNdPDLGdwHfZF1yDZlahnTkn3o9etiHydR+8Q5GJDetywplDO rD+spJcqTcvTYGIIBCJTah8TG+Aqbg697SRG+Wkm5Qu/1MCnUXSJchPDAtaXS/VjW2kB kiMEYmAkQln2ffLJFuYZexAx9oX9PuqxAC426wC26xi2kElVngLtkyWoA7bVM+hDFwOL 1bHZzD2P2owoBj1LFS3Cqer9MgKvLnXpdRftFnDLAOhWFzZsNlX+aaEbMvd/cRbAT9HW wIHhpaZY0Pjj6uUXeLQpOb4nKgAwasMiRu9kl/CF6rCc+MrHE7+wvYCmO+8n6rweO5Xk nkxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=RuyavlFJ2co2m2iCgU5Ov4pGMNe8VtsQkR9m3u0Dv3Q=; b=L89kIYqWUQEM2ESwWLO/yC6d4wBnhTF1QaTCuuUkEUlQ9ynJAnpZ2kmR5UeH7UiF5x iMhCiRH2PgOlkJZIvw4I9I6ithD+Pc70Hq7dhM8zoXorv1lnnHtxCaqj/NZGX+9zFCqT YEPhnXL+Iea2yQdSsCM55Wk0zFkBn71GngESFpfEE6ufOruQQnIHLibQDgvpRjViEODY FkbezYrsHL9ZMR9UusIwYYB/LNNuwpr0rYEfDTv5AM4w55nj0IpfUV+mt99CXah9i+H9 8BH1xYMkDT8HoEU17ckelZt68MNK3yCWNEIepOh6wVWUgtidMGkRyAGAE2j4Ssg5tKfQ 7UFQ== X-Gm-Message-State: ALyK8tKFKlXZZc1AHl2gG406rP0FJTiRTTi4p6hDHZQzhcuK+qSLSZlCyyDtH8VuobqhzP6GBHdlWsBItxdIJg== X-Received: by 10.28.11.83 with SMTP id 80mr365691wml.52.1466009924812; Wed, 15 Jun 2016 09:58:44 -0700 (PDT) MIME-Version: 1.0 Received: by 10.194.93.35 with HTTP; Wed, 15 Jun 2016 09:58:43 -0700 (PDT) In-Reply-To: <83vb1acv3r.fsf@gnu.org> References: <8337otw9m0.fsf@gnu.org> <83shwtusoj.fsf@gnu.org> <83porxuhfo.fsf@gnu.org> <83k2hrelwy.fsf@gnu.org> <83inxbeh1o.fsf@gnu.org> <83fusfdvuh.fsf@gnu.org> <8360taec1z.fsf@gnu.org> <83vb1acv3r.fsf@gnu.org> From: Paul Moore Date: Wed, 15 Jun 2016 17:58:43 +0100 Message-ID: Subject: Re: bug#23689: Daemon-mode on Windows - "w32-initialized" is set too early To: Eli Zaretskii Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 23689 Cc: 23689@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 15 June 2016 at 16:47, Eli Zaretskii wrote: >> 2. If I have to define a fontset using the name of a font that's on >> the system, how do I obtain such a font name in a cross-platform way? > > I suggested a way of doing that in my previous message. Sorry, I missed that (I focused straight on "you could modify the default fontset"). My mistake, sorry. >> Am I allowed to reuse the font name that was used for the default >> fontset? > > Sure, why not? Yes, that follows from the above. As to "why not" I was thinking of it as being the name of the fontset, and so possibly having to be unique. I understand now. >> So - to summarise. There seems to be a lot of complexity here, in >> achieving what feels like it ought to be a pretty straightforward >> requirement. > > It's not straightforward, it's pretty advanced stuff. Most users > don't mess with fontsets, and if they want to customize fonts, they > know their favorite fonts in advance. In terms of what I'm learning, it's definitely advanced! (And your help is appreciated). I always though of the *idea* of a fallback font as pretty basic, though (but maybe that's simply because I came from Vim, where it's built in). >> On the other hand, there's clearly some issues around the idea of a >> hook that runs "once the display system is ready" - spacemacs' >> current hack has problems, and so does any alternative approach I've >> tried. But if there genuinely isn't a good hook we can use (and no >> likelihood of one being added) then I guess I have to live with >> that. > > The problem is that "hook that runs once the display system is ready" > is not well defined. "The display system" includes several > components, and the order and timing of their setup do not necessarily > fit your specific needs. OK, I get that. As I say, it's just a reality that I'll have to live with. >> I do appreciate all of the help you've given - and I completely >> respect the fact that you don't want to get sucked into what's >> essentially a spacemacs issue. But if you have any further suggestions >> on how something like this *should* be handled, I'd appreciate them. > > Sorry, I don't know enough about spacemacs to tell anything else. No problem. And now that you pointed out the part of your previous message that I missed, I have enough to go on. Many thanks for your time and help. Paul From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 23 19:06:54 2016 Received: (at control) by debbugs.gnu.org; 23 Jun 2016 23:06:54 +0000 Received: from localhost ([127.0.0.1]:53113 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bGDi2-0002xw-3x for submit@debbugs.gnu.org; Thu, 23 Jun 2016 19:06:54 -0400 Received: from mail-oi0-f41.google.com ([209.85.218.41]:33533) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bGDi0-0002xk-P7 for control@debbugs.gnu.org; Thu, 23 Jun 2016 19:06:53 -0400 Received: by mail-oi0-f41.google.com with SMTP id u201so92629489oie.0 for ; Thu, 23 Jun 2016 16:06:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:from:date:message-id:subject:to; bh=lq0CEtgix7Teur87op/bFFMHC+pN5m4+/ujN2kNm7ms=; b=OSgDXrEr2aDmNRpc0VGbYQZS+W01T+T/qr38wS5V6BFgkQ04zZE/EQJlJyFCiOn6bL Mnm8arvW9jj7BILJLzggilyHA3Ij/fhseukW6XiAeFbWFh2kkuPRq6DrJSSJzhUvuH73 EjeEyTJ54EFCWfiHTViCT+QbV4VGvn08wx+jupUwdNGk3hes6qC6LbVPE4wej/gwKcxI mEf4NmhbdX3bxVvql7j8SWenM/IvmLJjWiQnHknxE3NKMBjMNS68nQEUcMxxVV0YcfGi IGvs99XCHjt9npGdPvlf3phvQvqS20O0yAOlKveovuJLSKp1K9qVrleyuvlGPPJW+KEE XCaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:from:date:message-id:subject :to; bh=lq0CEtgix7Teur87op/bFFMHC+pN5m4+/ujN2kNm7ms=; b=SNI1VpGfdiPWPb4utpi4NZ0FAZHRJXo/K3aJVVVitcId+njC1BQh0cukTFWA/ckPh6 zA11+xnzfBaSnz9qnbF1H4bFxo4KhUpVhA1WtPlW0UxO+Ssa0YrxPiX2/kHG7OLfdnPC MbOOXNvIfHvl53zw8Ul3w92MdLdJvPwQWU+5+n+0F/rd2Pl+pw+GForqw/E0XBALyEnO qVPNYvL/wDPRQhfdinAyHj9LMzL/kL8GViQClP5N+O2dDAd2uUl9liNwIxwROFuhnycC NJ7ssvoJZiI8dKQatliWEDrbVbqFVVBdtDQIAROv4rcynKe7MD8cajhXaYKq7HJYzS44 Nf5g== X-Gm-Message-State: ALyK8tI1aHq91pjeT8bd7KdbJICMf8luEqZL/kVB9Fx5wzoPF6gVATeQZo30OWt2KEhCC98O2rC/LpF4G4HhWQ== X-Received: by 10.202.5.193 with SMTP id 184mr132303oif.143.1466723207414; Thu, 23 Jun 2016 16:06:47 -0700 (PDT) MIME-Version: 1.0 Received: by 10.157.52.238 with HTTP; Thu, 23 Jun 2016 16:06:46 -0700 (PDT) From: Noam Postavsky Date: Thu, 23 Jun 2016 19:06:46 -0400 X-Google-Sender-Auth: hgoTcbJMiphB0f0upak9HwXZTtw Message-ID: Subject: Re: bug#23689: Daemon-mode on Windows - "w32-initialized" is set too early To: GNU bug tracker automated control server Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.5 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) # http://debbugs.gnu.org/cgi/bugreport.cgi?bug=23689#8 tag 23689 + notabug quit From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 01 21:07:18 2019 Received: (at 23689-done) by debbugs.gnu.org; 2 Nov 2019 01:07:18 +0000 Received: from localhost ([127.0.0.1]:57695 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iQhsr-0004vn-NM for submit@debbugs.gnu.org; Fri, 01 Nov 2019 21:07:17 -0400 Received: from host.gofardesign.uk ([208.79.239.190]:47525) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iQhsq-0004vY-4N for 23689-done@debbugs.gnu.org; Fri, 01 Nov 2019 21:07:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=marxist.se; s=default; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Y/2eyY6efQuHlcjlLCpSNuRNdRAjPFMq6gf0/bTe3r8=; b=k54T7i0QqUTrtQp3xNfPtts+2L IjufsDQ2z4qHwdlNu7wmGZqGkCLvFCFUqoBjB5DVJhsaEJbv24X+DPy1JFkQ4VSWz2mAyBi0GTDbQ Ru/y82wA9u0WbTk1bUVtk4DkPlF1DhPCNd2eQ0kAX7j6nsEuSzRT4TEjFKJR00A0Q3Gs=; Received: from h-70-69.a785.priv.bahnhof.se ([155.4.70.69]:54450 helo=localhost) by host.gofardesign.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1iQhsj-0007d7-3o; Fri, 01 Nov 2019 20:07:09 -0500 From: Stefan Kangas To: Paul Moore Subject: Re: bug#23689: Daemon-mode on Windows - "w32-initialized" is set too early In-Reply-To: (Paul Moore's message of "Wed, 15 Jun 2016 17:58:43 +0100") References: <8337otw9m0.fsf@gnu.org> <83shwtusoj.fsf@gnu.org> <83porxuhfo.fsf@gnu.org> <83k2hrelwy.fsf@gnu.org> <83inxbeh1o.fsf@gnu.org> <83fusfdvuh.fsf@gnu.org> <8360taec1z.fsf@gnu.org> <83vb1acv3r.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Date: Sat, 02 Nov 2019 02:07:07 +0100 Message-ID: <8736f7t7b8.fsf@marxist.se> MIME-Version: 1.0 Content-Type: text/plain X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - host.gofardesign.uk X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - marxist.se X-Get-Message-Sender-Via: host.gofardesign.uk: authenticated_id: stefan@marxist.se X-Authenticated-Sender: host.gofardesign.uk: stefan@marxist.se X-Source: X-Source-Args: X-Source-Dir: X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 23689-done Cc: 23689-done@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Paul Moore writes: >>> I do appreciate all of the help you've given - and I completely >>> respect the fact that you don't want to get sucked into what's >>> essentially a spacemacs issue. But if you have any further suggestions >>> on how something like this *should* be handled, I'd appreciate them. >> >> Sorry, I don't know enough about spacemacs to tell anything else. > > No problem. And now that you pointed out the part of your previous > message that I missed, I have enough to go on. Having read the discussion, it seems to me like there is no bug here, so I'm closing this now. If that's incorrect, please reopen the bug report. Best regards, Stefan Kangas From unknown Fri Jun 20 07:26:54 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 30 Nov 2019 12:24:08 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator