From unknown Mon Jun 23 16:48:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#64344: [PATCH] Make calculator work with customized mode-line Resent-From: john muhl Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 29 Jun 2023 06:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 64344 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 64344@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.168802100922667 (code B ref -1); Thu, 29 Jun 2023 06:44:02 +0000 Received: (at submit) by debbugs.gnu.org; 29 Jun 2023 06:43:29 +0000 Received: from localhost ([127.0.0.1]:52133 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qElNI-0005tV-4x for submit@debbugs.gnu.org; Thu, 29 Jun 2023 02:43:29 -0400 Received: from lists.gnu.org ([209.51.188.17]:34326) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qEZsj-0001H8-PA for submit@debbugs.gnu.org; Wed, 28 Jun 2023 14:27:10 -0400 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 1qEZsj-0004O4-Di for bug-gnu-emacs@gnu.org; Wed, 28 Jun 2023 14:27:09 -0400 Received: from out-3.mta0.migadu.com ([2001:41d0:1004:224b::3]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qEZsd-0004SD-Iw for bug-gnu-emacs@gnu.org; Wed, 28 Jun 2023 14:27:09 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pub.pink; s=key1; t=1687976818; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=zbQCw136XscZgkrwcT4eSWd0TUF0LAxH3cd5IPmglWg=; b=paZdWwMBVOWCTlzHSbBZ1+njruAkMKO4tsjKGktmRt+NzqUZ2zL2+1JyTZX46pqICgTWQu oZBbiEptgtUM5J0tQt9PgrbMj79oqW7cv8UF+NzDhsrswgUy2WxwjcylETKclkIvtAIx21 IUqLSD8f+IIuDvdcxhmnD97D0tK53aw= From: john muhl Date: Wed, 28 Jun 2023 13:23:45 -0500 Message-ID: <87jzvn4f4e.fsf@pub.pink> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=2001:41d0:1004:224b::3; envelope-from=jm@pub.pink; helo=out-3.mta0.migadu.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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Mailman-Approved-At: Thu, 29 Jun 2023 02:43:27 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable calculator.el doesn=E2=80=99t work after customizing the mode-line. It assu= mes the line-width is always an integer but after using customize it is a dotted list. - emacs -Q - M-x customize-apropos-faces RET mode-line RET - Ensure =E2=80=98mode-line-face=E2=80=99 has a box property with vertica= l and horizontal widths. The default config includes these already. - Set for current session - M-x calculator RET =3D> calculator: Wrong type argument: number-or-marker-p, (1 . -1) In GNU Emacs 30.0.50 (build 6, x86_64-pc-linux-gnu, GTK+ Version 3.24.38, cairo version 1.17.8) of 2023-06-28 built on localhost Repository revision: c5d6102313076b83526dc79bfb563621671fb70b Repository branch: master System Description: Fedora Linux 38 (Workstation Edition) Configured using: 'configure --with-native-compilation --with-pgtk' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PGTK PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XIM GTK3 ZLIB --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-lisp-calculator-el--calculator-need-3-lines---Ch.patch Content-Description: [PATCH] * lisp/calculator.el (calculator-need-3-lines): Check type >From 54cd9fe40d954231a6be822d9ea448902e12c60c Mon Sep 17 00:00:00 2001 From: john muhl Date: Wed, 28 Jun 2023 12:58:27 -0500 Subject: [PATCH] * lisp/calculator.el (calculator-need-3-lines): Check type Copyright-paperwork-exempt: yes --- lisp/calculator.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/calculator.el b/lisp/calculator.el index bf2ac9b6215..6af6464d2f4 100644 --- a/lisp/calculator.el +++ b/lisp/calculator.el @@ -746,7 +746,7 @@ calculator-need-3-lines ;; use 3 lines (let* ((bx (face-attribute 'mode-line :box)) (lh (plist-get bx :line-width))) - (and bx (or (not lh) (> lh 0)))) + (and bx (or (not lh) (> (if (listp lh) (cdr lh) lh) 0)))) ;; if the mode line has an overline, use 3 lines (not (memq (face-attribute 'mode-line :overline) '(nil unspecified))))))) -- 2.41.0 --=-=-= Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" --==-=-= Content-Type: text/plain --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQFABAEBCAAqFiEEK5CvUQq7L5O2pQef9D+KfcKUo10FAmSce3EMHGptQHB1Yi5w aW5rAAoJEPQ/in3ClKNddZMH/2qx4qsNm2f5uT0RSZ1X3RthjRqmEr23byiNSPGg +IFY5RlXsdSdJoFLsbz6a6Kdw2TwqNXF2sHByG1MzWxHz7gO1KpAS4G07lPJ7I9m vjxuRKBg+XNRs1tCCNAysQOksEe6rE+tx4XhwhadZHHElq1E2TMEqyzerghL44XK /WzQoSWb06Q+VDD5OjdkZjAh7S+gx+K8pRzHLv2fPNmklPNO6zkdm1RrboH3pqaH /s89oV2P5RbQ0fSYiSyGKLfy805q9UbMusQCdM/VKlizpyAJ7vooXIo0lAkzFJt9 reUVeL4mqQVl0vtYFDmjUoAtCpxQBH5spj4kohJujshKpWo= =4y/V -----END PGP SIGNATURE----- --==-=-=-- --=-=-=-- From unknown Mon Jun 23 16:48:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#64344: [PATCH] Make calculator work with customized mode-line Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 29 Jun 2023 07:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64344 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: john muhl Cc: 64344@debbugs.gnu.org Received: via spool by 64344-submit@debbugs.gnu.org id=B64344.168802496729412 (code B ref 64344); Thu, 29 Jun 2023 07:50:01 +0000 Received: (at 64344) by debbugs.gnu.org; 29 Jun 2023 07:49:27 +0000 Received: from localhost ([127.0.0.1]:52194 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qEmP9-0007eJ-Fr for submit@debbugs.gnu.org; Thu, 29 Jun 2023 03:49:27 -0400 Received: from eggs.gnu.org ([209.51.188.92]:50300) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qEmP8-0007e5-2p for 64344@debbugs.gnu.org; Thu, 29 Jun 2023 03:49:26 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qEmP0-0000AK-KY; Thu, 29 Jun 2023 03:49:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=XsHvuPLaBC6xLImEFVKn0oKydkuIitMwxoCgvJQh0Bo=; b=j8LMsOszZ2pZRjdRgSed OZNgrD+SsJHrpBxGmsGjfCBvXdQoIIu/BbzBE6vC6WXcKAFfedrgdad6hydj8+GRNRgEKa0QQPZnq oNL238xD+wbFe+7XYHDizJ9nEFlhlULRr4Gb/4ihwEot9qKfBCcIvupPTQ0OWUB9V46C4UIPoXYnN qeI8FJXoAeOoXnKT2v3e3kE+7p5UYajRVVry4Na86xC+sE+kTr8KE+WDNAd4utZwTZIeYMUBo6BUu HMhkvyMC/TaCXTQC2MSjZOL3ukVTs1IwirqVzCYYIwVdK47vPlU4AIhwq0ClA5jWw10FF5+lvD+kA SaXYeNlJgG2paw==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qEmOz-0005Lq-Gj; Thu, 29 Jun 2023 03:49:18 -0400 Date: Thu, 29 Jun 2023 10:49:38 +0300 Message-Id: <83jzvmu2r1.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <87jzvn4f4e.fsf@pub.pink> (bug-gnu-emacs@gnu.org) References: <87jzvn4f4e.fsf@pub.pink> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Wed, 28 Jun 2023 13:23:45 -0500 > From: john muhl via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > calculator.el doesn’t work after customizing the mode-line. It assumes > the line-width is always an integer but after using customize it is a > dotted list. > > - emacs -Q > - M-x customize-apropos-faces RET mode-line RET > - Ensure ‘mode-line-face’ has a box property with vertical and > horizontal widths. The default config includes these already. > - Set for current session > - M-x calculator RET > => calculator: Wrong type argument: number-or-marker-p, (1 . -1) Thanks. > diff --git a/lisp/calculator.el b/lisp/calculator.el > index bf2ac9b6215..6af6464d2f4 100644 > --- a/lisp/calculator.el > +++ b/lisp/calculator.el > @@ -746,7 +746,7 @@ calculator-need-3-lines > ;; use 3 lines > (let* ((bx (face-attribute 'mode-line :box)) > (lh (plist-get bx :line-width))) > - (and bx (or (not lh) (> lh 0)))) > + (and bx (or (not lh) (> (if (listp lh) (cdr lh) lh) 0)))) ^^^^^ Shouldn't that be 'consp' instead? 'listp' returns non-nil for nil argument. From unknown Mon Jun 23 16:48:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#64344: [PATCH] Make calculator work with customized mode-line Resent-From: Andreas Schwab Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 29 Jun 2023 08:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64344 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: john muhl , 64344@debbugs.gnu.org Received: via spool by 64344-submit@debbugs.gnu.org id=B64344.168802693532556 (code B ref 64344); Thu, 29 Jun 2023 08:23:02 +0000 Received: (at 64344) by debbugs.gnu.org; 29 Jun 2023 08:22:15 +0000 Received: from localhost ([127.0.0.1]:52222 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qEmus-0008T1-8N for submit@debbugs.gnu.org; Thu, 29 Jun 2023 04:22:15 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:47750) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qEmun-0008So-Hs for 64344@debbugs.gnu.org; Thu, 29 Jun 2023 04:22:12 -0400 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 9A2E321878; Thu, 29 Jun 2023 08:22:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1688026923; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=06v9S8UhT3Ka0nd3Jlbp0f2nz5c7yebBWIk6cuNJo+0=; b=orMC9+PD9T7PCLkJbcdez/s5jtXE75pesKPudJKx6E9BrhPpSutTN8VR2Rwlj/w7HRIoKI J00dIDCyj52EuysxEPPCbeIFPgVqLA20wxytII/QclgrLY8DcS/cvLQOij0JrNqtjPtdat BK9LH53AIJ6tUKAFHBdg/jdaiULibpk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1688026923; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=06v9S8UhT3Ka0nd3Jlbp0f2nz5c7yebBWIk6cuNJo+0=; b=TPc2e7ur5N8w0U4brsj/32Xo/5ZTL94GkUguEXwbFYJ3TZm2PbPJp7BbaZ/vJbAVuOYMSS 7OPLqdCQL7tKP/BA== Received: from hawking.nue2.suse.org (unknown [10.168.4.11]) by relay2.suse.de (Postfix) with ESMTP id B82EF2C141; Thu, 29 Jun 2023 08:22:02 +0000 (UTC) Received: by hawking.nue2.suse.org (Postfix, from userid 17005) id 8BE084A03B6; Thu, 29 Jun 2023 10:22:02 +0200 (CEST) From: Andreas Schwab In-Reply-To: <83jzvmu2r1.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 29 Jun 2023 10:49:38 +0300") References: <87jzvn4f4e.fsf@pub.pink> <83jzvmu2r1.fsf@gnu.org> X-Yow: I've read SEVEN MILLION books!! Date: Thu, 29 Jun 2023 10:22:02 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) On Jun 29 2023, Eli Zaretskii wrote: >> diff --git a/lisp/calculator.el b/lisp/calculator.el >> index bf2ac9b6215..6af6464d2f4 100644 >> --- a/lisp/calculator.el >> +++ b/lisp/calculator.el >> @@ -746,7 +746,7 @@ calculator-need-3-lines >> ;; use 3 lines >> (let* ((bx (face-attribute 'mode-line :box)) >> (lh (plist-get bx :line-width))) >> - (and bx (or (not lh) (> lh 0)))) >> + (and bx (or (not lh) (> (if (listp lh) (cdr lh) lh) 0)))) > ^^^^^ > Shouldn't that be 'consp' instead? 'listp' returns non-nil for nil > argument. lh cannot be nil here, but it wouldn't make a difference anyway, since (cdr nil) returns nil. -- Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different." From unknown Mon Jun 23 16:48:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#64344: [PATCH] Make calculator work with customized mode-line Resent-From: Stephen Berman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 29 Jun 2023 08:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64344 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: john muhl , 64344@debbugs.gnu.org Received: via spool by 64344-submit@debbugs.gnu.org id=B64344.16880283862384 (code B ref 64344); Thu, 29 Jun 2023 08:47:02 +0000 Received: (at 64344) by debbugs.gnu.org; 29 Jun 2023 08:46:26 +0000 Received: from localhost ([127.0.0.1]:52227 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qEnII-0000cO-98 for submit@debbugs.gnu.org; Thu, 29 Jun 2023 04:46:26 -0400 Received: from mout.gmx.net ([212.227.15.15]:34937) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qEnID-0000c7-0b for 64344@debbugs.gnu.org; Thu, 29 Jun 2023 04:46:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=s31663417; t=1688028374; x=1688633174; i=stephen.berman@gmx.net; bh=N+lq8URUZ4nQR3A1IZfq6RTOHdX2UCpo1vvOY2KmuRw=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date; b=VZ1yawPJGha1NeHc6QxUULpg0KGhWTyLtr/LDB4av0sSoGRRQI9DYcyGZDZxXxuLGf2zoZ7 VIlLg4a2c4PT2vSU9Gizu2kh79Zsaz3Hhc4J86TXFNrZKY0lpmw5alyBJ2o+EW2c7qb0ytyUG Zt2ydyHFXJsNMUFGWkCNSHiTAYHqUeKHUD27tirBXHmawcdw6T+QtSvL15AzVCjZHs0KaNJhs 0Tf/YhITQpdGOVQTE7uTZaZryStEPkrB/kB54xchnLgXYUGAjIGNlUmysS5LwgtirOVcP4qkI crGIRiMIemmWirfd5/QEXYV9fSs/dNbqDeOr0W296NPhYHCI1i1w== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from strobelfssd ([89.246.37.236]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MDhhN-1qMnmT1xPr-00Akjh; Thu, 29 Jun 2023 10:46:14 +0200 From: Stephen Berman In-Reply-To: <83jzvmu2r1.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 29 Jun 2023 10:49:38 +0300") References: <87jzvn4f4e.fsf@pub.pink> <83jzvmu2r1.fsf@gnu.org> Date: Thu, 29 Jun 2023 10:46:11 +0200 Message-ID: <87o7kyd5bg.fsf@gmx.net> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:EAMDsXEP1YKn6up7Fsj6XUoI3Ha/mpxxAKdasvGm2RbssjYj6kJ oLb8fYlsZl4bUJKRsiCrcOW8/SELYumRXUym2OFmoNEdLyxoIztCj8T1Zq5Ra4RhuPjLQBs x/GZ+zzukK5iukkD682siVt3cMuPLVLeuFp1mebOtbYrHdsyHAMt0m+5hDFyCfXzUYeLw48 cMKuzFK578jdERKGUk86w== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:Yohf2xL5xDc=;uegeN2JMjjC2v7boLkEEkNR+IGz 7CRCh7twAgF5z16gIk3JlJf8lOYcPtW5jbX6ei/fry611brDV2OZ1irW0y6Se8b7J1ZLbutnY KnMQmAGwL/xG7SM/OEHMXAX74p8YO60D5sJElLTYvrQrLMHGkFL2s/bZdW7uhv2L1smeogCze srBDi3SY2UuN98QYMAS+U2/MPah3RG2yFC/0F7ISWzsVhZh+uEUubNnIONIOc+S102IOdUxlH yxEBoOMs7mSTAM4NJro1j8mQGxC+pmswMH3QhqC95GmcSLU2Qv0OmqKe8Q0cuqB28ka0/vyvd 8pMKnJJ5RmnQEiXMe3nxO4iuTDPuOLuHa37V/NEO8aafOZFX+f5Mc7uDDVg73a8uYcaaf1Nu7 m2cinsF5hitAGNJInmnerYC5B6EIdTixYpgOwHR3G4trAxwv4aWET0MdFkpKFa5Rlv0xgPNW+ 8xnZdetqdNBrLkNu/k0NSFsenZ1uagD0NaFbtNwyrDs54ewSVykWzZ2dryYBeCp4baOxMGCLe o/IBVg/OcGGv84+eP5qYM4ilxLkIN+F9ryyZ2DBuRFF8P3Rl2RMujzbmRmdOvRtv43V0bKsLq 1dH++HN+b/Uyfh57yzDiNRHtkP64j/WxcSZAYXxeXo007/px3MIa5WbuS9vZNplPd3Q+MHE8/ vBUYm3/xe6TT7C4v63r2vu+WVGsj7RSz7984V8r87QKE5skkTd4tlR1AmYgpHKAJFpw6LC5dK hfBHlzenBCyc63+isMRC5I3IjCLcA+aQ5Y8jAzEwig6J+rXigvADWEoTpUk7Lps6M+mAPpX+W VoW5cwvihchCYMH4pTwdbHB7mwwyvSNnoG51vnPh4s90d1E/SFMkV7I37JmzAtWwJN5rf3N4G TE6NaMICpYncJVvj7Hqulrvai9ehyuHpiTRIWjrLuO9y7D+TxZQaUDqPIhtSEu5UnzFiqL6g7 V07hyMj1CdfZWIUkjDNF+8+zRKM= X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On Thu, 29 Jun 2023 10:49:38 +0300 Eli Zaretskii wrote: >> Date: Wed, 28 Jun 2023 13:23:45 -0500 >> From: john muhl via "Bug reports for GNU Emacs, >> the Swiss army knife of text editors" >>=20 >> calculator.el doesn=E2=80=99t work after customizing the mode-line. It a= ssumes >> the line-width is always an integer but after using customize it is a >> dotted list. >>=20 >> - emacs -Q >> - M-x customize-apropos-faces RET mode-line RET >> - Ensure =E2=80=98mode-line-face=E2=80=99 has a box property with vert= ical and >> horizontal widths. The default config includes these already. >> - Set for current session >> - M-x calculator RET >> =3D> calculator: Wrong type argument: number-or-marker-p, (1 . -1) > > Thanks. > >> diff --git a/lisp/calculator.el b/lisp/calculator.el >> index bf2ac9b6215..6af6464d2f4 100644 >> --- a/lisp/calculator.el >> +++ b/lisp/calculator.el >> @@ -746,7 +746,7 @@ calculator-need-3-lines >> ;; use 3 lines >> (let* ((bx (face-attribute 'mode-line :box)) >> (lh (plist-get bx :line-width))) >> - (and bx (or (not lh) (> lh 0)))) >> + (and bx (or (not lh) (> (if (listp lh) (cdr lh) lh) 0)))) Why is the state of the mode-line face shown as "EDITED, shown value does not take effect until you set or save it." before setting it in the above recipe? In fact, I see nine such faces in the buffer *Customize Faces* with -Q (the state of all other faces is shown as "STANDARD"). Steve Berman From unknown Mon Jun 23 16:48:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#64344: [PATCH] Make calculator work with customized mode-line Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 29 Jun 2023 09:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64344 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Stephen Berman Cc: jm@pub.pink, 64344@debbugs.gnu.org Received: via spool by 64344-submit@debbugs.gnu.org id=B64344.16880307757587 (code B ref 64344); Thu, 29 Jun 2023 09:27:01 +0000 Received: (at 64344) by debbugs.gnu.org; 29 Jun 2023 09:26:15 +0000 Received: from localhost ([127.0.0.1]:52268 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qEnuo-0001yG-Q9 for submit@debbugs.gnu.org; Thu, 29 Jun 2023 05:26:15 -0400 Received: from eggs.gnu.org ([209.51.188.92]:55234) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qEnuk-0001xs-Hk for 64344@debbugs.gnu.org; Thu, 29 Jun 2023 05:26:13 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qEnud-0005OX-LP; Thu, 29 Jun 2023 05:26:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=2f5ufRv4yxq+5kIH+EtcrbwymCtbIHuMsSv6qpQLjSc=; b=OMO5V8aoQAY0 6m7VIOJwU69kZ2fRabuLd/O3Z9Oad5Xjg+K421ioHxHv4wLKVNEPvCj5QJTA+Iv3L6ebTgmg+hWF2 3zmPTts4nrxMcNXoaSMorv8FleLUF7yiVhVz7pL+mGmvYMWpQEC2Bs8i0g0dupHV4jptah9BIAJRC DDBg9/fp4DQu/dFEezzBP3XBb1K2s/oGkmSSFqhue+7W5gFZVlu1ABPACJUz8Bn8pD2ZxnK/X4nlj EhFZanTYsT6C8b9wATES6mGWTxZ4pf8MJsEOaaw3wTw1IMVCTxY4V7J85zKfo+2R9G/tlmYrYR56i FYrVXPdkMRNy5ug+s93yDQ==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qEnuA-0007gI-1h; Thu, 29 Jun 2023 05:25:48 -0400 Date: Thu, 29 Jun 2023 12:26:00 +0300 Message-Id: <83ilb6tyaf.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <87o7kyd5bg.fsf@gmx.net> (message from Stephen Berman on Thu, 29 Jun 2023 10:46:11 +0200) References: <87jzvn4f4e.fsf@pub.pink> <83jzvmu2r1.fsf@gnu.org> <87o7kyd5bg.fsf@gmx.net> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Stephen Berman > Cc: john muhl , 64344@debbugs.gnu.org > Date: Thu, 29 Jun 2023 10:46:11 +0200 > > Why is the state of the mode-line face shown as "EDITED, shown value > does not take effect until you set or save it." before setting it in the > above recipe? In fact, I see nine such faces in the buffer *Customize > Faces* with -Q (the state of all other faces is shown as "STANDARD"). Please submit a separate bug report about this, as it's unrelated to the issue at hand here. Thanks. From unknown Mon Jun 23 16:48:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#64344: [PATCH] Make calculator work with customized mode-line Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 29 Jun 2023 09:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64344 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Andreas Schwab Cc: jm@pub.pink, 64344@debbugs.gnu.org Received: via spool by 64344-submit@debbugs.gnu.org id=B64344.16880308897893 (code B ref 64344); Thu, 29 Jun 2023 09:29:01 +0000 Received: (at 64344) by debbugs.gnu.org; 29 Jun 2023 09:28:09 +0000 Received: from localhost ([127.0.0.1]:52273 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qEnwf-00023F-7k for submit@debbugs.gnu.org; Thu, 29 Jun 2023 05:28:09 -0400 Received: from eggs.gnu.org ([209.51.188.92]:43512) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qEnwd-00022y-G3 for 64344@debbugs.gnu.org; Thu, 29 Jun 2023 05:28:08 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qEnwY-0006Wg-9Z; Thu, 29 Jun 2023 05:28:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=wFfYnsCGGI+XeuMbOlownqMw9z9wh7cy56C4xg/TN6I=; b=miVtHIpGzT3n nBvg6v88jfk0EFM5v7owN2RAfND1G9vb2HiEkzr1TVfFBxszpPDp2UdrCCDyrUkQSc8ik87p6gQUU 7Bddo8eN8+fISPHRhQR3uQlj9baQSNDgLVkJU5d16LH0aWmvsyYRe8WX8Umckwqw4VTahRsYAOmyW 95kit07axz8GfyvTvkxOeQo5yo/rtm1ssYWsJFJG20J7BkPUls+ukSGBTjViiYR0l/jOSr/VliF5R braNSdot/IebjI1P9Le/CGTY8qKVu+vHFRi8MrHeAdOPE3LWXDQ6Oqjt9aasUPUQ3q6CnXLCPYL1I tFRzYOZT4aUJ3QlVVcw/yw==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qEnwX-00008B-4D; Thu, 29 Jun 2023 05:28:01 -0400 Date: Thu, 29 Jun 2023 12:28:28 +0300 Message-Id: <83fs6aty6b.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Andreas Schwab on Thu, 29 Jun 2023 10:22:02 +0200) References: <87jzvn4f4e.fsf@pub.pink> <83jzvmu2r1.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Andreas Schwab > Cc: john muhl , 64344@debbugs.gnu.org > Date: Thu, 29 Jun 2023 10:22:02 +0200 > > On Jun 29 2023, Eli Zaretskii wrote: > > >> - (and bx (or (not lh) (> lh 0)))) > >> + (and bx (or (not lh) (> (if (listp lh) (cdr lh) lh) 0)))) > > ^^^^^ > > Shouldn't that be 'consp' instead? 'listp' returns non-nil for nil > > argument. > > lh cannot be nil here, but it wouldn't make a difference anyway, since > (cdr nil) returns nil. I prefer not to have, nor force others, to analyze code in order to ensure it's correct. From unknown Mon Jun 23 16:48:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#64344: [PATCH] Make calculator work with customized mode-line Resent-From: Andreas Schwab Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 29 Jun 2023 09:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64344 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: jm@pub.pink, 64344@debbugs.gnu.org Received: via spool by 64344-submit@debbugs.gnu.org id=B64344.16880310748399 (code B ref 64344); Thu, 29 Jun 2023 09:32:01 +0000 Received: (at 64344) by debbugs.gnu.org; 29 Jun 2023 09:31:14 +0000 Received: from localhost ([127.0.0.1]:52277 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qEnzd-0002BP-Qf for submit@debbugs.gnu.org; Thu, 29 Jun 2023 05:31:14 -0400 Received: from smtp-out2.suse.de ([195.135.220.29]:48332) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qEnzb-0002B8-NI for 64344@debbugs.gnu.org; Thu, 29 Jun 2023 05:31:12 -0400 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 536DD1F8AF; Thu, 29 Jun 2023 09:31:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1688031066; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=M90naH3anFkxO9Bqtrf4gswZL3eo0OcoR67iSqZwaRE=; b=mNnQzO2U52z/9Bm1heVTNBtqVCj0jI+tcJuaGiAHgnXi7aPbzclLT0j5+x/Us98z+aiikj TSvVr3l/IEe9LY16P5a7erC/hIAerY6Wo8vN/IumXGWjaHXZq4CkDqEvd8/gKAdbp+EjZi uVgX6Vuz0qZVNCIktI7ZYc8b/RoK7Bg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1688031066; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=M90naH3anFkxO9Bqtrf4gswZL3eo0OcoR67iSqZwaRE=; b=gySTdDM5SQYst6JAJ12jsDeLXcl5sJSorFniwqe/TbsjOsq5XpDltuyqFlnIGsZryEQcgA BqWpUeYQR+z1xnCg== Received: from hawking.nue2.suse.org (unknown [10.168.4.11]) by relay2.suse.de (Postfix) with ESMTP id 3E44F2C142; Thu, 29 Jun 2023 09:31:06 +0000 (UTC) Received: by hawking.nue2.suse.org (Postfix, from userid 17005) id 2889A4A03B6; Thu, 29 Jun 2023 11:31:06 +0200 (CEST) From: Andreas Schwab In-Reply-To: <83fs6aty6b.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 29 Jun 2023 12:28:28 +0300") References: <87jzvn4f4e.fsf@pub.pink> <83jzvmu2r1.fsf@gnu.org> <83fs6aty6b.fsf@gnu.org> X-Yow: A can of ASPARAGUS, 73 pigeons, some LIVE ammo, and a FROZEN DAQUIRI!! Date: Thu, 29 Jun 2023 11:31:06 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) On Jun 29 2023, Eli Zaretskii wrote: >> From: Andreas Schwab >> Cc: john muhl , 64344@debbugs.gnu.org >> Date: Thu, 29 Jun 2023 10:22:02 +0200 >> >> On Jun 29 2023, Eli Zaretskii wrote: >> >> >> - (and bx (or (not lh) (> lh 0)))) >> >> + (and bx (or (not lh) (> (if (listp lh) (cdr lh) lh) 0)))) >> > ^^^^^ >> > Shouldn't that be 'consp' instead? 'listp' returns non-nil for nil >> > argument. >> >> lh cannot be nil here, but it wouldn't make a difference anyway, since >> (cdr nil) returns nil. > > I prefer not to have, nor force others, to analyze code in order to > ensure it's correct. Then you need to add a comment, not change correct code. -- Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different." From unknown Mon Jun 23 16:48:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#64344: [PATCH] Make calculator work with customized mode-line Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 29 Jun 2023 09:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64344 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Andreas Schwab Cc: jm@pub.pink, 64344@debbugs.gnu.org Received: via spool by 64344-submit@debbugs.gnu.org id=B64344.16880314989288 (code B ref 64344); Thu, 29 Jun 2023 09:39:01 +0000 Received: (at 64344) by debbugs.gnu.org; 29 Jun 2023 09:38:18 +0000 Received: from localhost ([127.0.0.1]:52283 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qEo6T-0002Pk-RY for submit@debbugs.gnu.org; Thu, 29 Jun 2023 05:38:18 -0400 Received: from eggs.gnu.org ([209.51.188.92]:49374) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qEo6R-0002PQ-Su for 64344@debbugs.gnu.org; Thu, 29 Jun 2023 05:38:16 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qEo6M-00026R-4Q; Thu, 29 Jun 2023 05:38:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=3r9EZxpS7Nv9SHZPSqxfG0EsaUUBpSJoEi5Vl4C0srE=; b=UMe9m/I7i5Gg wRv2IYn+D6KbAFuKLMM/raQOC17QO2bEPq087SVj6E19i+Hk/sWEciRek++Ig4BCy6o7ebrCibWju xu2q1+d9W3gw0XIfiNT4GSuUSYuCXYdNGTeP0ZKZw7jH//t1mkXvaZgeTFVynVtqMwLdgJ5Gt38is b/PRiyUKEU9cUoXhVbtynL6in2/mx4Vkq32FNtN1thRC3qdxqa3iXkxdQoqLA/bF8dE/9S5EsUyPq KqTOC2oEt4B18R3IzPPbXVQiJ7i+SdOZZse1Gi0OU7nudbzKJkYYB6a+QBRol+qKInZDjG6iDx/CW Jq2ids9JIeldWfD0BcTJ6A==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qEo6L-0006gu-L2; Thu, 29 Jun 2023 05:38:09 -0400 Date: Thu, 29 Jun 2023 12:38:36 +0300 Message-Id: <83edlutxpf.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Andreas Schwab on Thu, 29 Jun 2023 11:31:06 +0200) References: <87jzvn4f4e.fsf@pub.pink> <83jzvmu2r1.fsf@gnu.org> <83fs6aty6b.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Andreas Schwab > Cc: jm@pub.pink, 64344@debbugs.gnu.org > Date: Thu, 29 Jun 2023 11:31:06 +0200 > > On Jun 29 2023, Eli Zaretskii wrote: > > >> From: Andreas Schwab > >> Cc: john muhl , 64344@debbugs.gnu.org > >> Date: Thu, 29 Jun 2023 10:22:02 +0200 > >> > >> On Jun 29 2023, Eli Zaretskii wrote: > >> > >> >> - (and bx (or (not lh) (> lh 0)))) > >> >> + (and bx (or (not lh) (> (if (listp lh) (cdr lh) lh) 0)))) > >> > ^^^^^ > >> > Shouldn't that be 'consp' instead? 'listp' returns non-nil for nil > >> > argument. > >> > >> lh cannot be nil here, but it wouldn't make a difference anyway, since > >> (cdr nil) returns nil. > > > > I prefer not to have, nor force others, to analyze code in order to > > ensure it's correct. > > Then you need to add a comment, not change correct code. There's no reason whatsoever to comment correct code. From unknown Mon Jun 23 16:48:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#64344: [PATCH] Make calculator work with customized mode-line Resent-From: Andreas Schwab Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 29 Jun 2023 09:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64344 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: jm@pub.pink, 64344@debbugs.gnu.org Received: via spool by 64344-submit@debbugs.gnu.org id=B64344.16880318489971 (code B ref 64344); Thu, 29 Jun 2023 09:45:02 +0000 Received: (at 64344) by debbugs.gnu.org; 29 Jun 2023 09:44:08 +0000 Received: from localhost ([127.0.0.1]:52287 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qEoC7-0002al-OJ for submit@debbugs.gnu.org; Thu, 29 Jun 2023 05:44:08 -0400 Received: from smtp-out2.suse.de ([195.135.220.29]:39004) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qEoC4-0002a9-W7 for 64344@debbugs.gnu.org; Thu, 29 Jun 2023 05:44:06 -0400 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 897081F8AF; Thu, 29 Jun 2023 09:43:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1688031839; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=WZDYelobxIDgrpfjRkEEAWDbrviTRfwTbBZdrjOlHQo=; b=iLWxIhO+DUgp6Vy8C7siTYOARzXxdyqqiw88tPM0tdWvAQZEXuXlbDJ2rVoUWwWDy9oRWT oGmaNfZY8PNBvkyQXlKNLuyswLW0ggg/7Dg8IZZdSj+bEg1R2TAVZEk5MKGmLZHE4Yz4QG kYBxEm+coOloBk9Ej+vwg1ElxDRMA2s= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1688031839; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=WZDYelobxIDgrpfjRkEEAWDbrviTRfwTbBZdrjOlHQo=; b=HhzPt+zdLEWzC70ZYCliouRXOAhkAA65Tailf/3fDtxvpCoMr4xVykIlDROX6u0acEPzn2 B6qKesj0FjLdbKAw== Received: from hawking.nue2.suse.org (unknown [10.168.4.11]) by relay2.suse.de (Postfix) with ESMTP id 7A40F2C141; Thu, 29 Jun 2023 09:43:59 +0000 (UTC) Received: by hawking.nue2.suse.org (Postfix, from userid 17005) id 672204A03B6; Thu, 29 Jun 2023 11:43:59 +0200 (CEST) From: Andreas Schwab In-Reply-To: <83edlutxpf.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 29 Jun 2023 12:38:36 +0300") References: <87jzvn4f4e.fsf@pub.pink> <83jzvmu2r1.fsf@gnu.org> <83fs6aty6b.fsf@gnu.org> <83edlutxpf.fsf@gnu.org> X-Yow: .. does your DRESSING ROOM have enough ASPARAGUS? Date: Thu, 29 Jun 2023 11:43:59 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) On Jun 29 2023, Eli Zaretskii wrote: >> From: Andreas Schwab >> Cc: jm@pub.pink, 64344@debbugs.gnu.org >> Date: Thu, 29 Jun 2023 11:31:06 +0200 >> >> On Jun 29 2023, Eli Zaretskii wrote: >> >> >> From: Andreas Schwab >> >> Cc: john muhl , 64344@debbugs.gnu.org >> >> Date: Thu, 29 Jun 2023 10:22:02 +0200 >> >> >> >> On Jun 29 2023, Eli Zaretskii wrote: >> >> >> >> >> - (and bx (or (not lh) (> lh 0)))) >> >> >> + (and bx (or (not lh) (> (if (listp lh) (cdr lh) lh) 0)))) >> >> > ^^^^^ >> >> > Shouldn't that be 'consp' instead? 'listp' returns non-nil for nil >> >> > argument. >> >> >> >> lh cannot be nil here, but it wouldn't make a difference anyway, since >> >> (cdr nil) returns nil. >> > >> > I prefer not to have, nor force others, to analyze code in order to >> > ensure it's correct. >> >> Then you need to add a comment, not change correct code. > > There's no reason whatsoever to comment correct code. Ok, so nothing needs to change. -- Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different." From unknown Mon Jun 23 16:48:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#64344: [PATCH] Make calculator work with customized mode-line Resent-From: Stephen Berman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 29 Jun 2023 10:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64344 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: jm@pub.pink, 64344@debbugs.gnu.org Received: via spool by 64344-submit@debbugs.gnu.org id=B64344.168803387813554 (code B ref 64344); Thu, 29 Jun 2023 10:18:02 +0000 Received: (at 64344) by debbugs.gnu.org; 29 Jun 2023 10:17:58 +0000 Received: from localhost ([127.0.0.1]:52307 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qEois-0003WY-7L for submit@debbugs.gnu.org; Thu, 29 Jun 2023 06:17:58 -0400 Received: from mout.gmx.net ([212.227.15.15]:57153) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qEoip-0003WK-H3 for 64344@debbugs.gnu.org; Thu, 29 Jun 2023 06:17:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=s31663417; t=1688033869; x=1688638669; i=stephen.berman@gmx.net; bh=CqrE6MmehmbnHnxb0f13WXEFN+5kqiZ8IcdyjtHSQCA=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date; b=pU1a8vgjcEQSiXZuhrIZJWgw42RyHr5+ENk7/167LSeG3ulJJOY4FFncJNsgf55E1mnD3p1 Mf1loY0hmsiA8TlgAGdXQVfWS5QX7A3mAXAhU1sFWn4MgYJI9VkgSjylEr+wAXPvZFnoXhRSI Aoq40BxNBVb7IEX2yXz6ckp8rh9RaDGKFsOgL4AosM++O977jr1972Mp2AeT/a1OVdawAh68W SjNrqs7e49Kl2cSQZ3nqP+Hn5IIqXVh9qS/243P/ZsWahnCFjxZ6Z+7E0zfqa8xF79A4KV9fK kDt5G9xVrF7hFpIVCbHJKwCLN9hb31MaNXEfehAqa6cXoflzco4w== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from strobelfssd ([89.246.37.236]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MuUnA-1pxppm3Ygc-00rcID; Thu, 29 Jun 2023 12:17:48 +0200 From: Stephen Berman In-Reply-To: <83ilb6tyaf.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 29 Jun 2023 12:26:00 +0300") References: <87jzvn4f4e.fsf@pub.pink> <83jzvmu2r1.fsf@gnu.org> <87o7kyd5bg.fsf@gmx.net> <83ilb6tyaf.fsf@gnu.org> Date: Thu, 29 Jun 2023 12:17:48 +0200 Message-ID: <87fs6ad12r.fsf@gmx.net> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:Vfa4yKPCNJq9z7gWp0I3z4bDtTIwwXg0H8ZTLGsJKhUo0W/qAjt rBqndixwx+ybHGAPPS3DS0bBS8VafzlBxFfo3JRCahDkwEk8W8pTNcSE1a3LIOsCZpzX0uz pJ6CEO9Ti9Ux0pWS306nJ2dSanBQgJyPK7Zjnh/EDuBa+2/vplodeM9T8GP1MFPh3iPpCdM 7ZB78K0CUX9dvzPsiE6kg== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:lxEfj4poyk0=;/SumJrIu9++1fI/eUlXfVUBRw0a dAKk62l3K9Bw83HH/88/cHE3H69gqnvUlVwkahD9Ih26JZPkiGTAKIuEI2lOAvsGpP6ylofle 2leV/skzoPuEPzgxE5ZpJIcMSJ1aHjQrv2JHyg2G77XkJ6y5h7rZUcvtENx3vtjzQQRfkeQ+/ czLP048EDpbVhXAhsOmqUc1BBhv7IAkw6UelSaE8Ygvw16TfpRUfQqmC99OM26lhVSXCptyI+ MLjionzPwsMWLivjqoHNPs9pAHs91z2soRXocCqb8mBaxNELOndjzPPoU8VERqgwNlmRrdEuj /Wafbtc6e3i9w/vxU/5NSxXEvoD5ER1/hFfndQt36S/jjQEql6XQEaqnUxsRAvgDjXPx7/4Mk Hw9negCrb9XJm9ELjvvdBQ2wyqbTHEhdsEH1336WMeLJ188rW8MjJXzE+dbV4parP2Eoptm4y eH0DJ6fllDc0ijKXY78KoMmm0lVm8+3YhSkbV5rjBECzL/6hbPWnDWnrwAWxdJi4JZIDM2aI7 QoKefoF5K0Aj5lhDUDLvUJlpyn90uVgSkyUkI2hufLnTiRAlw8hbxNXioj+jdWgpGTN6Uk70j 5HJYXM+XU/fEkfBM1g41ALmYX11LY68Y0VIO9kTArA+6jkU2ia5mdqrZSyVr1ClnA1DCPd+hh TmFlKAyijXUN2DE6oN65QpCL6xnANdgCVvc3Gd57Ek58PSciL5/4tk7kwCn7yAeOC7WVFK7VA iycmrHiDoJ/qJZ2ogXvO5U94lLO1VUVqSV1KIkZQQKcyO6823gNuR/odehq949ykMkCY7/e+z WPCiisEOksPKVIGc+QFgS7mhsv6yBJlUBPZS9WFiGd48t6ne2ouawB5Mgb/qVcoXRhro2+ido WXO1xXFr7nnve7qgy7IrhpTwplvhNLk5YKV1JCLY2YgQ9+hnoBKf/yyo2Vj+mNvIrZ6HevpB7 LDGL8RNXBr+9lhFBZSOqzRCBmLk= Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On Thu, 29 Jun 2023 12:26:00 +0300 Eli Zaretskii wrote: >> From: Stephen Berman >> Cc: john muhl , 64344@debbugs.gnu.org >> Date: Thu, 29 Jun 2023 10:46:11 +0200 >> >> Why is the state of the mode-line face shown as "EDITED, shown value >> does not take effect until you set or save it." before setting it in th= e >> above recipe? In fact, I see nine such faces in the buffer *Customize >> Faces* with -Q (the state of all other faces is shown as "STANDARD"). > > Please submit a separate bug report about this, as it's unrelated to > the issue at hand here. > > Thanks. Done, bug#64347. Steve Berman From unknown Mon Jun 23 16:48:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#64344: [PATCH] Make calculator work with customized mode-line References: <87jzvn4f4e.fsf@pub.pink> In-Reply-To: <87jzvn4f4e.fsf@pub.pink> Resent-From: john muhl Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 29 Jun 2023 16:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64344 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: 64344@debbugs.gnu.org Received: via spool by 64344-submit@debbugs.gnu.org id=B64344.168805709331755 (code B ref 64344); Thu, 29 Jun 2023 16:45:02 +0000 Received: (at 64344) by debbugs.gnu.org; 29 Jun 2023 16:44:53 +0000 Received: from localhost ([127.0.0.1]:53942 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qEulH-0008Fz-I5 for submit@debbugs.gnu.org; Thu, 29 Jun 2023 12:44:53 -0400 Received: from out-11.mta1.migadu.com ([95.215.58.11]:34760) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qEtdK-0006Bv-2E for 64344@debbugs.gnu.org; Thu, 29 Jun 2023 11:32:34 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pub.pink; s=key1; t=1688052753; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type; bh=kAn1zsE3/Q7mMp5uTPp/WbXGCzJRMpmWSOFPmg5yrDw=; b=Yd0mgWYwqFhK3eFhDdIU+6/NWGl+VMWvw2z+BVHCeAJkUGY1RY8sJuPPjAu5XjFJCbcAFN SibHVPvK4S/LndQAO2bZDGKP4vzu8qUWsVrRp8j9o0/CJkwRPV43ygcXLHJKcAGnUqxApR u+UgVyeT/LT0BjZtmnLSfvD75hwRIJY= From: john muhl Date: Thu, 29 Jun 2023 10:12:06 -0500 Message-ID: <87jzvmp9m8.fsf@pub.pink> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Migadu-Flow: FLOW_OUT X-Spam-Score: -0.0 (/) X-Mailman-Approved-At: Thu, 29 Jun 2023 12:44:48 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Eli Zaretskii writes: >> + (and bx (or (not lh) (> (if (listp lh) (cdr lh) lh) 0)))) > ^^^^^ > Shouldn't that be 'consp' instead? 'listp' returns non-nil for nil > argument. I=E2=80=99m not expert enough to say more than that either way works to fix= the issue. Originally I did the =E2=80=98(cdr lh)=E2=80=99 unconditionally and = got an error mentioning =E2=80=98listp=E2=80=99 so I just used that when I added the con= dition; if it had said =E2=80=98conps=E2=80=99 I would have used that. Here is the patch with =E2=80=98consp=E2=80=99 instead. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-lisp-calculator-el--calculator-need-3-lines---Ch.patch Content-Description: [PATCH] * lisp/calculator.el (calculator-need-3-lines): Check type >From 36ea9a67c9e559c490f2c5787a75b229772a97e4 Mon Sep 17 00:00:00 2001 From: john muhl Date: Wed, 28 Jun 2023 12:58:27 -0500 Subject: [PATCH] * lisp/calculator.el (calculator-need-3-lines): Check type Copyright-paperwork-exempt: yes --- lisp/calculator.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/calculator.el b/lisp/calculator.el index bf2ac9b6215..6af6464d2f4 100644 --- a/lisp/calculator.el +++ b/lisp/calculator.el @@ -746,7 +746,7 @@ calculator-need-3-lines ;; use 3 lines (let* ((bx (face-attribute 'mode-line :box)) (lh (plist-get bx :line-width))) - (and bx (or (not lh) (> lh 0)))) + (and bx (or (not lh) (> (if (listp lh) (cdr lh) lh) 0)))) ;; if the mode line has an overline, use 3 lines (not (memq (face-attribute 'mode-line :overline) '(nil unspecified))))))) -- 2.41.0 --=-=-=-- From unknown Mon Jun 23 16:48:10 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: john muhl Subject: bug#64344: closed (Re: [PATCH] Make calculator work with customized mode-line) Message-ID: References: <838rc2t9fu.fsf@gnu.org> <87jzvn4f4e.fsf@pub.pink> X-Gnu-PR-Message: they-closed 64344 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: patch Reply-To: 64344@debbugs.gnu.org Date: Thu, 29 Jun 2023 18:23:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1688062982-9850-1" This is a multi-part message in MIME format... ------------=_1688062982-9850-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #64344: [PATCH] Make calculator work with customized mode-line which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 64344@debbugs.gnu.org. --=20 64344: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D64344 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1688062982-9850-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 64344-done) by debbugs.gnu.org; 29 Jun 2023 18:22:30 +0000 Received: from localhost ([127.0.0.1]:54002 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qEwHm-0002YA-7q for submit@debbugs.gnu.org; Thu, 29 Jun 2023 14:22:30 -0400 Received: from eggs.gnu.org ([209.51.188.92]:50056) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qEwHi-0002Xt-Ee for 64344-done@debbugs.gnu.org; Thu, 29 Jun 2023 14:22:28 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qEwHc-0003QL-2c; Thu, 29 Jun 2023 14:22:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=IMgFwAQxQPZqCfvaj/v52rHANyRrjqUz38so5BtZxBQ=; b=afZhu6PzoGK1dkxxqDFx qN8uaKlOr2F/BW1glIQd/rzo9pqLAmS2AzlUf4h8Xx6z9RUwUcJxSar7APwgXs+hcuLwYik0xz3nR IQjTWX9ULoqjZ6d9i5dNDvjL1tzs372Ch+MQomK3ED1WtMFi+iPbZNK2f65R4lc+RB49i7byZgupY ioihORId1IYjD0BRT+JY/gPlQb4asEW96f9/1iEM03lyKK4gppvA9W3Lx+I2G7+UdbWfaH1VWo3iR ywbu9ATx8m8FhhA7w+9xeK13Yw10WdDVaO1UdJEXapst9BdaS1ijHUoYVSWHMw7KAy/UYUnXMwOe2 S0DA+vzRs8Y4KQ==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qEwHZ-0003r2-O1; Thu, 29 Jun 2023 14:22:19 -0400 Date: Thu, 29 Jun 2023 21:22:45 +0300 Message-Id: <838rc2t9fu.fsf@gnu.org> From: Eli Zaretskii To: john muhl In-Reply-To: <87jzvmp9m8.fsf@pub.pink> (message from john muhl on Thu, 29 Jun 2023 10:12:06 -0500) Subject: Re: [PATCH] Make calculator work with customized mode-line References: <87jzvmp9m8.fsf@pub.pink> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64344-done Cc: 64344-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: john muhl > Cc: 64344@debbugs.gnu.org > Date: Thu, 29 Jun 2023 10:12:06 -0500 > > > Shouldn't that be 'consp' instead? 'listp' returns non-nil for nil > > argument. > > I’m not expert enough to say more than that either way works to fix the > issue. Originally I did the ‘(cdr lh)’ unconditionally and got an error > mentioning ‘listp’ so I just used that when I added the condition; if it > had said ‘conps’ I would have used that. > > Here is the patch with ‘consp’ instead. Thanks. That still uses 'listp', so I fixed that manually. This is now installed on the emacs-29 branch; closing the bug. ------------=_1688062982-9850-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 29 Jun 2023 06:43:29 +0000 Received: from localhost ([127.0.0.1]:52133 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qElNI-0005tV-4x for submit@debbugs.gnu.org; Thu, 29 Jun 2023 02:43:29 -0400 Received: from lists.gnu.org ([209.51.188.17]:34326) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qEZsj-0001H8-PA for submit@debbugs.gnu.org; Wed, 28 Jun 2023 14:27:10 -0400 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 1qEZsj-0004O4-Di for bug-gnu-emacs@gnu.org; Wed, 28 Jun 2023 14:27:09 -0400 Received: from out-3.mta0.migadu.com ([2001:41d0:1004:224b::3]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qEZsd-0004SD-Iw for bug-gnu-emacs@gnu.org; Wed, 28 Jun 2023 14:27:09 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pub.pink; s=key1; t=1687976818; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=zbQCw136XscZgkrwcT4eSWd0TUF0LAxH3cd5IPmglWg=; b=paZdWwMBVOWCTlzHSbBZ1+njruAkMKO4tsjKGktmRt+NzqUZ2zL2+1JyTZX46pqICgTWQu oZBbiEptgtUM5J0tQt9PgrbMj79oqW7cv8UF+NzDhsrswgUy2WxwjcylETKclkIvtAIx21 IUqLSD8f+IIuDvdcxhmnD97D0tK53aw= From: john muhl To: bug-gnu-emacs@gnu.org Subject: [PATCH] Make calculator work with customized mode-line Date: Wed, 28 Jun 2023 13:23:45 -0500 Message-ID: <87jzvn4f4e.fsf@pub.pink> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=2001:41d0:1004:224b::3; envelope-from=jm@pub.pink; helo=out-3.mta0.migadu.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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Thu, 29 Jun 2023 02:43:27 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable calculator.el doesn=E2=80=99t work after customizing the mode-line. It assu= mes the line-width is always an integer but after using customize it is a dotted list. - emacs -Q - M-x customize-apropos-faces RET mode-line RET - Ensure =E2=80=98mode-line-face=E2=80=99 has a box property with vertica= l and horizontal widths. The default config includes these already. - Set for current session - M-x calculator RET =3D> calculator: Wrong type argument: number-or-marker-p, (1 . -1) In GNU Emacs 30.0.50 (build 6, x86_64-pc-linux-gnu, GTK+ Version 3.24.38, cairo version 1.17.8) of 2023-06-28 built on localhost Repository revision: c5d6102313076b83526dc79bfb563621671fb70b Repository branch: master System Description: Fedora Linux 38 (Workstation Edition) Configured using: 'configure --with-native-compilation --with-pgtk' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PGTK PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XIM GTK3 ZLIB --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-lisp-calculator-el--calculator-need-3-lines---Ch.patch Content-Description: [PATCH] * lisp/calculator.el (calculator-need-3-lines): Check type >From 54cd9fe40d954231a6be822d9ea448902e12c60c Mon Sep 17 00:00:00 2001 From: john muhl Date: Wed, 28 Jun 2023 12:58:27 -0500 Subject: [PATCH] * lisp/calculator.el (calculator-need-3-lines): Check type Copyright-paperwork-exempt: yes --- lisp/calculator.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/calculator.el b/lisp/calculator.el index bf2ac9b6215..6af6464d2f4 100644 --- a/lisp/calculator.el +++ b/lisp/calculator.el @@ -746,7 +746,7 @@ calculator-need-3-lines ;; use 3 lines (let* ((bx (face-attribute 'mode-line :box)) (lh (plist-get bx :line-width))) - (and bx (or (not lh) (> lh 0)))) + (and bx (or (not lh) (> (if (listp lh) (cdr lh) lh) 0)))) ;; if the mode line has an overline, use 3 lines (not (memq (face-attribute 'mode-line :overline) '(nil unspecified))))))) -- 2.41.0 --=-=-= Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" --==-=-= Content-Type: text/plain --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQFABAEBCAAqFiEEK5CvUQq7L5O2pQef9D+KfcKUo10FAmSce3EMHGptQHB1Yi5w aW5rAAoJEPQ/in3ClKNddZMH/2qx4qsNm2f5uT0RSZ1X3RthjRqmEr23byiNSPGg +IFY5RlXsdSdJoFLsbz6a6Kdw2TwqNXF2sHByG1MzWxHz7gO1KpAS4G07lPJ7I9m vjxuRKBg+XNRs1tCCNAysQOksEe6rE+tx4XhwhadZHHElq1E2TMEqyzerghL44XK /WzQoSWb06Q+VDD5OjdkZjAh7S+gx+K8pRzHLv2fPNmklPNO6zkdm1RrboH3pqaH /s89oV2P5RbQ0fSYiSyGKLfy805q9UbMusQCdM/VKlizpyAJ7vooXIo0lAkzFJt9 reUVeL4mqQVl0vtYFDmjUoAtCpxQBH5spj4kohJujshKpWo= =4y/V -----END PGP SIGNATURE----- --==-=-=-- --=-=-=-- ------------=_1688062982-9850-1--