From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Pankaj Jangid Newsgroups: gmane.emacs.help Subject: Re: Programmatically maximize Emacs during startup? Date: Fri, 04 Dec 2020 18:56:25 +0530 Organization: Code Is Great Foundation Message-ID: References: <87sg8mqary.fsf@fastmail.fm> <83r1o5ergc.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34588"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (darwin) Cc: help-gnu-emacs@gnu.org To: Eli Zaretskii Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Dec 04 14:31:56 2020 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1klBBj-0008t2-IO for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 04 Dec 2020 14:31:55 +0100 Original-Received: from localhost ([::1]:34230 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1klBBi-0002rA-HY for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 04 Dec 2020 08:31:54 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39022) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1klB6X-0000k9-P2 for help-gnu-emacs@gnu.org; Fri, 04 Dec 2020 08:26:34 -0500 Original-Received: from mail-pl1-x62f.google.com ([2607:f8b0:4864:20::62f]:33829) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1klB6U-00011T-Gs for help-gnu-emacs@gnu.org; Fri, 04 Dec 2020 08:26:33 -0500 Original-Received: by mail-pl1-x62f.google.com with SMTP id l11so3097284plt.1 for ; Fri, 04 Dec 2020 05:26:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=codeisgreat-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:organization:references:mail-followup-to:date :in-reply-to:message-id:user-agent:mime-version; bh=moUT+hpHSMrI5z8pjqAYlGL4Ca1EYtwe66dGVFLfdLQ=; b=0c4A2JnZrnEI1krqF7wY6FRhQojisZBrQG3vLH06wVDAWrXM5/JUFibnv2J2yzzKpA tZ5ypvjDU1SLsWUycL6Da2/nxrF3whe0SDt9x4nqDVtdnKWJm+6bAZpa9vYXmjNYnVo7 SVxSKrgiEukqfvE4TI2t6EoghcfEsJWwZC9yzjMUe1Y1Ql29TFaElIL5Dlvx2RISxeID xiat1GqoEOUZPns65ztSuTXItzX1T2bHwp0Fr8X55ZlE18oDG+rhYgsQL3sOg+q4Uyg7 kzndR0i6Cgq+4H58KiemuUXM95r91R6jTwUxuM3YUvVlUuQjSgpuB6JvpKoHOgZYwuOY 9wCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:organization:references :mail-followup-to:date:in-reply-to:message-id:user-agent :mime-version; bh=moUT+hpHSMrI5z8pjqAYlGL4Ca1EYtwe66dGVFLfdLQ=; b=U6MTtVX/3SN9Qrn/wZop62CVf4//WbWN6wwUB9zZRmGkFKmXmDLofG6XJvLSu5iLOs 3GkwnZ2p7x20+7F8qTxR2/Z/Wf7ULaB3BjOArAJpBUFjDig6jpeatjO8A3nAdIVZ6QAX cb20d+APQ9YqvNlYxmzLY9kORBwaUnpQ8w8hE1kgha1s4UrjvP1tAyrr2vq/7wZd2Bss OctZBBiIIGYOr0RBqwRLc3e/gqnz3Dg2+bZcoD8Q1PEl6BCmXuluIemCR3+CYCKDoWOt 2cVpR5m4pYnkVlp8dyFuQ2aWaYnRjt+QZ3OThlhnWglqP7s8soGf7nnaFFsp6EDJJhPC iRuQ== X-Gm-Message-State: AOAM531nf57TvH8k2wSYmXV5RA7lnyYEkmY7mbODSBlfF5IhtqI1Gixw hiRRjnAZkl/sWsQkTpCRy6ukeJqMwUfCUQ== X-Google-Smtp-Source: ABdhPJwEwRL0Gf6vX1zFLlKNMwXqA8KZuoFvr9V4I49N5mMLlohuNCrhmSaVzOVZDo1I4pH+LeBNng== X-Received: by 2002:a17:90a:d3cf:: with SMTP id d15mr3988088pjw.132.1607088389111; Fri, 04 Dec 2020 05:26:29 -0800 (PST) Original-Received: from mb2.local ([2405:201:5c06:70bc:34af:2222:ac1b:ebe8]) by smtp.gmail.com with ESMTPSA id 82sm5195738pfv.117.2020.12.04.05.26.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Dec 2020 05:26:28 -0800 (PST) Mail-Followup-To: Eli Zaretskii , help-gnu-emacs@gnu.org In-Reply-To: <83r1o5ergc.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 04 Dec 2020 13:33:23 +0200") Received-SPF: none client-ip=2607:f8b0:4864:20::62f; envelope-from=pankaj@codeisgreat.com; helo=mail-pl1-x62f.google.com X-Spam_score_int: -15 X-Spam_score: -1.6 X-Spam_bar: - X-Spam_report: (-1.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.248, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:125973 Archived-At: Eli Zaretskii writes: >> I have the following line in my `~/.emacs.d/early-init.el`: >> >> (add-to-list 'default-frame-alist '(fullscreen . maximized)) >> >> It works in `~/.emacs.d/init.el` as well, but then the frame is first drawn and >> subsequently maximised. > > Did you try to do this in window-setup-hook or emacs-startup-hook? I also tried it in window-setup-hook and emacs-startup-hook. But first it is drawn with built-in default values and then default-frame-alist parameters comes into effect. So I moved my following setting to early-init.el. It works fine there. #+begin_src emacs-lisp (setq default-frame-alist '((vertical-scroll-bars . nil) (horizontal-scroll-bars . nil) (height . 55) (width . 174) (left . 613) (top . 391) (tool-bar-lines . 0))) #+end_src