all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#44140: 26.3; ERC stamps: Really use latest buffer's window's width prior to `fill-column'
@ 2020-10-22 13:25 Olivier Certner
  2020-10-22 15:22 ` bug#44140: Patch Olivier Certner
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Olivier Certner @ 2020-10-22 13:25 UTC (permalink / raw)
  To: 44140

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







^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-08-06  5:28 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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.
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.

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.