From: "J.P." <jp@neverwas.me>
To: Olivier Certner <olivier.certner@free.fr>
Cc: 44140@debbugs.gnu.org, emacs-erc@gnu.org
Subject: 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 [thread overview]
Message-ID: <87czsv4c62.fsf__41266.4964956761$1623231157$gmane$org@neverwas.me> (raw)
In-Reply-To: <87v96n61xu.fsf@neverwas.me> (J. P.'s message of "Tue, 08 Jun 2021 22:29:17 -0700")
"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.
next prev parent reply other threads:[~2021-06-09 9:31 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-22 13:25 bug#44140: 26.3; ERC stamps: Really use latest buffer's window's width prior to `fill-column' Olivier Certner
2020-10-22 15:22 ` bug#44140: Patch Olivier Certner
2021-06-09 3:56 ` bug#44140: 26.3; ERC stamps: Really use latest buffer's window's width prior to `fill-column' J.P.
2021-06-09 5:29 ` J.P.
[not found] ` <87v96n61xu.fsf@neverwas.me>
2021-06-09 9:31 ` J.P. [this message]
2021-07-06 12:09 ` bug#44140: Updated patch Olivier Certner
2021-08-06 5:28 ` bug#44140: 26.3; ERC stamps: Really use latest buffer's window's width prior to `fill-column' Amin Bandali
[not found] ` <87bl8f7ktf.fsf@neverwas.me>
2021-07-06 15:15 ` Olivier Certner
2021-07-07 12:28 ` J.P.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='87czsv4c62.fsf__41266.4964956761$1623231157$gmane$org@neverwas.me' \
--to=jp@neverwas.me \
--cc=44140@debbugs.gnu.org \
--cc=emacs-erc@gnu.org \
--cc=olivier.certner@free.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).