From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Aaron Jensen Newsgroups: gmane.emacs.bugs Subject: bug#63988: 30.0.50; Recent header line format changes cause spin/seg fault with format-mode-line Date: Sat, 10 Jun 2023 07:08:20 -0400 Message-ID: References: <831qij24qm.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="34090"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 63988@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jun 10 13:09:27 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 1q7wTH-0008jB-58 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 10 Jun 2023 13:09:27 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q7wSt-0004gz-NV; Sat, 10 Jun 2023 07:09:03 -0400 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 1q7wSs-0004gp-6z for bug-gnu-emacs@gnu.org; Sat, 10 Jun 2023 07:09:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q7wSr-0005X7-V1 for bug-gnu-emacs@gnu.org; Sat, 10 Jun 2023 07:09:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q7wSr-0006Aj-Pi for bug-gnu-emacs@gnu.org; Sat, 10 Jun 2023 07:09:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Aaron Jensen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 10 Jun 2023 11:09:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63988 X-GNU-PR-Package: emacs Original-Received: via spool by 63988-submit@debbugs.gnu.org id=B63988.168639532723701 (code B ref 63988); Sat, 10 Jun 2023 11:09:01 +0000 Original-Received: (at 63988) by debbugs.gnu.org; 10 Jun 2023 11:08:47 +0000 Original-Received: from localhost ([127.0.0.1]:33357 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q7wSZ-0006A9-8s for submit@debbugs.gnu.org; Sat, 10 Jun 2023 07:08:47 -0400 Original-Received: from mail-pj1-f45.google.com ([209.85.216.45]:47538) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q7wSU-00069o-2C for 63988@debbugs.gnu.org; Sat, 10 Jun 2023 07:08:41 -0400 Original-Received: by mail-pj1-f45.google.com with SMTP id 98e67ed59e1d1-2553663f71eso1125596a91.3 for <63988@debbugs.gnu.org>; Sat, 10 Jun 2023 04:08:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686395312; x=1688987312; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=E9LFTOHh+yGlNoUmq+wJcyIFCH11bHVWkD65ZuLB1q4=; b=r9ma3H3yOUdpC+VSFAECqHoS4hv6jHqvs66afgg2eVcf8XqCTp3ad6XTv1mk9xdHwJ +Wmne3ll7ksdVVL2FP0oSNTaf9R5Lqqolaeii0wTs0r2CcDZHQN0IimHatsmq7TlW3sr n1bZwKh7d7DT7KmnDiRsLNdApQBcoyuZZvA6P2E8wkAj+DorQTMhaSOGxag4kSVkh4uw YfNgi+7vl02Fyogu8qHUOFTPVJuaW8mudzofdh63ToLQhzvzaeFQE8ZcRwZ+l2QbL+0W Icn8Z04RvCarcI8e3c23qOGtXTKd1TLi24VGI5pa1W0HsOfm9jPZ0jk6iMBTvzxe7exi si5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686395312; x=1688987312; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=E9LFTOHh+yGlNoUmq+wJcyIFCH11bHVWkD65ZuLB1q4=; b=erNLMrKHSofUe4fz0DfMeU4RJ19bEWO49bK7OtU0AMk9mprH/JBGwYP5KxLy14+VeM TYfruWROHgvRxT574ocxi7xSjXeOrvJiv0HSWTesStCJfhVrlviRdyupcprDEDKeGl4d 02ubG54m2j6SVuIIU77SEK42fSRFKu2U+R+jBE7/e2ahp+dNbbNdpkD3LkHfQN1oXi48 JS6D+eg6wVq9sRQ2HlMTyz2ytaaVWoXwH0kRa4tGKxldVB8eYmt8pXxPWLPLVQQIlqqP jfbAVlyioPlOOBxIfK1bdSu2eJ20EkUoIHHHIRthiRQ7u0VM4UPaauKRMltZx5WNkkc7 ffRQ== X-Gm-Message-State: AC+VfDy2fRyB+8rSWT9m1UbX22GNzQxxmiO1cruoQAhaNWHazsx1cn/A oLEnPQEh6P7gvl0dlHXtq3Zxmyv1XYFj7uDqLUg= X-Google-Smtp-Source: ACHHUZ7jetgFTZNSsjnwZFsMBq4UAXLapwstBLSlk5Dr9M3jtg9KpML56RQu7exzho6qhgOEkxpTgtfN2ETbxOWoZ5g= X-Received: by 2002:a17:90a:d715:b0:253:3f25:3d99 with SMTP id y21-20020a17090ad71500b002533f253d99mr3398567pju.45.1686395311893; Sat, 10 Jun 2023 04:08:31 -0700 (PDT) In-Reply-To: <831qij24qm.fsf@gnu.org> 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:263211 Archived-At: On Sat, Jun 10, 2023 at 2:47=E2=80=AFAM Eli Zaretskii wrote: > > > From: Aaron Jensen > > Date: Fri, 09 Jun 2023 21:09:45 -0400 > > > > > > (setq header-line-format '(:eval (format-mode-line ""))) > > > > This causes Emacs to spin as of commit: > > 4f66cbbfe520ee31ef26676e09a926217d9736fe > > > > After some time, it will segfault. > > It causes infinite recursion, since format-mode-line also calls > window_wants_header_line (indirectly). > > But what is the purpose of such a strange (to use a civilized word) > setting of header-line-format? Why do you need :eval at all in this > case? > > IOW, why not say "don't do that" and be done? It's a minimal repro for an issue I encountered with a package that does th= is: https://github.com/rougier/nano-modeline/blob/master/nano-modeline.el#L532 It's how this modeline/header line adds line number/cursor position to a more complicated line. As I understand it, it has to format it first in order to use its width to properly right align it: https://github.com/rougier/nano-modeline/blob/master/nano-modeline.el#L278 Is there a better way to do this? > So maybe we should declare this feature a failed experiment and remove > it? I'll admit I don't really understand the change. Is it actually evaluating the cdr of the eval form up to two additional times to in order to determine whether or not to display the headerline at all? Wouldn't this have performance implications? Aaron