emacs-bug-tracker
[Top][All Lists]
Advanced

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

bug#44140: closed (26.3; ERC stamps: Really use latest buffer's window's


From: GNU bug Tracking System
Subject: bug#44140: closed (26.3; ERC stamps: Really use latest buffer's window's width prior to `fill-column')
Date: Fri, 06 Aug 2021 05:31:02 +0000

Your message dated Fri, 06 Aug 2021 01:28:55 -0400
with message-id <87im0j6t0o.fsf_-_@gnu.org>
and subject line Re: bug#44140: 26.3; ERC stamps: Really use latest buffer's 
window's width prior to `fill-column'
has caused the debbugs.gnu.org bug report #44140,
regarding 26.3; ERC stamps: Really use latest buffer's window's width prior to 
`fill-column'
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
44140: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=44140
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: 26.3; ERC stamps: Really use latest buffer's window's width prior to `fill-column' Date: Thu, 22 Oct 2020 15:25:40 +0200
Applies to 26.3, but also all more recent versions as well.

Bug trigger:
1. Load ERC (e.g., open some IRC connection).
2. In some ERC buffer, deactivate ERC fill mode (if not deactivated
globally in your configuration), e.g., M-x erc-fill-mode.
3. Notice that `fill-column' (if non-nil; if nil, set it temporarily to
some small value, e.g., 40, to see the effect) will be used in this
case, contrary to what the documentation of `erc-insert-timestamp-right'
says (window's width is supposed to be used in priority when
erc-fill-mode is not activated).
4. Set `fill-column' to nil. Then, move to another window selecting
another buffer, whose size is visibly smaller. Wait for messages to
arrive in the ERC buffer and observe the timestamp position: It is
relative to the currently selected window's width!

Root causes:
1. Precedence of window's width over `fill-column' not implemented,
contrary to what the documentation states, which makes much more sense.
2. `window-width' is called to obtain window's width, but this gets the
width of the selected window, which is not necessarily where the buffer
is actually displayed. Moreover, the buffer may not be displayed at the
moment, so some other fallback is necessary.

Patch:
To be attached shortly after bug creation.

-- 
Olivier Certner





--- End Message ---
--- Begin Message --- Subject: Re: bug#44140: 26.3; ERC stamps: Really use latest buffer's window's width prior to `fill-column' Date: Fri, 06 Aug 2021 01:28:55 -0400 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
Hi Olivier, J.P.,

Olivier Certner writes:

> Patch slightly edited (commit message, doc text) and rebased on top of a 
> recent 'master'. Ready to apply. Easy to backport to 27 as well.

Thanks for the patch(es) and discussion.  Applied to emacs-27.


--- End Message ---

reply via email to

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