From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#64535: 30.0.50; Spurious newlines in `prin1` output Date: Fri, 14 Jul 2023 10:46:28 -0400 Message-ID: References: <83v8etbrhe.fsf@gnu.org> <83cz0ufwan.fsf@gnu.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10460"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 64535@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jul 14 16:47:23 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 1qKK4o-0002Rz-RC for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 14 Jul 2023 16:47:23 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qKK4W-0002Fv-NF; Fri, 14 Jul 2023 10:47:04 -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 1qKK4V-0002FZ-4R for bug-gnu-emacs@gnu.org; Fri, 14 Jul 2023 10:47:03 -0400 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 1qKK4U-00024N-SK for bug-gnu-emacs@gnu.org; Fri, 14 Jul 2023 10:47:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qKK4U-0003db-Do for bug-gnu-emacs@gnu.org; Fri, 14 Jul 2023 10:47:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 14 Jul 2023 14:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64535 X-GNU-PR-Package: emacs Original-Received: via spool by 64535-submit@debbugs.gnu.org id=B64535.168934600413952 (code B ref 64535); Fri, 14 Jul 2023 14:47:02 +0000 Original-Received: (at 64535) by debbugs.gnu.org; 14 Jul 2023 14:46:44 +0000 Original-Received: from localhost ([127.0.0.1]:43193 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qKK45-0003co-Nf for submit@debbugs.gnu.org; Fri, 14 Jul 2023 10:46:44 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:65477) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qKK43-0003ca-LE for 64535@debbugs.gnu.org; Fri, 14 Jul 2023 10:46:36 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 60566806BB; Fri, 14 Jul 2023 10:46:30 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 142C58065C; Fri, 14 Jul 2023 10:46:29 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1689345989; bh=kJPlR7J5LQ054TaWV/auP//zlQGx7KK9ODkK2BEDvk4=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=LTHUhcgtsNnRUgOW1xwt7VkL37HOJLK2PESL3VYd8LHe5KYoOO0cNejCKbdlufLJ5 gjyjJnw9pM3LjhKlynLMLx79zz6y09kZ8fkT94suDci8mwabzeFKnJsspQbMVR4ZGY ZukK2nZhF7TjwT8ps+GtGym+ks0UjzkWBf7Kk55f/9jUqkrWW7WlbGbcFxJ+okMVTL 6pPRbzlc44aVy0TV6SIK2qIqUjQFqoPd0pL/v5cUrsoIHVAaCTcK8JIr2KrMKvek9o TF8XV8xM4YdfUaJ7I/G4jYOybaMBF0NYNz4R+0LnL4Mbt6f10dSMAIWN1D6GX89MLi vY5zUCzCoKQ0Q== Original-Received: from pastel (unknown [104.247.239.133]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id E21F01201F0; Fri, 14 Jul 2023 10:46:28 -0400 (EDT) In-Reply-To: <83cz0ufwan.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 14 Jul 2023 16:38:08 +0300") 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:265100 Archived-At: >> That means we'd keep the code and make it even larger. > The second item, maybe. What about the first -- is bug#2866 solved by > long-line handling in Emacs 29? In my tests, yes. >> > IOW, I don't want us to bring back regressions as result of >> > this cleanup. >> That wouldn't be a cleanup, then. IOW you're asking me to make the >> quirk even bigger. I'd rather keep the quirk as-is, in that case. > Sorry, I don't understand: what was the reason for you to start this > discussion? IOW, why is it good to get rid of the code which inserts > those newlines? Because it's a wart. > I can suggest another solution: remove that code, but make sure > long-line-threshold is reset to its default value locally in the > buffer where prin1 is producing its output? Would that be more > acceptable? Bug#2866 fundamentally had nothing to do with `prin1`. It was just another instance of "Emacs freezes when encountering a long line". The patch installed back then fixed the problem for one particular (and quite uncommon) way to end up with a long line. There are millions more ways to get that result, as you know, many of them much more common. The only thing special about Bug#2866 is that it happened to be a case where the long line was generated by our own code and where Handa bothered to write a hack that kinda worked around the problem, leaving all the many other ways to walk into that problem just as opened as before. We now have a general way to solve the problem. I don't think it's always absolutely perfect, but it's definitely good enough that we can get rid of this odd hack. And those user who set `long-line-threshold` to nil *and* happen to reproduce just the recipe in Bug#2866 would get what they ask for, IMO. Stefan