From unknown Fri Jun 20 07:27:34 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#13956 <13956@debbugs.gnu.org> To: bug#13956 <13956@debbugs.gnu.org> Subject: Status: 24.3; An initial frame already exists before reading .emacs on daemon mode Reply-To: bug#13956 <13956@debbugs.gnu.org> Date: Fri, 20 Jun 2025 14:27:34 +0000 retitle 13956 24.3; An initial frame already exists before reading .emacs o= n daemon mode reassign 13956 emacs submitter 13956 Arthur Tu severity 13956 normal tag 13956 notabug wontfix thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 14 11:50:37 2013 Received: (at submit) by debbugs.gnu.org; 14 Mar 2013 15:50:37 +0000 Received: from localhost ([127.0.0.1]:54271 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UGAQN-0004Vz-0j for submit@debbugs.gnu.org; Thu, 14 Mar 2013 11:50:35 -0400 Received: from eggs.gnu.org ([208.118.235.92]:32854) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UG4TX-0002cd-Cd for submit@debbugs.gnu.org; Thu, 14 Mar 2013 05:29:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UG4SB-0003U1-HY for submit@debbugs.gnu.org; Thu, 14 Mar 2013 05:28:11 -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.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:55844) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UG4SB-0003Tx-EF for submit@debbugs.gnu.org; Thu, 14 Mar 2013 05:28:03 -0400 Received: from eggs.gnu.org ([208.118.235.92]:44183) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UG4S7-0003zw-QJ for bug-gnu-emacs@gnu.org; Thu, 14 Mar 2013 05:28:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UG4S0-0003RV-KP for bug-gnu-emacs@gnu.org; Thu, 14 Mar 2013 05:27:59 -0400 Received: from mail-pd0-f175.google.com ([209.85.192.175]:47136) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UG4S0-0003RP-BJ for bug-gnu-emacs@gnu.org; Thu, 14 Mar 2013 05:27:52 -0400 Received: by mail-pd0-f175.google.com with SMTP id r11so36983pdi.20 for ; Thu, 14 Mar 2013 02:27:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:disposition-notification-to:date:from :user-agent:mime-version:to:subject:content-type :content-transfer-encoding; bh=MDsrzrGxwJBz4Np2xn6utitoYciT8f+JuA4paAU0Eoc=; b=vVzFo871CtmgQMWJhFtnvKECLJH7DQh0fNkrjBlHVTVf+HsJyNcqLm0lwW7V+bD43B 5yS/X5aFfSCKDzj9foSRpnDF3XQXHNEDOqgluwpn9VMopbjb7WjmH19vcWq4rAZZngEB DG15XierqCFC7bKKP3xUT/wluu5plkmV8g4/Xszag+zg3mokM22HRfzomRbWFDPDgR2i 61XgmZzd/vBzcwZRndQV01BmevUc8shw8/IYIBl+eTdTVn0UAqU+QCvbmU9rX5oefW9F VbrE4gmeQ/IQUZyxWkZ59EXILUyNlhhLcvtQxydu2GASB4LcKaQNaQRbZuiH5Z20hroM l9XQ== X-Received: by 10.68.143.167 with SMTP id sf7mr4087436pbb.21.1363253270847; Thu, 14 Mar 2013 02:27:50 -0700 (PDT) Received: from [192.168.1.104] ([180.160.159.99]) by mx.google.com with ESMTPS id qb10sm2386510pbb.43.2013.03.14.02.27.48 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 14 Mar 2013 02:27:50 -0700 (PDT) Message-ID: <51419812.9080009@gmail.com> Date: Thu, 14 Mar 2013 17:27:46 +0800 From: Arthur Tu User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130215 Thunderbird/17.0.3 MIME-Version: 1.0 To: bug-gnu-emacs@gnu.org Subject: 24.3; An initial frame already exists before reading .emacs on daemon mode Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -6.1 (------) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Thu, 14 Mar 2013 11:50:33 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.1 (------) I want to call emacsclient to edit my file after start emacs server once manually. I have following code in my .emacs: (defun set-frame () (interactive) ;;(setq initial-frame-alist '((width . 80) (height . 20) (menu-bar-lines . 1))) (progn ;; use 120 char wide window for largeish displays ;; and smaller 80 column windows for smaller displays ;; pick whatever numbers make sense for you (if (> (x-display-pixel-width) 1280) (add-to-list 'default-frame-alist (cons 'width 120)) (add-to-list 'default-frame-alist (cons 'width 120))) ;; for the height, subtract a couple hundred pixels ;; from the screen height (for panels, menubars and ;; whatnot), then divide by the height of a char to ;; get the height we want (add-to-list 'default-frame-alist (cons 'height (/ (- (x-display-pixel-height) 250) (frame-char-height)))) )) (add-hook 'after-init-hook ;; ask user whether to restore desktop at start-up (lambda () (if initial-window-system (set-frame) (add-hook 'server-visit-hook 'set-frame)))) However, the first emacsclient frame can't be set to the size i want. I don't know if this bug is in cygwin branch only or global. Help please. In GNU Emacs 24.3.1 (i686-pc-cygwin) of 2013-03-11 on fiona Windowing system distributor `Microsoft Corp.', version 6.1.7601 Configured using: `configure '--srcdir=/home/kbrown/src/cygemacs/emacs-24.3-1/src/emacs-24.3' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--libexecdir=/usr/lib' '--datadir=/usr/share' '--localstatedir=/var' '--sysconfdir=/etc' '--datarootdir=/usr/share' '--docdir=/usr/share/doc/emacs' '-C' '--with-w32' 'CC=gcc' 'CFLAGS=-ggdb -O2 -pipe -fdebug-prefix-map=/home/kbrown/src/cygemacs/emacs-24.3-1/build=/usr/src/debug/emacs-24.3-1 -fdebug-prefix-map=/home/kbrown/src/cygemacs/emacs-24.3-1/src/emacs-24.3=/usr/src/debug/emacs-24.3-1' 'LDFLAGS=-L/usr/lib/ncursesw' 'LIBS=' 'CPPFLAGS=-I/usr/include/ncursesw'' Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: Emacs-Lisp Minor modes in effect: yas-global-mode: t yas-minor-mode: t google-this-mode: t global-auto-complete-mode: t auto-complete-mode: t cygwin-terminal-clipboard-mode: t show-paren-mode: t global-linum-mode: t linum-mode: t tooltip-mode: t mouse-wheel-mode: t menu-bar-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 Recent input: C-x C-f h o ~ ~ h o . e C-v C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-n C-n C-n C-n C-n C-n C-n C-n C-n C-p C-p C-n C-l C-l C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n M-x r e p o r C-g M-x t o o l = b a - b a r M-x r e p o r Recent messages: [yas] Loading for `c-mode', just-in-time: (yas--load-directory-1 /home/Arthur/.emacs.d/elpa/yasnippet-20130218.2229/snippets/c-mode (quote c-mode) (quote (cc-mode)))! [yas] Loading compiled snippets from /home/Arthur/.emacs.d/elpa/yasnippet-20130218.2229/snippets/c-mode [yas] Loading for `cc-mode', just-in-time: (yas--load-directory-1 /home/Arthur/.emacs.d/elpa/yasnippet-20130218.2229/snippets/cc-mode (quote cc-mode) (quote (text-mode)))! [yas] Loading compiled snippets from /home/Arthur/.emacs.d/elpa/yasnippet-20130218.2229/snippets/cc-mode When done with a buffer, type C-x # When done with this frame, type C-x 5 0 [3 times] byte-code: Beginning of buffer [7 times] Quit Making completion list... Tool-Bar mode disabled Load-path shadows: None found. Features: (shadow sort gnus-util mail-extr cus-start cus-load emacsbug message format-spec rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils flymake-cursor byte-opt warnings bytecomp byte-compile cconv flymake compile comint ansi-color ring cc-langs cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs server yasnippet help-mode easymenu google-this auto-complete-config auto-complete cl-macs gv popup cl auto-complete-autoloads flymake-css-autoloads flymake-cursor-autoloads flymake-php-autoloads flymake-python-pyflakes-autoloads flymake-shell-autoloads flymake-easy-autoloads google-this-autoloads google-translate-autoloads guess-offset-autoloads haskell-mode-autoloads mmm-mode-autoloads php-mode-autoloads popup-autoloads w32-browser-autoloads yasnippet-autoloads package cygwin-terminal-clipboard easy-mmode flex-mode derived tsdh-dark-theme edmacro kmacro avoid time-date paren uniquify linum ido advice help-fns cl-lib advice-preload tooltip ediff-hook vc-hooks lisp-float-type mwheel w32-common-fns disp-table w32-win w32-vars tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind w32 multi-tty emacs) From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 14 20:00:42 2017 Received: (at 13956) by debbugs.gnu.org; 15 Jun 2017 00:00:42 +0000 Received: from localhost ([127.0.0.1]:48136 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dLIDJ-0001Rv-Tx for submit@debbugs.gnu.org; Wed, 14 Jun 2017 20:00:42 -0400 Received: from mail-io0-f174.google.com ([209.85.223.174]:35121) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dLIDI-0001Lo-Mi; Wed, 14 Jun 2017 20:00:41 -0400 Received: by mail-io0-f174.google.com with SMTP id k93so1953033ioi.2; Wed, 14 Jun 2017 17:00:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=p6UxVkxLOoyvmbggHPs+uDVG3soPId8TcijyhGs50+E=; b=LLbxnKHbupJ65nTY2oIxL30K3LlNrK3K7OGYUlhACbY+ZYc4ljj+UgBawR660kG6gB 1zv9qx5OuAMhiMcuUZ7nRWW7G1uPGuZxJNNl1zhTe4TFEpTZjP9t6BDnaYSQfN8q1ZOS RzAuioZUxYr+A4/0GxuHnpOiGC+v3H1z+1DS9LT1xbn+cuCnq95nZenxgbPLo5nvsxH3 qy8Dix7/t2Xs9RBcpN03vPQFly69WC9PHPtnfIc+dd6mW3mVs+3ZXPWUHPB1JGQZb7X3 LBy5CLwdkIXURQIRo43WpujmnbBF84/hKja9JVCnHXZZcYjpgHiWN2EsQ2tLx0lxaI91 ATWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=p6UxVkxLOoyvmbggHPs+uDVG3soPId8TcijyhGs50+E=; b=f6LDDdYL8ICmqeZomydw40kp7Mo7OPImvdv1HmMLAukAh0SJm7sW2PATh2WvsnOt8E 3QQFDu7r6bx7xZNsRlmWghpRTYTtHsIk8mpwMixaVBLkf5iIsiao32v0ev416V9YDzrT 4I0Dl5BsE+KLzt9qh2tjYVuJ4c5t6Ycvzdvs8x/WVGms2EMBZEaoyEJVczeWi1A/d/W5 Dm7+NDMUJTqGLlD4HA4751bV91TxPXoapUWOgFMHxcRBw33Dnt1wByUxfr89ZnOZFkHB q4TtSJ/NJfV57FeW18EUEYwNeR9gVD2nNLU95MmbGVZzBB8XMPw6IGCin6BpHxZvOUDz DkBg== X-Gm-Message-State: AKS2vOw5S5bLRMUNdCoThnN00gik8XRLxITivBsGjCYed714G17aEDGS lk/6I6tfFPnBc7ln X-Received: by 10.107.139.5 with SMTP id n5mr3018479iod.166.1497484834625; Wed, 14 Jun 2017 17:00:34 -0700 (PDT) Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id a138sm722275ioa.15.2017.06.14.17.00.33 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 14 Jun 2017 17:00:33 -0700 (PDT) From: npostavs@users.sourceforge.net To: Arthur Tu Subject: Re: bug#13956: 24.3; An initial frame already exists before reading .emacs on daemon mode References: <51419812.9080009@gmail.com> Date: Wed, 14 Jun 2017 20:02:11 -0400 In-Reply-To: <51419812.9080009@gmail.com> (Arthur Tu's message of "Thu, 14 Mar 2013 17:27:46 +0800") Message-ID: <87zidarud8.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.0 (-) X-Debbugs-Envelope-To: 13956 Cc: 13956@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: -1.0 (-) tags 13956 notabug wontfix close 13956 quit Arthur Tu writes: > I want to call emacsclient to edit my file after start emacs > server once manually. > > I have following code in my .emacs: > > (defun set-frame () > (interactive) > ;;(setq initial-frame-alist '((width . 80) (height . 20) > (menu-bar-lines . 1))) > (progn > ;; use 120 char wide window for largeish displays > ;; and smaller 80 column windows for smaller displays > ;; pick whatever numbers make sense for you > (if (> (x-display-pixel-width) 1280) > (add-to-list 'default-frame-alist (cons 'width 120)) > (add-to-list 'default-frame-alist (cons 'width 120))) > ;; for the height, subtract a couple hundred pixels > ;; from the screen height (for panels, menubars and > ;; whatnot), then divide by the height of a char to > ;; get the height we want > (add-to-list 'default-frame-alist > (cons 'height (/ (- (x-display-pixel-height) 250) > (frame-char-height)))) > )) > > (add-hook 'after-init-hook > ;; ask user whether to restore desktop at start-up > (lambda () > (if initial-window-system > (set-frame) > (add-hook 'server-visit-hook 'set-frame)))) > > However, the first emacsclient frame can't be set to the size i want. > > I don't know if this bug is in cygwin branch only or global. > > Help please. In daemon mode, the initial frame stays hidden, so there's no meaningful size. You should do something like (if (and (not (daemonp)) initial-window-system) ...) From unknown Fri Jun 20 07:27:34 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 13 Jul 2017 11:24:05 +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