GNU bug report logs - #51969
29.0.50; Add command for refilling ERC buffers

Previous Next

Package: emacs;

Reported by: "J.P." <jp <at> neverwas.me>

Date: Fri, 19 Nov 2021 10:41:01 UTC

Severity: wishlist

Tags: patch

Found in version 29.0.50

Done: "J.P." <jp <at> neverwas.me>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 51969 in the body.
You can then email your comments to 51969 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#51969; Package emacs. (Fri, 19 Nov 2021 10:41:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to "J.P." <jp <at> neverwas.me>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 19 Nov 2021 10:41:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "J.P." <jp <at> neverwas.me>
To: bug-gnu-emacs <at> gnu.org
Cc: emacs-erc <at> gnu.org
Subject: 29.0.50; Add command for refilling ERC buffers
Date: Fri, 19 Nov 2021 02:39:50 -0800
[Message part 1 (text/plain, inline)]
Tags: patch

A recent bug entitled

  bug#51841: 27.2; erc-insert-marker has no value

(opened by Libera user Bost) was in part brought about by confusion over
whether ERC already offered this feature and perhaps applied it during
major-mode setup. While I don't think erc-stamp and erc-fill currently
provide sufficient support to rig up automated refilling in a reliable
way (on window configuration change, for example), I agree that some
means of doing so manually might occasionally come in handy.

