From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.bugs Subject: bug#57376: 28.1; rcirc-fill-flag ignored after 27->28 upgrade Date: Thu, 25 Aug 2022 15:34:39 +0000 Message-ID: <871qt4qquo.fsf@posteo.net> References: <87y1vekpyl.fsf@gmail.com> <875yihoofa.fsf@gnus.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17000"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "Trent W. Buck" , 57376@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Aug 25 17:36:05 2022 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 1oREto-0004HW-Hj for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 25 Aug 2022 17:36:04 +0200 Original-Received: from localhost ([::1]:48736 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oREtm-0007Wp-H0 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 25 Aug 2022 11:36:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44498) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oREsq-0007WN-4c for bug-gnu-emacs@gnu.org; Thu, 25 Aug 2022 11:35:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33107) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oREsp-00071N-SV for bug-gnu-emacs@gnu.org; Thu, 25 Aug 2022 11:35:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oREsp-0001X3-OY for bug-gnu-emacs@gnu.org; Thu, 25 Aug 2022 11:35:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 25 Aug 2022 15:35:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57376 X-GNU-PR-Package: emacs Original-Received: via spool by 57376-submit@debbugs.gnu.org id=B57376.16614416925837 (code B ref 57376); Thu, 25 Aug 2022 15:35:03 +0000 Original-Received: (at 57376) by debbugs.gnu.org; 25 Aug 2022 15:34:52 +0000 Original-Received: from localhost ([127.0.0.1]:51085 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oREse-0001W4-DE for submit@debbugs.gnu.org; Thu, 25 Aug 2022 11:34:52 -0400 Original-Received: from mout02.posteo.de ([185.67.36.66]:60135) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oREsb-0001Vp-Ki for 57376@debbugs.gnu.org; Thu, 25 Aug 2022 11:34:51 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 754C9240103 for <57376@debbugs.gnu.org>; Thu, 25 Aug 2022 17:34:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1661441683; bh=d+5U52S1MgzbslmIStHhOY8DGDWx1vNtG6VpXw1AfkQ=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=AYwOP2HLCI7D5agBf3dyVQPtLI0Rgdw/K/ZsadoLYe7IKPVNVJuRmEUMicQw24r2I WlWvwAdSVOT4TCPLu5Ui6A90G5+57Z5CIE3Lc5rbortUhW34XM5uboCTkNdtSSjU+b iJZjAvrRjnzmqzItnysrRPTZzP4D0mF+R5aWRNmAkg+MeALpkPGGMEbfPzQWEF+HsF y+wofkGILDDZemjgfEaBTcxt78fo7TjLHAJcdlAg9Lylr6yTxkQyvDXcwu6iOfSGdD H3w0T4rWakXJtMNFCGg9zsAp416h3lfNtK4JyPkHO14EvA82r0EbnJep8EvgzUAY7C /hRawRJw2+zEQ== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MD6TW6Y1Lz9rxS; Thu, 25 Aug 2022 17:34:39 +0200 (CEST) In-Reply-To: <875yihoofa.fsf@gnus.org> (Lars Ingebrigtsen's message of "Wed, 24 Aug 2022 13:45:29 +0200") Autocrypt: addr=philipk@posteo.net; prefer-encrypt=nopreference; keydata= mDMEYHHqUhYJKwYBBAHaRw8BAQdAp3GdmYJ6tm5McweY6dEvIYIiry+Oz9rU4MH6NHWK0Ee0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiQBBMWCAA4FiEEDM2H44ZoPt9Ms0eHtVrAHPRh1FwFAmBx6lICGwMFCwkIBwIGFQoJ CAsCBBYCAwECHgECF4AACgkQtVrAHPRh1FyTkgEAjlbGPxFchvMbxzAES3r8QLuZgCxeAXunM9gh io0ePtUBALVhh9G6wIoZhl0gUCbQpoN/UJHI08Gm1qDob5zDxnIHuDgEYHHqUhIKKwYBBAGXVQEF AQEHQNcRB+MUimTMqoxxMMUERpOR+Q4b1KgncDZkhrO2ql1tAwEIB4h4BBgWCAAgFiEEDM2H44Zo Pt9Ms0eHtVrAHPRh1FwFAmBx6lICGwwACgkQtVrAHPRh1Fw1JwD/Qo7kvtib8jy7puyWrSv0MeTS g8qIxgoRWJE/KKdkCLEA/jb9b9/g8nnX+UcwHf/4VfKsjExlnND3FrBviXUW6NcB 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" Xref: news.gmane.io gmane.emacs.bugs:240728 Archived-At: --=-=-= Content-Type: text/plain Lars Ingebrigtsen writes: > > "Trent W. Buck" writes: > >> I just upgraded from 1:27.1+1-3.1 to 1:28.1+1-2~bpo11+1.2. >> Now, even though (setq rcirc-fill-flag nil) in my .emacs, >> I am getting hard wrapping. >> >> None of these (evaluated in-buffer with M-:) stopped new messages being >> hard-wrapped at 70 columns: >> >> (setq rcirc-fill-flag nil) >> (auto-fill-mode -1) >> (defun rcirc-markup-fill (x y)) ; nop out this unwanted function >> (defun rcirc-fill-paragraph (&optional x)) ; nop out this unwanted function > > I haven't tested myself, but it seems like the code in this area was > changed by: > > commit 849e71fd83fa8796198035464897bf2f28f6226c > Author: Philip Kaludercic > AuthorDate: Wed Jun 9 17:55:55 2021 +0200 > > Implement server-time extension > > * rcirc.el (rcirc-implemented-capabilities): Add new capability > (rcirc-print): Insert messages in the right position > (rcirc-log): Use right time value > (rcirc-markup-timestamp): Use right time value > > In particular, this: > > - ;; squeeze spaces out of text before rcirc-text > - (fill-region fill-start > - (1- (or (next-single-property-change fill-start > - 'rcirc-text) > - rcirc-prompt-end-marker))) > > was changed to this: > > + ;; squeeze spaces out of text before rcirc-text > + (fill-region (point-min) (point-max)) > > But I don't really know the code well. Adding Philip to the CCs. The code was reduced to (fill-region (point-min) (point-max)) because the updated insertion algorithm narrows the buffer to the message, that doesn't have to be right before the prompt, as the entire point of the patch is that messages can be inserted anywhere, depending on server-time tag. As the comment indicates, the intention is to "squeeze [white]spaces", so a possible fix might be to use `canonically-space-region' instead of `fill-region'? Trent: Could to try to apply this change and see if rcirc behaves the way you would prefer it to? --=-=-= Content-Type: text/plain Content-Disposition: inline diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el index 065398b64a..c9ba9e8364 100644 --- a/lisp/net/rcirc.el +++ b/lisp/net/rcirc.el @@ -1995,7 +1995,7 @@ rcirc-print (propertize "\n" 'hard t)) ;; squeeze spaces out of text before rcirc-text - (fill-region (point-min) (point-max)) + (canonically-space-region (point-min) (point-max)) (goto-char (or (next-single-property-change (point-min) 'rcirc-text) (point))) --=-=-=--