Re: bug#60936: 30.0.50; ERC >5.5: Add erc-fill style based on visual-line-mode

"J.P." <[email protected]>
Newsgroups gmane.emacs.erc.general
Message-ID <[email protected]>
"J.P." <[email protected]> writes:

> The following commit introduced a regression:
>
>   commit 05f6fdb9e7893329baff675bd31fb36ad64c756d
>   Author: F. Jason Park <[email protected]>
>
> [...]
>
> The attached patch fixes the regression and changes the behavior to
> redraw the prompt on every incoming message as well, but only when
> `erc-prompt' is a function.

I've added this as

  commit 4f93c52f7fd1b7c5f75a0d049e5a1015a268265a
  
      Recompute erc-prompt when inserting messages
      
   lisp/erc/erc.el            | 16 ++++++++++--
   test/lisp/erc/erc-tests.el | 99 +++++++++++++++++++++++++++++++++++++++
   2 files changed, 113 insertions(+), 2 deletions(-)

along with

  commit 31a80f61ec03bcbb79720c0dc640272aba160865 (origin/master)
  
      Preserve prompt in erc-cmd-CLEAR
      
   etc/ERC-NEWS                       |  11 ++++
   lisp/erc/erc-log.el                |  17 ++++--
   lisp/erc/erc-stamp.el              |  16 +++++
   lisp/erc/erc-truncate.el           |  21 +++----
   lisp/erc/erc.el                    |   9 ++-
   test/lisp/erc/erc-scenarios-log.el | 207 ++++++++++++++++++++++++++++++
   6 files changed, 264 insertions(+), 17 deletions(-)

which fixes a bug affecting the /CLEAR command. It was introduced by

  05f6fdb9e78 "Preserve ERC prompt and its bounding markers"

and pointed out by incal on IRC. Some background:

For almost two decades, `erc-cmd-CLEAR' was simply defined as

  (recenter 0)

However, in 2019, it was changed to destructively truncate the current
buffer, something traditionally (though perhaps inadequately) provided
by the command `erc-save-buffer-in-logs' in concert with the option
`erc-truncate-buffer-on-save'. It happens that 05f6fdb9e78 "Preserve"
also introduced a regression affecting the latter option, which has
always suffered from an awkward implementation and insufficient
documentation (and, consequently, poor discoverability). In addition to
restoring its functionality, I've also deprecated it because of the
inherent confusion surrounding its usage and, to a lesser degree,
because it's redundant (/CLEAR now does the exact same thing). If anyone
thinks this rash or unwarranted, please say so. Thanks.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.