From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Arthur Tu Newsgroups: gmane.emacs.bugs Subject: bug#14056: 24.3; set-frame-height/width don't work when called first time on daemon mode Date: Tue, 26 Mar 2013 20:05:26 +0800 Message-ID: <51518F05.4010202@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1364299615 23572 80.91.229.3 (26 Mar 2013 12:06:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 26 Mar 2013 12:06:55 +0000 (UTC) To: 14056@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Mar 26 13:07:18 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UKSer-000101-Lv for geb-bug-gnu-emacs@m.gmane.org; Tue, 26 Mar 2013 13:07:17 +0100 Original-Received: from localhost ([::1]:45901 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKSeT-0008Ly-Ng for geb-bug-gnu-emacs@m.gmane.org; Tue, 26 Mar 2013 08:06:53 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:58834) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKSeN-0008Ko-8b for bug-gnu-emacs@gnu.org; Tue, 26 Mar 2013 08:06:50 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UKSeJ-0000C1-VF for bug-gnu-emacs@gnu.org; Tue, 26 Mar 2013 08:06:47 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:41676) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKSeJ-0000Bx-Qj for bug-gnu-emacs@gnu.org; Tue, 26 Mar 2013 08:06:43 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1UKSgY-0000Vp-B1 for bug-gnu-emacs@gnu.org; Tue, 26 Mar 2013 08:09:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Arthur Tu Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 26 Mar 2013 12:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 14056 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.13642996941903 (code B ref -1); Tue, 26 Mar 2013 12:09:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 26 Mar 2013 12:08:14 +0000 Original-Received: from localhost ([127.0.0.1]:45785 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UKSfh-0000UZ-VV for submit@debbugs.gnu.org; Tue, 26 Mar 2013 08:08:14 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:47192) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UKSfb-0000UL-MU for submit@debbugs.gnu.org; Tue, 26 Mar 2013 08:08:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UKSdH-0008Lk-4a for submit@debbugs.gnu.org; Tue, 26 Mar 2013 08:05:44 -0400 Original-Received: from lists.gnu.org ([208.118.235.17]:54519) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKSdH-0008LZ-2H for submit@debbugs.gnu.org; Tue, 26 Mar 2013 08:05:39 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:58482) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKSdD-0007dS-Lb for bug-gnu-emacs@gnu.org; Tue, 26 Mar 2013 08:05:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UKSdA-0008Jl-Fd for bug-gnu-emacs@gnu.org; Tue, 26 Mar 2013 08:05:35 -0400 Original-Received: from mail-pd0-f179.google.com ([209.85.192.179]:42104) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKSdA-0008JX-9U for bug-gnu-emacs@gnu.org; Tue, 26 Mar 2013 08:05:32 -0400 Original-Received: by mail-pd0-f179.google.com with SMTP id x11so93738pdj.24 for ; Tue, 26 Mar 2013 05:05:30 -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=RfK4IlWIKhGRAqYI2c7xWLOtNFBqXAVHpcTblMeXhnA=; b=QkwkoJbyvgwQH6VMRGh7p7Jjk3551piHQxjOjMpAGYD5Es0M+n99UPNcTxJgS98jE5 H1S3oGHBzaChO8a+K+Dw0iijnBreh/tfYE/ovwidOPGN+RhuOlivy1velWvxyIFcpo2z JF4UrZhqimH+k/a00avM2B1RylUl5BnK4Ilhy5ktjdw72akdWAlfEFeFhnoACLjg5cOg XJi22iku8FPWunxChF5mt/9e9MwB1xrLPe3dxAUMidEXASgXBrZEvjm7xrAlJcfThtFF 2PwBDs09HeRbk6oSAGDiPsym4CNPYw01C/GIlvYKxR4e7sbGlMbNpWPkL+5TY8YTxit+ lZPQ== X-Received: by 10.66.146.70 with SMTP id ta6mr23258341pab.108.1364299530687; Tue, 26 Mar 2013 05:05:30 -0700 (PDT) Original-Received: from [192.168.1.104] ([180.160.161.193]) by mx.google.com with ESMTPS id ve7sm18976821pab.11.2013.03.26.05.05.27 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 26 Mar 2013 05:05:29 -0700 (PDT) User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130215 Thunderbird/17.0.3 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:72908 Archived-At: Sorry I come up with this bug again. I found that i can't reply to my previous bug report. I have the following function added to after-frame-created-functions. (defun my:set-frame-size (&optional frame) (interactive) (unless frame (setq (selected-frame) frame)) (if (display-graphic-p) (progn (tool-bar-mode -1) (message "set frame size") ;; This should be an emacs bug. ;; i have to add a fake operation on frame here. ;; (set-frame-height frame 29) ;; 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 (set-frame-height frame (/ (- (x-display-pixel-height) 200) (frame-char-height))) ;; 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) (set-frame-width frame 120) (set-frame-width frame 80)) ))) (add-hook after-frame-created-functions my:set-frame-size) I have serveral experiments. 1. If i use the code shown before, after 'emacsclient -c -a ""', every emacsclient frame can set width corrently and its height stay unchanged. 2. If i move the part of set width code before set height code, height can be changed correctly while width can't. 3. If i add a fake (set-frame-height(or width) whatever), like that commented by me, I can set both height and width. 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: Lisp Interaction Minor modes in effect: shell-dirtrack-mode: t cygwin-terminal-clipboard-mode: t yas-global-mode: t yas-minor-mode: t global-auto-complete-mode: t auto-complete-mode: t global-semanticdb-minor-mode: t global-semantic-idle-scheduler-mode: t semantic-mode: t global-ede-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