From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?K=C3=A9vin?= Le Gouguec Newsgroups: gmane.emacs.bugs Subject: bug#67449: Manual: add how to change default global font size in .emacs Date: Thu, 30 Nov 2023 08:23:00 +0100 Message-ID: <87msuvhfhn.fsf@gmail.com> References: <63f64522726258ee8dbde487a579325c@jidanni.org> <83fs0tawqv.fsf@gnu.org> <83wmu4aajv.fsf@gnu.org> <83b92d9750b8259a21b54abf7391188c@jidanni.org> <83h6l7anau.fsf@gnu.org> <87jzq11cha.7.fsf@jidanni.org> <83plzs7mln.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17123"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 67449@debbugs.gnu.org, Dan Jacobson To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Nov 30 08:24:22 2023 Return-path: Envelope-to: geb-bug-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 1r8bPJ-0004GR-V7 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 30 Nov 2023 08:24:22 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r8bOt-0002SP-NX; Thu, 30 Nov 2023 02:23:55 -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 1r8bOs-0002SB-CQ for bug-gnu-emacs@gnu.org; Thu, 30 Nov 2023 02:23:54 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r8bOs-00033R-45 for bug-gnu-emacs@gnu.org; Thu, 30 Nov 2023 02:23:54 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r8bP0-0003aM-1v for bug-gnu-emacs@gnu.org; Thu, 30 Nov 2023 02:24:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?K=C3=A9vin?= Le Gouguec Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 30 Nov 2023 07:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67449 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: wontfix notabug Original-Received: via spool by 67449-submit@debbugs.gnu.org id=B67449.170132900913738 (code B ref 67449); Thu, 30 Nov 2023 07:24:02 +0000 Original-Received: (at 67449) by debbugs.gnu.org; 30 Nov 2023 07:23:29 +0000 Original-Received: from localhost ([127.0.0.1]:52113 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r8bOS-0003ZW-KP for submit@debbugs.gnu.org; Thu, 30 Nov 2023 02:23:29 -0500 Original-Received: from mail-lf1-x132.google.com ([2a00:1450:4864:20::132]:44054) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r8bOH-0003Z3-54 for 67449@debbugs.gnu.org; Thu, 30 Nov 2023 02:23:27 -0500 Original-Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-50bccc2e3efso538200e87.0 for <67449@debbugs.gnu.org>; Wed, 29 Nov 2023 23:23:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701328983; x=1701933783; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=EBL3hObhr5KmixQyGp9m2Lyi2Vm6sl7RZDr9pj12ufM=; b=D+Z2xkQXvonsfuv0Idkws8G8f94UC924aO43m8BijzikaCSUobP+ok0+A+cO1xMOoo euMqf9pA+yXquWdbjY8cKmWjqHbRvHiREqYn0xajp8R4idDXeNMhsGfQjDSJqoogTLyQ FMMxlrmwW0hR+rWkueurAGwVvA9A25r4ewfAa4PBNZq3n25cLm9os18jTpC6Cin0H7HW nzNxUqvBDCLxMA0G2wdGoK9rBZKzxJE1mylRIgIhN6CfCjF6ptXvYuTnQsFj0xA4GLHZ VkhteGOqSWKDqkcOLQ/7HjVVQNeN2E9X1foHnZtRsJ10WxM2o96x/W4Saf//pvVJWKFK X/cw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701328983; x=1701933783; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=EBL3hObhr5KmixQyGp9m2Lyi2Vm6sl7RZDr9pj12ufM=; b=Gbb9WzK8ZwEv8B39bBSISS22DOnwxpj5XxF3eIpvY6V6HRp3SLTHwPTR6M9gBuHr2t mXbW2lZEoFbCCyITIe/qPrz4XXBvk23AvcGxLMpxZc8q/bZ/eiqBG1jKt6WmBf3/WBVK SZWDBBD4wzIsfUn2bL1ZTKWxAfJNHGKaHudLI/8U0gLhCDpkCLYmy+X3O3+7UEVy0aco QXyvty1coFlZ/eXPVW/gqISr+jQyiTznxRfUNG/nsXtEIur+IPV9UopdKZmOOMyMtsNP 6jPpMZAlnggpDM9ef6hYOntr3itYCg2vZV+nIg35N/hzvMqe0pusyM218l1QTUbxxJmn FYog== X-Gm-Message-State: AOJu0Yw4BhOMNr9+6E9sm/rUihV0pZrFWqkYLIZhys8tsUuvoDvee8y7 /3fuAPL2VmcndNFAAHOda4py+t8RA+sBBQ2d X-Google-Smtp-Source: AGHT+IHx3UbVszFfnfRELf0fYJtMLMrWFi0bhve6XDzB2qsUn/lWD8kK7DUmjEdwIffldlN2VMEItA== X-Received: by 2002:ac2:42d0:0:b0:50b:bb96:d0e1 with SMTP id n16-20020ac242d0000000b0050bbb96d0e1mr5226460lfl.41.1701328982527; Wed, 29 Nov 2023 23:23:02 -0800 (PST) Original-Received: from amdahl30 ([2a01:e0a:253:fe0:2ef0:5dff:fed2:7b49]) by smtp.gmail.com with ESMTPSA id je18-20020a05600c1f9200b003feea62440bsm908125wmb.43.2023.11.29.23.23.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 23:23:01 -0800 (PST) In-Reply-To: <83plzs7mln.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 29 Nov 2023 14:47:16 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:275276 Archived-At: Eli Zaretskii writes: >> > and the font size can be changed interactively (*note >> > Text Scale::). >>=20 >> We don't want to change it interactively. We just want to put a line in >> our .emacs file to change it. >>=20 >> > There are several different ways to specify a different font: >>=20 >> We don't want to specify a different font. We don't care about the font. >> We just want to make it use a different size as default. > > So just specify the same font with the different size. Case closed. > >> > =E2=80=A2 Add a line to your init file, modifying the variable >> > =E2=80=98default-frame-alist=E2=80=99 to specify the =E2=80=98fon= t=E2=80=99 parameter (*note Frame >> > Parameters::), like this: >> >=20 >> > (add-to-list 'default-frame-alist >> > '(font . "DejaVu Sans Mono-10")) >>=20 >> Yes we want to add a line to our .emacs file. But we don't want to have >> to say some font name. We just want to tell emacs to use "default size >> 14, not 10". > > So just specify the same font with the different size. Case closed. > >> > This makes the font the default on all graphical frames created >> > after restarting Emacs with that init file. >> >=20 >> > =E2=80=A2 Add an =E2=80=98emacs.font=E2=80=99 X resource setting to= your X resource file, >> > like this: >> >=20 >> > emacs.font: DejaVu Sans Mono-12 >>=20 >> Again we are forced to name a font. We don't want to name a font. We >> just want to tell emacs to do what it does, but at scale 14 not 10. > > So just specify the same font with the different size. Case closed. > >> Anyway maybe there is a glimmer of hope with some line like >> -*-*-*-14-*-*-*- or something, but it so frustrating. > > A two-liner in the init file or a X resource setting cannot be > anywhere near frustrating. > >> Whereas in other apps one can just choose a default font size, in >> emacs ... well you have to go down to the car dealership and learn >> about muffler types. You can't just tell the rental agency to >> deliver an economy sized car. > > Or you can do the above, which is easy and a no-brainer, really. Case > closed. And this bug is also closed. Please accept the decision and > stop pushing. FWIW, I've been following this thread because I empathize with Dan in this report: depending on the system I use, emacs -Q gets me either Ubuntu Mono (GNOME/Ubuntu 22.04), Noto Sans Mono (Plasma/Debian 12) or Source Code Pro (Plasma/openSUSE Tumbleweed). In practice I customize Emacs to pick DejaVu Sans Mono in every setup, but that's a decision I take for incidental reasons (character coverage, bold/italic variants); so indeed I happen to > just specify the same font but I can imagine wanting to keep the system's default _family_, yet have a consistent font _size_ across all my setups, in which case having to spell out the font in my dotfiles is a bother. (Granted, the X resource solution cited above might work? Would it work --with-pgtk on Wayland?) (Granted=C2=B2, as soon as each "setup" differs in screen size, resolution, or density, "a consistent font _size_ across all my setups" probably requires bespoke face heights for each setup; still, that does not mean I'd want to mess with the _family_) FWIW=C2=B2, if I were to attempt to "just set the size, ignoring the font" = in my dotfiles, I'd probably go with either ;; (1) (set-face-attribute 'default nil :height my/height) or ;; (2) (let* ((family (face-attribute 'default :family)) (font-desc (format "%s-%s" family my/size))) (add-to-list 'default-frame-alist (cons 'font font-desc))) ? Not saying that's worth documenting, just hoping that'll help Dan sort out his config.