emacs-erc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bug#44140: 26.3; ERC stamps: Really use latest buffer's window's wid


From: J.P.
Subject: Re: bug#44140: 26.3; ERC stamps: Really use latest buffer's window's width prior to `fill-column'
Date: Wed, 09 Jun 2021 02:31:17 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

"J.P." <jp@neverwas.me> writes:

> Actually, you'd probably have to include that silly gap variable I added

As well as something like

  @@ -303,12 +298,8 @@ erc-insert-timestamp-right
         ;; some margin of error if what is displayed on the line differs
         ;; from the number of characters on the line.
         (setq col (+ col (ceiling (/ (- col (- (point) (point-at-bol))) 1.6))))
  -      (if (< col pos)
  -         (erc-insert-aligned string pos)
  -       (newline)
  -       (indent-to pos)
  -       (setq from (point))
  -       (insert string))
  +      (when (>= col (- pos erc-timestamp-align-to-gap)) (newline))
  +      (erc-insert-aligned string (unless erc-timestamp-last-window-width 
pos))
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         (erc-put-text-property from (point) 'field 'erc-timestamp)
         (erc-put-text-property from (point) 'rear-nonsticky t)
         (when erc-timestamp-intangible

to honor existing behavior when erc-fill-mode is active. (As well as
other common-sense stuff I'm surely missing.)

It also strikes me that some 'fill users might prefer only having
`erc-fill-mode' affect message text while having timestamps instead
aligned to a window's width. So, yet another option could be added to
make something like that a reality if you think there'd be sufficient
demand.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]