From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dr Rainer Woitok Newsgroups: gmane.emacs.help Subject: Problems positioning and sizing Emacs frames Date: Mon, 19 Dec 2022 19:29:50 +0100 Message-ID: <25504.44446.960135.252447@tux.local> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36004"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Dec 19 19:30:32 2022 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 1p7KuF-0009Ei-De for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 19 Dec 2022 19:30:31 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p7Kti-0007H3-3c; Mon, 19 Dec 2022 13:29:58 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p7Ktg-0007Gp-Jk for help-gnu-emacs@gnu.org; Mon, 19 Dec 2022 13:29:56 -0500 Original-Received: from mail-ej1-x62f.google.com ([2a00:1450:4864:20::62f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p7Ktf-0000yx-17 for help-gnu-emacs@gnu.org; Mon, 19 Dec 2022 13:29:56 -0500 Original-Received: by mail-ej1-x62f.google.com with SMTP id gh17so23674598ejb.6 for ; Mon, 19 Dec 2022 10:29:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:to:date:message-id:content-transfer-encoding:mime-version :from:from:to:cc:subject:date:message-id:reply-to; bh=CL+IqDp+pf3/INY0YKYsXyKjS9zFzqSFzgvA0JZhcPc=; b=Bwza8hXiURbOmXIbnhdCIJ9r9xRn7biY4wlk6tbAKxEr/xcZ4hjmsrWib4K3maRFDL KmTejrjXfLYrx8LPx1CNUHLJVjxBaMoqowbYPp18OnVvsZlSaHHf0ThDovtAwCW/opGy jrozPlD01j9Yc6jevh8bAUalr4GOemSr12WQsg4a5KXR4aX65M1AzBtwwhnht6i7dam+ 6djDVxN6ay0EaFRT02WqN30X8xPRJxV+IpwdtbYMDbw44FY+lLNl3rUxpIh+Rx6tBAvr 5f/Y1DszrVT+Mst1qr1NqI3ZzJIqbvBasf89xr4sPIMIJvZkPr8+1HL84JcJx75DBy9v 8QXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=subject:to:date:message-id:content-transfer-encoding:mime-version :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=CL+IqDp+pf3/INY0YKYsXyKjS9zFzqSFzgvA0JZhcPc=; b=v3YezAzeZ+oZCWuxe66zqYny0Hr4NBq5snvABjPFUwRuLRM79fIMQxIeIr5HUD9KD6 cequHqw3ZAgsP7qHwmaFwhsSbFlnaue/LW+y8IK01qbUrqQt5HloVU4xsGyw7Zw3srP1 MF23fq2/lJfZdB5lzlA3l4PjzIc6cFU7d/eFLnOB9HBu5KPk7HexAK7E/R0DNoWgchLm 239yctyM2R+NyXUPWXRHbxWmoZR+MhqfX+LuPB33vWj+VBeP67PQg8wNTJUVLWA3Mbd7 wK1vGvQkpNIwykQ8pPqkX0550ETjTDlmglwr7qHDS0zJZwv2S5nv408F1dIYwI+Y6PZX Q9KA== X-Gm-Message-State: AFqh2kquJ8UmMFH4T9UX1khLltcIBYFgkL/2MkULIKKFMJbX4zsNjPMc sZY4eCs88DH6G7d1CxE4UbshJ/46fvICnQ== X-Google-Smtp-Source: AMrXdXtvQJzHToKb36g8Lmw1e9nUro0mSfU6HX4gi7S+7uJwHa9ZsXypH8BNbM9XA2na8pCDzA5HgQ== X-Received: by 2002:a17:906:9f08:b0:81d:3231:591e with SMTP id fy8-20020a1709069f0800b0081d3231591emr5389065ejc.49.1671474593145; Mon, 19 Dec 2022 10:29:53 -0800 (PST) Original-Received: from gmail.com (p200300df071dd62c43b7c1ea296e285d.dip0.t-ipconnect.de. [2003:df:71d:d62c:43b7:c1ea:296e:285d]) by smtp.gmail.com with ESMTPSA id 11-20020a170906300b00b007bee745759bsm4672336ejz.20.2022.12.19.10.29.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Dec 2022 10:29:52 -0800 (PST) X-Google-Original-From: Dr Rainer Woitok X-Mailer: VM 8.0.12-devo-585 under 21.5 (beta34) "kale" XEmacs Lucid (x86_64-pc-linux) Received-SPF: pass client-ip=2a00:1450:4864:20::62f; envelope-from=rainer.woitok@gmail.com; helo=mail-ej1-x62f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 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-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:141865 Archived-At: Greetings, I fail to position my Emacs frames where I want them. The first frame should be opened with its right edge flush with the right screen edge of the monitor, as in $ emacs --geometry 80x40-0+6 . & According to "C-h v initial-frame-alist" I should set this variable so it matches the Emacs specific entries in ".Xresources" plus the "--geo- metry" specification from the command line, while variable "default- frame-alist" should contain the relevant settings for frames opened la- ter via "C-x 5 C-f". Here is how I set variables "default-frame-alist" and "initial_frame- alist" in file "init.el": (let* ((g (split-string (getenv "_EMACS_SIZE_") "x")) (l (* 3 (string-to-number (getenv "_WINDOW_OFFSET_")))) (p (list (cons 'font-parameter (getenv "_EMACS_FONT_")) (cons 'top (string-to-number (getenv "_WINDOW_TOP_"))) (cons 'height (string-to-number (cadr g))) (cons 'width (string-to-number (car g))) '(horizontal-scroll-bars . nil) '(left-fringe . 0) '(right-fringe . nil) '(menu-bar-lines . 0) '(tab-bar-lines . 0) '(tool-bar-lines . 0) '(vertical-scroll-bars . right) )) ) (setq default-frame-alist (cons (cons 'left l) p) initial-frame-alist (cons (list 'left '- 0) p) ) ) These are the definitions of the environment variables used above: $ env | grep -E '^_(EMACS|WINDOW)_' _EMACS_FONT_=-bitstream-bitstream vera sans mono-medium-r-*--21-*-*-*-m-*-*-* _EMACS_SIZE_=80x40 _WINDOW_OFFSET_=50 _WINDOW_TOP_=6 $ And here are the relevant lines from file ".Xresources": $ grep ^Emacs .Xresources Emacs*font: -bitstream-bitstream vera sans mono-medium-r-*--21-*-*-*-m-*-*-* Emacs.geometry: 80x40 Emacs.menuBar: 0 Emacs.tabBar: 0 Emacs.toolBar: 0 $ But, sadly, it doesn't work as I expect :-( Problem 1: The edge of the physical screen cuts off part of the right scrollbar and the right window decoration of the initial frame opened by the "emacs" command above, a vertical stripe of approximately 14 pixels width, and the window manager reports the window geometry as "79x40" rather than "80x40". However, the frame's top edge is placed correctly 6 pixels be- low the physical screen's top edge. Problem 2: When I open another frame by entering "C-x 5 C-f", the new frame has the correct geometry of "80x40", but is positioned at "+484+0" rather than at "+150+6", and any further frame opened is placed 29 pixels to the right rather than at the very same position as the previous frame. What am I missing? Any help appreciated :-) Sincerely, Rainer