From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#75020: [PATCH] Fix make-separator-line for ttys not supporting underline Date: Sun, 22 Dec 2024 10:22:02 +0200 Message-ID: <8634ig6sb9.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38731"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 75020@debbugs.gnu.org To: Gerd =?UTF-8?Q?M=C3=B6llmann?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Dec 22 09:23:17 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 1tPHF7-0009wi-Dj for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 22 Dec 2024 09:23:17 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tPHEu-0003oN-Kx; Sun, 22 Dec 2024 03:23: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 1tPHEs-0003o6-UL for bug-gnu-emacs@gnu.org; Sun, 22 Dec 2024 03:23:03 -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 1tPHEs-0006cS-MH for bug-gnu-emacs@gnu.org; Sun, 22 Dec 2024 03:23:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-version:References:In-Reply-To:From:Date:To:Subject; bh=vZHx32gv9Eb37HI+vIgKVLJtIJoS+Bg9WTqGBSu3Qws=; b=JK/FE+mTLIrRa1btBumg7D/KVW8o079AbF1ESYlA/gdW3EAqP9QrQ2ioDvcB0hhrwUZzw3bCsDQXo9THk38njcGh3Z+8cqwk4TbdNBDPkMB5tbXQFo939w18RajH6eyzy/ZZmHxcm355BUSJVup3Uy1Bl2dduVjuVLrDPaVhpFiRS4zY+Ubk3XGb2gY/QlcMXLONdkcFWYOduIJaQcPtRj9oeKr8UgdLan7A4GYhCj8irYfOyO2IRmsyMngUynYlZuTjJSr5f61Y4O4wgiLWaUy7tB/aB9QaQnGgXpRCvukrrjKXeMnG7yY4ISpzCiw4KMJ+/t3lnV7sMF+vJ1l6gg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tPHEs-0006Fp-7V for bug-gnu-emacs@gnu.org; Sun, 22 Dec 2024 03:23:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 22 Dec 2024 08:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75020 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 75020-submit@debbugs.gnu.org id=B75020.173485573223970 (code B ref 75020); Sun, 22 Dec 2024 08:23:02 +0000 Original-Received: (at 75020) by debbugs.gnu.org; 22 Dec 2024 08:22:12 +0000 Original-Received: from localhost ([127.0.0.1]:48929 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tPHE4-0006EY-I0 for submit@debbugs.gnu.org; Sun, 22 Dec 2024 03:22:12 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:42590) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tPHE2-0006EH-VT for 75020@debbugs.gnu.org; Sun, 22 Dec 2024 03:22:11 -0500 Original-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 1tPHDx-0006Rb-Bn; Sun, 22 Dec 2024 03:22:05 -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=vZHx32gv9Eb37HI+vIgKVLJtIJoS+Bg9WTqGBSu3Qws=; b=D5RPuPi8MTJj+E0F+2hE t9Rd4Amj24tfYrGHg/LOK1jAu9BRY1r8byPq5nagzDuV8UNge9yNdD7gPeg4pBTJi35OrM9loECmL syzJw8kOF+5qYTqFnia7rpzOUkRYKn6+SuBW98ZS7b7HcD/V//nUJ+YkUu1vbSwSMcuK27xP9mo2N YQfig9R4LqsLDApulg89emCsKbV21Ffo1aS9uBLbyBoyWm0klhImjcV6fDDRuRrcu3oZx1ANuprcp YOyqscaebsRY3DKmvJUvdIBmcy2DV/XPEpCoC0pHiXo54u5auHCVhJk6kknzCERRBQSFlnj1ywtJr cdswSn2bssWqBA==; In-Reply-To: (message from Gerd =?UTF-8?Q?M=C3=B6llmann?= on Sun, 22 Dec 2024 08:43:14 +0100) 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:297581 Archived-At: > From: Gerd Möllmann > Date: Sun, 22 Dec 2024 08:43:14 +0100 > > To reproduce, emacs -nw -Q on a terminal not supporting underlining (in > my case Terminal.app on macOS). > > - M-x display-line-number-mode RET > - Eval (insert (amke-separator-line)) > > => the separator line is too long > > Attached patch fixes that. Thanks. But I'm not sure this is for make-separator-line to decide. For example, after applying the patch, using this recipe: M-: (insert (make-separator-line)) RET M-x display-line-number-mode RET we will again get a too-long separator line. And with this recipe: M-x display-line-number-mode RET M-: (insert (make-separator-line)) RET M-x display-line-number-mode RET we will get a too-short separator line. So arguably, in these special cases, the caller should pass the required length as the optional argument, because only the caller knows the context in which the function is called and the purpose for which the separator will be used. Which would mean the default of using window-width is correct. Does this make sense?