X-Loop: help-debbugs@HIDDEN Subject: bug#68547: [PATCH] ; Fix 'mode-line-format-right-align' with ElDoc Resent-From: Eshel Yaron <me@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Wed, 17 Jan 2024 19:45:02 +0000 Resent-Message-ID: <handler.68547.B.170552065828329 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 68547 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 68547 <at> debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN Received: via spool by submit <at> debbugs.gnu.org id=B.170552065828329 (code B ref -1); Wed, 17 Jan 2024 19:45:02 +0000 Received: (at submit) by debbugs.gnu.org; 17 Jan 2024 19:44:18 +0000 Received: from localhost ([127.0.0.1]:53541 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1rQBpi-0007Mr-1D for submit <at> debbugs.gnu.org; Wed, 17 Jan 2024 14:44:18 -0500 Received: from lists.gnu.org ([2001:470:142::17]:42716) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <me@HIDDEN>) id 1rQBpf-0007Mb-Oc for submit <at> debbugs.gnu.org; Wed, 17 Jan 2024 14:44:16 -0500 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 <me@HIDDEN>) id 1rQBpY-0003Cc-MB for bug-gnu-emacs@HIDDEN; Wed, 17 Jan 2024 14:44:08 -0500 Received: from mail.eshelyaron.com ([107.175.124.16] helo=eshelyaron.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <me@HIDDEN>) id 1rQBpX-0004rP-3p for bug-gnu-emacs@HIDDEN; Wed, 17 Jan 2024 14:44:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com; s=mail; t=1705520646; bh=7Sfei4ztzVKngsz6oVkXcj/6/zIEMOe0uffJCIADVp4=; h=From:To:Subject:Date:From; b=mOOaYG0Wp/iFdOBe5wWE+iQSHsR7L4iwQg/OWoXrbYXAd7oWMP/YKAwP97wzVPaO/ q8P8Iq2oAKwg/V0TIi7bk8Sjo4DHU8wHEWY9AacexBXyOZPBuG55VPFrFyJp7NltNo m2paJA2CNSN6yYxkGUlnvlAX5iTM/wVmlGwOWEsmP3s6sDUOz6f5ZPnixhLFHopFe1 dC9oOZWDZQYB4Iu7RVgQ+UbiSsvXELbQtKZrw68eSQkFJ4EqSIIUG5lsc6Jwh/luWh zR9YeQYgSc9ucj8p88RIzkzWThJI6b8T31HlX/NVqzl4Sc0tjgFpjyMgOshufBEj0j ix4JfM/Gsdplw== From: Eshel Yaron <me@HIDDEN> X-Hashcash: 1:20:240117:bug-gnu-emacs@HIDDEN::5LAWlTBilvOqUJ7p:05no Date: Wed, 17 Jan 2024 20:44:04 +0100 Message-ID: <m14jfbg2yj.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=107.175.124.16; envelope-from=me@HIDDEN; helo=eshelyaron.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_PASS=-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: 0.9 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.1 (/) --=-=-= Content-Type: text/plain Tags: patch The new mode line right alignment requires setting `mode-line-format` to a list that contains (as in `memq`) the symbol `mode-line-format-right-align`. This is a bit brittle, and currently `eldoc-minibuffer-message` modifies `mode-line-format` in a way that happens to break `mode-line-format-right-align`. To see that, set `mode-line-format` to '("" mode-line-format-right-align "foo bar") and then type `M-: (list`. Now ElDoc info appears on the mode line, but "bar" is no longer visible. This patch makes ElDoc modify `mode-line-format` in an equivalent way that avoids messing with `mode-line-format-right-align`. --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-Fix-mode-line-format-right-align-with-ElDoc.patch From 5d8568e00c2c36ce2fbc7554635868826ec5009a Mon Sep 17 00:00:00 2001 From: Eshel Yaron <me@HIDDEN> Date: Mon, 1 Jan 2024 22:14:59 +0100 Subject: [PATCH] ; Fix 'mode-line-format-right-align' with ElDoc * lisp/emacs-lisp/eldoc.el (eldoc-minibuffer-message): Avoid nesting 'mode-line-format', since that breaks 'mode-line-format-right-align'. --- lisp/emacs-lisp/eldoc.el | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el index 4ee825136c9..a4faa25fd31 100644 --- a/lisp/emacs-lisp/eldoc.el +++ b/lisp/emacs-lisp/eldoc.el @@ -312,9 +312,13 @@ eldoc-minibuffer-message (not (and (listp mode-line-format) (assq 'eldoc-mode-line-string mode-line-format)))) (setq mode-line-format - (list "" '(eldoc-mode-line-string - (" " eldoc-mode-line-string " ")) - mode-line-format))) + (funcall + (if (listp mode-line-format) + #'append + #'list) + (list "" '(eldoc-mode-line-string + (" " eldoc-mode-line-string " "))) + mode-line-format))) (setq eldoc-mode-line-string (when (stringp format-string) (apply #'format-message format-string args))) -- 2.42.0 --=-=-=--
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Eshel Yaron <me@HIDDEN> Subject: bug#68547: Acknowledgement ([PATCH] ; Fix 'mode-line-format-right-align' with ElDoc) Message-ID: <handler.68547.B.170552065828329.ack <at> debbugs.gnu.org> References: <m14jfbg2yj.fsf@HIDDEN> X-Gnu-PR-Message: ack 68547 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: patch Reply-To: 68547 <at> debbugs.gnu.org Date: Wed, 17 Jan 2024 19:45:02 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): bug-gnu-emacs@HIDDEN If you wish to submit further information on this problem, please send it to 68547 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 68547: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D68547 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
X-Loop: help-debbugs@HIDDEN Subject: bug#68547: [PATCH] ; Fix 'mode-line-format-right-align' with ElDoc Resent-From: Eli Zaretskii <eliz@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Sat, 20 Jan 2024 09:58:01 +0000 Resent-Message-ID: <handler.68547.B68547.170574464519163 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 68547 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eshel Yaron <me@HIDDEN>, =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN> Cc: 68547 <at> debbugs.gnu.org Received: via spool by 68547-submit <at> debbugs.gnu.org id=B68547.170574464519163 (code B ref 68547); Sat, 20 Jan 2024 09:58:01 +0000 Received: (at 68547) by debbugs.gnu.org; 20 Jan 2024 09:57:25 +0000 Received: from localhost ([127.0.0.1]:60900 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1rR86P-0004z1-HQ for submit <at> debbugs.gnu.org; Sat, 20 Jan 2024 04:57:25 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:58976) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1rR86O-0004yo-GH for 68547 <at> debbugs.gnu.org; Sat, 20 Jan 2024 04:57:24 -0500 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 <eliz@HIDDEN>) id 1rR86G-0000TX-9C; Sat, 20 Jan 2024 04:57:16 -0500 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=wOjj8QgOMz+KPzXIrhIEgU75ddZZYUKU/rZeNJRPXz0=; b=l7o+IUAUsH21xZKZP8lX 8F4uFEqVKTU2qMDyo1+lhZvwpb4o2RbDtLzAaZITmXtcoj2qUqf9O7YLaaqYt7lxfJBM5s8F4L2Uk PkVc9BeMHkEbrU6LRFWQ6jZnS9xW9be80dYuKVBy2uN70wIxSp6iEErHhYchu28ZqNOSV4uRaJx1H 41EZ3iqdabQJGqVN3TLPKdLnSTSHAc854QlQ98jqZzxO5Jtvt0lOv4VSqr/A2rRaEqwbUUCATruZ+ w8kgbcR4XTN3EgUo05lbHl7ydS2OsQhBGWGstBuTnB5P5nkuwyNC+ymxbOc7Pbc7GXcXSpQIoHCk3 MEWpK4ZmGm3bzg==; Date: Sat, 20 Jan 2024 11:56:55 +0200 Message-Id: <83cytwtjiw.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> In-Reply-To: <m14jfbg2yj.fsf@HIDDEN> (bug-gnu-emacs@HIDDEN) References: <m14jfbg2yj.fsf@HIDDEN> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) > Date: Wed, 17 Jan 2024 20:44:04 +0100 > From: Eshel Yaron via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN> > > Tags: patch > > The new mode line right alignment requires setting `mode-line-format` to > a list that contains (as in `memq`) the symbol > `mode-line-format-right-align`. This is a bit brittle, and currently > `eldoc-minibuffer-message` modifies `mode-line-format` in a way that > happens to break `mode-line-format-right-align`. To see that, set > `mode-line-format` to '("" mode-line-format-right-align "foo bar") and > then type `M-: (list`. Now ElDoc info appears on the mode line, but > "bar" is no longer visible. > > This patch makes ElDoc modify `mode-line-format` in an equivalent way > that avoids messing with `mode-line-format-right-align`. Thanks. Joćo, any objections or comments?
X-Loop: help-debbugs@HIDDEN Subject: bug#68547: [PATCH] ; Fix 'mode-line-format-right-align' with ElDoc Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Sat, 20 Jan 2024 10:21:02 +0000 Resent-Message-ID: <handler.68547.B68547.170574606010625 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 68547 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii <eliz@HIDDEN> Cc: Eshel Yaron <me@HIDDEN>, 68547 <at> debbugs.gnu.org Received: via spool by 68547-submit <at> debbugs.gnu.org id=B68547.170574606010625 (code B ref 68547); Sat, 20 Jan 2024 10:21:02 +0000 Received: (at 68547) by debbugs.gnu.org; 20 Jan 2024 10:21:00 +0000 Received: from localhost ([127.0.0.1]:32931 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1rR8TE-0002lH-Ak for submit <at> debbugs.gnu.org; Sat, 20 Jan 2024 05:21:00 -0500 Received: from mail-lf1-x134.google.com ([2a00:1450:4864:20::134]:51684) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <joaotavora@HIDDEN>) id 1rR8TD-0002l2-9d for 68547 <at> debbugs.gnu.org; Sat, 20 Jan 2024 05:20:59 -0500 Received: by mail-lf1-x134.google.com with SMTP id 2adb3069b0e04-50edf4f478eso2090479e87.3 for <68547 <at> debbugs.gnu.org>; Sat, 20 Jan 2024 02:20:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705746050; x=1706350850; darn=debbugs.gnu.org; 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=EfXe87u4YvlethQXMy5E48bGARbf4PNpxb0h87jmWvU=; b=mm6H4VLYg2uc29gyVSd2VEsb26iO1aWtYCIedfXPWMIsWeO57zeVLTTmuRsTX6e4rw DGYt1p2tnBxhdwQj95S9J6mSmsSQE71aRTET020xSlyOsVUUD2GLZ9P+8TmeKBvuQlIG FjSWBIt0tN/ZGG9kRM+s7ikod1uYjAiARwv4L7TgYPqdYAViicAMTdOO9z1afXBUONQ0 g8ThWECcpLp59hPj3AHrlMRAPyee79i9gDzjrOL4uEeTSAf00ZuHyvinqnQz/THMtCxI xhUsdBXzgDKrvubOcrWVZj1xCbDIiqigXxpbXRFw27nbu/kxiRfFcYPYmnpKBw7b+rJq OBug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705746050; x=1706350850; 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=EfXe87u4YvlethQXMy5E48bGARbf4PNpxb0h87jmWvU=; b=thXyhi3vzw57TAF2FGwORh4szDKzSkfhIZ1QPqFYqPQi/9f5eN+lj5GIi+uVf+miBB dfCc5Wwk2XPIKvkrJmsidh6QTdRE5yr41jjLDmIm3VWOfYgr8zhEVyYSbFkpFUWv8kn+ eLTsZZN7OeueWFvm7D1kQUMjvZdWfDsRRlNikTVtv/gsfXx4+aUyLrUPIVZumHihk89f E8wGit15f9rR8hiWr6YP+UP84R9pEZpPbtI5zWDTIL8P7kc627xEEiLmDYsdxz7P9ypj aYvuK6rcxdim1flIGi1eBXDk4UbQh+oQ80t4GcyrcGTkKNo6oHtJvhola2CAFbNAWaGe rSTg== X-Gm-Message-State: AOJu0YwcoPy1pZJ5jNQ/BVxJZISRHgdIS+oO9zQ2ZQhM0RGsOXYkbcnh ldfeo/VRiXwkYaOwKnWuJJgMF3eNrq5NXuVViv/e3Hau4D8o43k+vB7hew2cvoaPA1dEtfOIlI3 e3wEUz+G2zzM0IdqdoOJgjFBXups= X-Google-Smtp-Source: AGHT+IGvesOG6ydC+LkPu66rd6OeOA8PDhMV3voZZIvZ1MTHzD/NKZNKlszcsj0oMfwPSxRsx2dPkBgAw8Xk8PbFwHw= X-Received: by 2002:a05:6512:554:b0:50e:42d7:21fa with SMTP id h20-20020a056512055400b0050e42d721famr461631lfl.107.1705746050363; Sat, 20 Jan 2024 02:20:50 -0800 (PST) MIME-Version: 1.0 References: <m14jfbg2yj.fsf@HIDDEN> <83cytwtjiw.fsf@HIDDEN> In-Reply-To: <83cytwtjiw.fsf@HIDDEN> From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN> Date: Sat, 20 Jan 2024 10:20:39 +0000 Message-ID: <CALDnm53Z4LppG7AUej2W5qrD_8MyA6YmYvZFFOpK5ULfv62j_w@HIDDEN> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) On Sat, Jan 20, 2024 at 9:57=E2=80=AFAM Eli Zaretskii <eliz@HIDDEN> wrote: > > > Date: Wed, 17 Jan 2024 20:44:04 +0100 > > From: Eshel Yaron via "Bug reports for GNU Emacs, > > the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN> > > > > Tags: patch > > > > The new mode line right alignment requires setting `mode-line-format` t= o > > a list that contains (as in `memq`) the symbol > > `mode-line-format-right-align`. This is a bit brittle, and currently > > `eldoc-minibuffer-message` modifies `mode-line-format` in a way that > > happens to break `mode-line-format-right-align`. To see that, set > > `mode-line-format` to '("" mode-line-format-right-align "foo bar") and > > then type `M-: (list`. Now ElDoc info appears on the mode line, but > > "bar" is no longer visible. > > > > This patch makes ElDoc modify `mode-line-format` in an equivalent way > > that avoids messing with `mode-line-format-right-align`. > > Thanks. > > Jo=C3=A3o, any objections or comments? I think it looks good. I just think the patch is a little too newline friendly, i.e. the if can probably fit in a single line without reaching 80 columns and it'll make it easier to read. Jo=C3=A3o
X-Loop: help-debbugs@HIDDEN Subject: bug#68547: [PATCH] ; Fix 'mode-line-format-right-align' with ElDoc Resent-From: Eshel Yaron <me@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Sat, 20 Jan 2024 10:59:02 +0000 Resent-Message-ID: <handler.68547.B68547.17057483132596 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 68547 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN> Cc: Eli Zaretskii <eliz@HIDDEN>, 68547 <at> debbugs.gnu.org Received: via spool by 68547-submit <at> debbugs.gnu.org id=B68547.17057483132596 (code B ref 68547); Sat, 20 Jan 2024 10:59:02 +0000 Received: (at 68547) by debbugs.gnu.org; 20 Jan 2024 10:58:33 +0000 Received: from localhost ([127.0.0.1]:32967 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1rR93Y-0000fn-IU for submit <at> debbugs.gnu.org; Sat, 20 Jan 2024 05:58:32 -0500 Received: from mail.eshelyaron.com ([107.175.124.16]:58918 helo=eshelyaron.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <me@HIDDEN>) id 1rR93W-0000ff-M7 for 68547 <at> debbugs.gnu.org; Sat, 20 Jan 2024 05:58:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com; s=mail; t=1705748307; bh=A8o4ROldKXjWXkKnkMWOs2gkqpCeOCpJc4W4YS0U8mY=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=QOGm1eoNzQe2MY4HJ4PyyqBKqwDurJxz1XBYFkt80FhqIAbO2pa6WUKerWFN9InVv e9kV6oe6VD69/ohfS/lxLym6+xgILBr60hlH/Zr3yo6/bQLFbN0TMBvBvwEti4UvyC A8uuvOtIqs2BPDFgXv2LvxTxc0PIEczEvqiDhvCL4zgf9DIqCHrRAeOnLOqJSfUQV/ 7UiSEh0892ySxrSnupMCC/o0CJP5RE/JCb7ibdx3lKcj6NfDp9YdYvT4s74g3jbiFh SyIaeIxmzdEL9toF9J7EqIiVmM0UFKCXSoBRjVEYz0kgNQtIrANmtsnQLp9QZBU5gB 4Adi7AhvQ/QhA== From: Eshel Yaron <me@HIDDEN> In-Reply-To: <CALDnm53Z4LppG7AUej2W5qrD_8MyA6YmYvZFFOpK5ULfv62j_w@HIDDEN> ("=?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?="'s message of "Sat, 20 Jan 2024 10:20:39 +0000") References: <m14jfbg2yj.fsf@HIDDEN> <83cytwtjiw.fsf@HIDDEN> <CALDnm53Z4LppG7AUej2W5qrD_8MyA6YmYvZFFOpK5ULfv62j_w@HIDDEN> Date: Sat, 20 Jan 2024 11:58:25 +0100 Message-ID: <m1edec9sq6.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Jo=C3=A3o T=C3=A1vora <joaotavora@HIDDEN> writes: > On Sat, Jan 20, 2024 at 9:57=E2=80=AFAM Eli Zaretskii <eliz@HIDDEN> wrot= e: >> >> > Date: Wed, 17 Jan 2024 20:44:04 +0100 >> > From: Eshel Yaron via "Bug reports for GNU Emacs, >> > the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN> >> > >> > Tags: patch >> > >> > The new mode line right alignment requires setting `mode-line-format` = to >> > a list that contains (as in `memq`) the symbol >> > `mode-line-format-right-align`. This is a bit brittle, and currently >> > `eldoc-minibuffer-message` modifies `mode-line-format` in a way that >> > happens to break `mode-line-format-right-align`. To see that, set >> > `mode-line-format` to '("" mode-line-format-right-align "foo bar") and >> > then type `M-: (list`. Now ElDoc info appears on the mode line, but >> > "bar" is no longer visible. >> > >> > This patch makes ElDoc modify `mode-line-format` in an equivalent way >> > that avoids messing with `mode-line-format-right-align`. >> >> Thanks. >> >> Jo=C3=A3o, any objections or comments? > > I think it looks good. I just think the patch is a little > too newline friendly, i.e. the if can probably fit in a single > line without reaching 80 columns and it'll make it easier to > read. Yes, it fits nicely. See updated patch below. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=v2-0001-Fix-mode-line-format-right-align-with-ElDoc-Bug-6.patch From 9c69e20ed172a2bfa56056a62077ae1c68b9b979 Mon Sep 17 00:00:00 2001 From: Eshel Yaron <me@HIDDEN> Date: Mon, 1 Jan 2024 22:14:59 +0100 Subject: [PATCH v2] ; Fix 'mode-line-format-right-align' with ElDoc (Bug#68547) * lisp/emacs-lisp/eldoc.el (eldoc-minibuffer-message): Avoid nesting 'mode-line-format', since that breaks 'mode-line-format-right-align'. --- lisp/emacs-lisp/eldoc.el | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el index 06970d40e8a..912a7357ca7 100644 --- a/lisp/emacs-lisp/eldoc.el +++ b/lisp/emacs-lisp/eldoc.el @@ -312,9 +312,11 @@ eldoc-minibuffer-message (not (and (listp mode-line-format) (assq 'eldoc-mode-line-string mode-line-format)))) (setq mode-line-format - (list "" '(eldoc-mode-line-string - (" " eldoc-mode-line-string " ")) - mode-line-format))) + (funcall + (if (listp mode-line-format) #'append #'list) + (list "" '(eldoc-mode-line-string + (" " eldoc-mode-line-string " "))) + mode-line-format))) (setq eldoc-mode-line-string (when (stringp format-string) (apply #'format-message format-string args))) -- 2.42.0 --=-=-=--
X-Loop: help-debbugs@HIDDEN Subject: bug#68547: [PATCH] ; Fix 'mode-line-format-right-align' with ElDoc Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Sat, 20 Jan 2024 12:03:01 +0000 Resent-Message-ID: <handler.68547.B68547.170575213030124 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 68547 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eshel Yaron <me@HIDDEN> Cc: Eli Zaretskii <eliz@HIDDEN>, 68547 <at> debbugs.gnu.org Received: via spool by 68547-submit <at> debbugs.gnu.org id=B68547.170575213030124 (code B ref 68547); Sat, 20 Jan 2024 12:03:01 +0000 Received: (at 68547) by debbugs.gnu.org; 20 Jan 2024 12:02:10 +0000 Received: from localhost ([127.0.0.1]:33095 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1rRA37-0007pR-8s for submit <at> debbugs.gnu.org; Sat, 20 Jan 2024 07:02:10 -0500 Received: from mail-lf1-x12c.google.com ([2a00:1450:4864:20::12c]:57606) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <joaotavora@HIDDEN>) id 1rRA35-0007kw-Ba for 68547 <at> debbugs.gnu.org; Sat, 20 Jan 2024 07:02:08 -0500 Received: by mail-lf1-x12c.google.com with SMTP id 2adb3069b0e04-50e766937ddso1987944e87.3 for <68547 <at> debbugs.gnu.org>; Sat, 20 Jan 2024 04:02:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705752118; x=1706356918; darn=debbugs.gnu.org; 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=W5tYt4hrprHvvuTKGDdRVFPW7TenRME8IJ23alEp2vM=; b=DY6rHwspDBzS/frsFiPGBAQWJQjzgDXMKvdqsBTzoLFSb40VdBVJbmokOFSOgdYhrQ /+kHys9zGnDAJ2kLbffigTdaltXeydryu5yh3EaTjSrnQn6YWu3f0foyQDoPVvUV8fqX UkjCgnFGHg1/zCk9WolRuKm001Lv6jH75rJIqvlQebL9pK9IgUqnFUiu5o1f92LUwXlk 5QGuG9vBmkA49bzIEiIdfyE51+FXVrbyb3Bv78m/6ryvOf23aC3smbkzoL6mcVOVeCCS 1hTVBg+HxQHnOdghAA7iJoDpKbvcOwp7V8Sagn/onuuYdWi3gW8sW3qkiM3DNEOTWLcb F9Kw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705752118; x=1706356918; 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=W5tYt4hrprHvvuTKGDdRVFPW7TenRME8IJ23alEp2vM=; b=msHnb5q2JGOfdR5NSpjp2I9d2on8unPbv1ETLGMRGpnpMIkgv1kWwj/Ub0i27SVzL0 Pktuw6dyTXVhkpaW5PlgiAHHmBITKZNq7zO2YqgiB+bdoeZEn0sC6QPmkzU1JIlmsXl2 eeekC/KTEbHVEO7ot/wYskTpKYqzeeShs/91NVvgvrL47VyGggnCC9V3MFZDkhl/mARd wj7CriAmknueAi5Vq5xk3XSpNBIv0uzpwzBm7eM9Z1pB1B3sLMRTgFRp702FhOLYbCoB 4YL3roXbN1iqGe64GtjnwFbhD7QHoEhapVH1lysXJVl5UYeY7st8yiKd+GjB6WDAMyQP Z5qQ== X-Gm-Message-State: AOJu0Yzswfk+oFAoHcl7FlTeDFoQHsm4WT5jJmfwJxHh18mQy7BoBF0S x/f4ML8nPMv7/3ODfCXTiTGHtnEnbvOTICrxURf1dYZgzv/xL7WXDBpyRa45nfdWGACm/7y3S9Q iLwaY9V34ld0jRVKcMzyBxVal3t8= X-Google-Smtp-Source: AGHT+IE9po3C+sZEFkc/bkIuU5+YzjVc6zRcrEzFQAZfttMmgdzfPqocVRHrMzln2v3vze1iyxr23bSETDjIvAClja8= X-Received: by 2002:a05:6512:550:b0:50e:4bf6:8848 with SMTP id h16-20020a056512055000b0050e4bf68848mr438879lfl.38.1705752118338; Sat, 20 Jan 2024 04:01:58 -0800 (PST) MIME-Version: 1.0 References: <m14jfbg2yj.fsf@HIDDEN> <83cytwtjiw.fsf@HIDDEN> <CALDnm53Z4LppG7AUej2W5qrD_8MyA6YmYvZFFOpK5ULfv62j_w@HIDDEN> <m1edec9sq6.fsf@HIDDEN> In-Reply-To: <m1edec9sq6.fsf@HIDDEN> From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN> Date: Sat, 20 Jan 2024 12:01:46 +0000 Message-ID: <CALDnm50RA9ph-Dm8sWy7vzBm7y_0qqauM4AU6V7iB6FKgxeTXw@HIDDEN> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) On Sat, Jan 20, 2024 at 10:58=E2=80=AFAM Eshel Yaron <me@HIDDEN> wr= ote: > > Jo=C3=A3o T=C3=A1vora <joaotavora@HIDDEN> writes: > > > On Sat, Jan 20, 2024 at 9:57=E2=80=AFAM Eli Zaretskii <eliz@HIDDEN> wr= ote: > >> > >> > Date: Wed, 17 Jan 2024 20:44:04 +0100 > >> > From: Eshel Yaron via "Bug reports for GNU Emacs, > >> > the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN> > >> > > >> > Tags: patch > >> > > >> > The new mode line right alignment requires setting `mode-line-format= ` to > >> > a list that contains (as in `memq`) the symbol > >> > `mode-line-format-right-align`. This is a bit brittle, and currentl= y > >> > `eldoc-minibuffer-message` modifies `mode-line-format` in a way that > >> > happens to break `mode-line-format-right-align`. To see that, set > >> > `mode-line-format` to '("" mode-line-format-right-align "foo bar") a= nd > >> > then type `M-: (list`. Now ElDoc info appears on the mode line, but > >> > "bar" is no longer visible. > >> > > >> > This patch makes ElDoc modify `mode-line-format` in an equivalent wa= y > >> > that avoids messing with `mode-line-format-right-align`. > >> > >> Thanks. > >> > >> Jo=C3=A3o, any objections or comments? > > > > I think it looks good. I just think the patch is a little > > too newline friendly, i.e. the if can probably fit in a single > > line without reaching 80 columns and it'll make it easier to > > read. > > Yes, it fits nicely. See updated patch below. Thanks. I pushed it. I'm going to look at this function though, since I don't I love the logic of destroying any old buffer's mode-line-format and not restoring after the minibuffer is exited.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.