GNU bug report logs -
#57376
28.1; rcirc-fill-flag ignored after 27->28 upgrade
Previous Next
Reported by: "Trent W. Buck" <trentbuck <at> gmail.com>
Date: Wed, 24 Aug 2022 08:27:01 UTC
Severity: normal
Tags: moreinfo
Found in version 28.1
Done: Philip Kaludercic <philipk <at> posteo.net>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Lars Ingebrigtsen <larsi <at> gnus.org> writes:
>
> "Trent W. Buck" <trentbuck <at> gmail.com> 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 <philipk <at> posteo.net>
> 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?
[Message part 2 (text/plain, 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)))
This bug report was last modified 2 years and 227 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.