From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#74866: 29.4; fit-frame-to-window + no vertical scroll bar + ch Date: Tue, 17 Dec 2024 13:07:10 +0000 Message-ID: References: <87msgyzakk.fsf@toomas.mail-host-address-is-not-set> <86zfkytmyt.fsf@gnu.org> <20241214210901.14730@toomas> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27027"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , 74866@debbugs.gnu.org To: Toomas Rosin , martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Dec 17 14:09:24 2024 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 1tNXKF-0006si-97 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 17 Dec 2024 14:09:23 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tNXJv-0005ml-R1; Tue, 17 Dec 2024 08:09:04 -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 1tNXJu-0005md-LP for bug-gnu-emacs@gnu.org; Tue, 17 Dec 2024 08:09:02 -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 1tNXJu-0008KE-CD for bug-gnu-emacs@gnu.org; Tue, 17 Dec 2024 08:09:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=Date:MIME-Version:References:In-Reply-To:From:To:Subject; bh=JjGaG1TfiV4pf4ImV/79cfDo49xRplGB3dxg0dzS9u4=; b=XEIcMGAwzPqvwoYYdX1+8LCEJxeJo+PCMLqKu3c0SF7xy2THy68FjnP0Jno4/f1VwPxsxI2NVjmFMRCkRWzxfpVghCs6co3PB5RMVEtfN+ci/la3+6TfPYy9PBO5VZXWU8Gh3XEG4jHr074KF6Umb5m11NdmVstM3Cf4Pgqdkhd9Ns+u9wJZAPvdtvlJYwIZEhdIUiI14vvH+EME/kKwHj/4NYzh4vnOqref1oRrnYXei6jlQKQCZKNWj8LaGWhHqE2o8wD2Q4RjL64bsNHCLfZysICq8+p0F1XcuVKyQZSeaXl525ajvHhdSsVODX5b867F26BCfIb11hAJtEYErw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tNXJt-0006v5-Jo for bug-gnu-emacs@gnu.org; Tue, 17 Dec 2024 08:09:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 17 Dec 2024 13:09:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74866 X-GNU-PR-Package: emacs Original-Received: via spool by 74866-submit@debbugs.gnu.org id=B74866.173444089726528 (code B ref 74866); Tue, 17 Dec 2024 13:09:01 +0000 Original-Received: (at 74866) by debbugs.gnu.org; 17 Dec 2024 13:08:17 +0000 Original-Received: from localhost ([127.0.0.1]:57972 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNXJA-0006tn-PW for submit@debbugs.gnu.org; Tue, 17 Dec 2024 08:08:17 -0500 Original-Received: from mail-ed1-f52.google.com ([209.85.208.52]:49500) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNXJ6-0006tY-H0 for 74866@debbugs.gnu.org; Tue, 17 Dec 2024 08:08:13 -0500 Original-Received: by mail-ed1-f52.google.com with SMTP id 4fb4d7f45d1cf-5d3ea065b79so359889a12.3 for <74866@debbugs.gnu.org>; Tue, 17 Dec 2024 05:08:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734440832; x=1735045632; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=JjGaG1TfiV4pf4ImV/79cfDo49xRplGB3dxg0dzS9u4=; b=g3/ShCaiKMTp626s6DKwGxuREhKfdmxUl6OH7yQAskNOhpUwtXRtfBHEc5vgOrmNnc v/E76KC4Cl0CO+rtEU+OqyyMqa0GlrWK9vQiUhX1PbxIekrWQVeqaY60TSg5nQW+4bPD nrSf35IYQALBqj1+sCp5JGJ5q5Rz19JcYTJdGqBcpjONn2IgMFuLo5Nqw/hruSA+Tmwd iaX9lVELBmmSzFeTxlc1W6+BMTycff7EO9KpLw0GupYiiLiAEcSUCxeAcmV9FS8XIlfi 84WJJLYhCdbtEjobvnVQMWsvCmE4EBXyDChl8DylfTuOnFjZ4U3cv7PGDQGYJAMAE2aR WdlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734440832; x=1735045632; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=JjGaG1TfiV4pf4ImV/79cfDo49xRplGB3dxg0dzS9u4=; b=NJHndKS0ePuQf9j4fTHHBlVSvYPYFqs9muzDuy7ZGgoBIRKCheGvfpF4QakTO0DdNi U9LyUkTYFUI2Uxj3HDXGdzQIgJA1L9sy5bk7a85YztQakIFWqek01Sh0IB1XN+qVCq1L GGHU3oGoUPhq9GGGdv/QNdZEVnVcYHPQBy0mzXZmRh8aXyK2NiuuTKxyrPs77cM3N1PT XcyC8GBCB6pllhtqr3MSmvDzTt0wtl4YDxGG2UIG5BF1My5KOxYB1P4meyLEELlCW0Ny GBia0EejxDwiXcZvFSy7yburh6TbBTuiX2+BFZhGf5YuMofwUw+UeZkOlrlmrMwdJaZq f0yg== X-Forwarded-Encrypted: i=1; AJvYcCVRiN+KNFvn0I08s/+DLcNCCumMzKQiP9HRtNaE83Hq6kvZGDYlf3oXWrKTEMMWvrBYyIHR5g==@debbugs.gnu.org X-Gm-Message-State: AOJu0YybC2WYkotkhOvUq0z6l5/6yA8OW6npGG+35BusMHgtbOdvKMA9 CQIMDVSQen5E19uK+IgcccWRgkKY17VLYjrRhlVFiSHJjD0OiOkL2onRnxHLNkCyMwK2o6STayH ObCoa9ZAgXijx7CWfrIU63S71RcbrHh1hq7M= X-Gm-Gg: ASbGncuTPvh9++4yX7Q1ahAPLsiuLCZfnZ2Zq+J8cqBLkbSaVSL97e85G6xBwaW+LSJ aec3JeeIx/pHvsnODWA3tqC4B+cw4EgFOy6yrnw== X-Google-Smtp-Source: AGHT+IF9kQEyDR8Ld6g1q01SCgWREZ3ubHq+RtLouWH5Smows5kZwB/1QGLOHoyfHk02/5vLkapZ19I9rUGyFvYaaes= X-Received: by 2002:a05:6402:3551:b0:5cf:f42f:de82 with SMTP id 4fb4d7f45d1cf-5d63c2e51b6mr14117030a12.7.1734440831321; Tue, 17 Dec 2024 05:07:11 -0800 (PST) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Tue, 17 Dec 2024 13:07:10 +0000 In-Reply-To: <20241214210901.14730@toomas> 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:297279 Archived-At: Toomas Rosin writes: > Thank you, this got the damn thing working for me. As the lines about > vertical scroll bars and font size were from my init.el, I was loath to > clutter my function with them and hoped to get away with only adding the > `vertical-scroll-bars' item to the `frame-attributes' arg of > `make-frame'. And indeed, this worked. So the final form of my MWM > looks like this: > > ;;; init.el: > (setq-default vertical-scroll-bar nil) > (set-face-attribute 'default nil :height 75) > > ;;; main code: > (defun fit (lin col) > "Fit some text (LIN lines and COL columns) into a newly created frame." > (interactive) > (let ((buf (get-buffer-create "*foo*")) > (frm (make-frame > `((z-group . above) > (vertical-scroll-bars . ,vertical-scroll-bar))))) > (with-current-buffer buf > (erase-buffer) > (setq mode-line-format '("")) > (dotimes (_ lin) (insert (format "%s\n" (make-string col ?x)))) > (goto-char (point-min))) > (with-selected-frame frm > (switch-to-buffer buf) > (fit-frame-to-buffer)))) > > Cheers, T. So is there a bug here?