A related issue concerns the purpose and treatment of the option
`erc-fill-prefix'. This one's a mystery to me and seems to have little
meaningful bearing on anything. It does make an appearance in
erc-button.el, but to what end I'm not entirely certain. Like a few
other puzzlers, it was present in much the same form back when ERC was
first ported to ye old CVS some twenty years ago (almost to the day)
[1]. Anyway, I will continue to investigate this. Thanks.


[1] https://gitlab.com/jpneverwas/og-erc/-/commit/9a819366bdf8a6f5a304916baa2d6a501eb3987b#4042b2fc4c564fbd556343d1ed666da630f85951_0_97

In GNU Emacs 29.0.50 (build 1, x86_64-redhat-linux-gnu, GTK+ Version 3.24.30, cairo version 1.17.4)
 of 2021-11-18 built on localhost
Repository revision: 69f1bc43c026049ed2aab6a6368e2e9a5406b779
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12011000
System Description: Fedora 34 (Workstation Edition)

Configured using:
 'configure --enable-check-lisp-object-type --enable-checking=yes,glyphs
 --build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu
 --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin
 --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share
 --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec
 --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man
 --infodir=/usr/share/info --with-dbus --with-gif --with-jpeg --with-png
 --with-rsvg --with-tiff --with-xft --with-xpm --with-x-toolkit=gtk3
 --with-gpm=no --with-xwidgets --with-modules --with-harfbuzz
 --with-cairo --with-json build_alias=x86_64-redhat-linux-gnu
 host_alias=x86_64-redhat-linux-gnu CC=gcc 'CFLAGS=-O0 -g3'
 LDFLAGS=-Wl,-z,relro
 PKG_CONFIG_PATH=:/usr/lib64/pkgconfig:/usr/share/pkgconfig'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON
LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY
INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS
WEBP X11 XDBE XIM XPM XWIDGETS GTK3 ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message mailcap yank-media rmc puny
dired dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068
epg-config gnus-util rmail rmail-loaddefs auth-source cl-seq eieio
eieio-core cl-macs eieio-loaddefs password-cache json map
text-property-search time-date seq gv subr-x byte-opt bytecomp
byte-compile cconv mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util mail-prsvr mail-utils help-mode cl-loaddefs cl-lib iso-transl
tooltip eldoc paren electric uniquify ediff-hook vc-hooks
lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd
tool-bar dnd fontset image regexp-opt fringe tabulated-list replace
newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar
rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock
font-lock syntax font-core term/tty-colors frame minibuffer cl-generic
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite emoji-zwj charscript
charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray
cl-preloaded nadvice button loaddefs faces cus-face macroexp files
window text-properties overlay sha1 md5 base64 format env code-pages
mule custom widget keymap hashtable-print-readable backquote threads
xwidget-internal dbusbind inotify lcms2 dynamic-setting
system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit
x multi-tty make-network-process emacs)

Memory information:
((conses 16 53474 6237)
 (symbols 48 6794 1)
 (strings 32 19269 1625)
 (string-bytes 1 642335)
 (vectors 16 14025)
 (vector-slots 8 189932 12509)
 (floats 8 22 37)
 (intervals 56 262 0)
 (buffers 992 10))
[0001-Add-command-to-refill-ERC-buffers.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51969; Package emacs. (Sat, 20 Nov 2021 04:13:02 GMT) Full text and rfc822 format available.

Message #8 received at 51969 <at> debbugs.gnu.org (full text, mbox):

From: "J.P." <jp <at> neverwas.me>
To: 51969 <at> debbugs.gnu.org
Cc: emacs-erc <at> gnu.org
Subject: Re: bug#51969: 29.0.50; Add command for refilling ERC buffers
Date: Fri, 19 Nov 2021 20:12:13 -0800
[Message part 1 (text/plain, inline)]
Addressed some erroneous line folding involving wide chars. But bugs
likely remain.

[0000-v2-v3.diff (text/x-patch, attachment)]
[0001-Add-command-to-refill-ERC-buffers.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51969; Package emacs. (Wed, 24 Nov 2021 13:39:01 GMT) Full text and rfc822 format available.

Message #11 received at 51969 <at> debbugs.gnu.org (full text, mbox):

From: "J.P." <jp <at> neverwas.me>
To: 51969 <at> debbugs.gnu.org
Cc: emacs-erc <at> gnu.org
Subject: Re: bug#51969: 29.0.50; Add command for refilling ERC buffers
Date: Wed, 24 Nov 2021 05:38:23 -0800
[Message part 1 (text/plain, inline)]
v4. Removed hack to get at stored timestamp.

TODO:
- preserve white space when filling (treat text as preformatted)
- ensure jobs can be canceled with impunity
- try with non-Latin alphabets, uncommon characters, etc.

[0000-v3-v4.diff (text/x-patch, attachment)]
[0001-Remove-timestamp-from-erc-stamp-sensor-function.patch (text/x-patch, attachment)]
[0002-Add-command-to-refill-ERC-buffers.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51969; Package emacs. (Mon, 29 Nov 2021 13:10:02 GMT) Full text and rfc822 format available.

Message #14 received at 51969 <at> debbugs.gnu.org (full text, mbox):

From: "J.P." <jp <at> neverwas.me>
To: 51969 <at> debbugs.gnu.org
Cc: emacs-erc <at> gnu.org
Subject: Re: bug#51969: 29.0.50; Add command for refilling ERC buffers
Date: Mon, 29 Nov 2021 05:09:10 -0800
[Message part 1 (text/plain, inline)]
v5. Fixed a few oversights, but others undoubtedly remain.

If we're serious about preserving a message's original white space, then
various details related to filling and indenting still need hammering
out. And if that ultimately involves tampering with the two existing
fill functions (and such a prospect proves sufficiently unpopular), we
could always try adding dedicated variants that preserve original
spacing as their thing. It's also possible that such additions may end
up needing companions to unfill in their particular style.

But progress on these and other fronts will have to wait (unless someone
else wants to have a go) because this feature remains among ERC's lowest
priorities, ATM (IMO).

(Also, the undo situation is yet unexplored.)

[0000-v4-v5.patch (text/x-patch, attachment)]
[0001-Remove-timestamp-from-erc-stamp-sensor-function.patch (text/x-patch, attachment)]
[0002-Make-some-erc-stamp-functions-more-limber.patch (text/x-patch, attachment)]
[0003-Add-command-to-refill-ERC-buffers.patch (text/x-patch, attachment)]

Severity set to 'wishlist' from 'normal' Request was from Stefan Kangas <stefan <at> marxist.se> to control <at> debbugs.gnu.org. (Mon, 06 Dec 2021 01:43:02 GMT) Full text and rfc822 format available.

Reply sent to "J.P." <jp <at> neverwas.me>:
You have taken responsibility. (Mon, 22 May 2023 04:17:01 GMT) Full text and rfc822 format available.

Notification sent to "J.P." <jp <at> neverwas.me>:
bug acknowledged by developer. (Mon, 22 May 2023 04:17:02 GMT) Full text and rfc822 format available.

Message #21 received at 51969-done <at> debbugs.gnu.org (full text, mbox):

From: "J.P." <jp <at> neverwas.me>
To: 51969-done <at> debbugs.gnu.org
Cc: emacs-erc <at> gnu.org
Subject: Re: bug#51969: 29.0.50; Add command for refilling ERC buffers
Date: Sun, 21 May 2023 21:16:40 -0700
The need for such a command has probably dwindled with the arrival of
`erc-fill-wrap' (bug#60936). That said, it would still be nice to have a
way to refill an entire buffer, which can help when

  - switching between legacy fill styles
  - toggling `truncate-lines' to read pre-formatted text
  - recovering from a mishap

OTOH, it might not be easily achievable because other hooks that run
alongside `erc-fill' sometimes perform additional formatting. And it
doesn't seem like a module's place to be managing the membership and
ordering of hooks it doesn't own (beyond subscribing/unsubscribing).

Anyway, I'm closing this for no specific reason (call it lack of
initiative).




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 19 Jun 2023 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 283 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.