all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#33232: `gnus-summary-line-format' padding doesn’t work in gui when there are multiple-column-width characters
@ 2018-11-01 21:58 Garreau, Alexandre
  2018-11-01 22:52 ` Eric Abrahamsen
  2019-06-22 13:19 ` Lars Ingebrigtsen
  0 siblings, 2 replies; 9+ messages in thread
From: Garreau, Alexandre @ 2018-11-01 21:58 UTC (permalink / raw)
  To: 33232

Given this (rectangular) excerpt from my bug-gnu-emacs summary:
> …01-nov…[-> 33224@debbugs.gnu.org        ] bug#33224: `message-simpli…
> …01-nov…[Noam Postavsky                  ] bug#33225: [debbugs.el] Do…
> …01-nov…[-> Noam Postavsky               ]  bug#33225: [debbugs.el] D…
> …01-nov…[積丹尼 Dan Jacobson             ] bug#33226: chromium, firef…

On my system (Debian, with Xorg, i3, GUI Emacs), the last line has its
“]” sooner than the others.  This is because `gnus-correct-length'
(along with `char-width') says each of the first three characters is
two-columns wide: but under GUI, this is untrue, as these three
collectively form exactely 5 columns (and not six, as would calculate
`gnus-correct-length').

You can check that by eval’ing:
> (window-text-pixel-size nil (- (point) 593) (- (point) 588))
> (window-text-pixel-size nil (- (point) 583) (- (point) 580))
which return the width of the three first characters after “[” in the
two last summary lines.

According `gnus-correct-length' they’r the same size:
> (gnus-correct-length "[積丹尼 Dan Jacobson             ]")
> (gnus-correct-length "[-> Noam Postavsky               ]")

According `char-width' the fact each character is considered to have a
width which is a multiple of the others makes them the same size:
> (mapcar #'char-width "[積丹尼 Dan Jacobson             ]")
> (mapcar #'char-width "[-> Noam Postavsky               ]")

So would it be better to get gnus-correct-length keep returning a column
number but as a float to be somewhat compatible? or working with pixels
when operating in a GUI frame? but how would padding, which is said to
be in numbers of column, operate then?

or should it stay with a behavior that works in terminal but breaks in
gui?

I’m reporting this at least for archive, in case someone have an idea.
But I’m not sure the solution is that trivial.

Gnus v5.13
GNU Emacs 25.1.1 (i686-pc-linux-gnu, GTK+ Version 3.22.11)
 of 2017-09-15, modified by Debian





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

end of thread, other threads:[~2019-06-22 13:19 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-01 21:58 bug#33232: `gnus-summary-line-format' padding doesn’t work in gui when there are multiple-column-width characters Garreau, Alexandre
2018-11-01 22:52 ` Eric Abrahamsen
2018-11-01 23:26   ` Noam Postavsky
2018-11-01 23:52     ` Eric Abrahamsen
2018-11-02  6:36       ` Eli Zaretskii
2018-11-02 19:15         ` Eric Abrahamsen
2018-11-02  6:43       ` Eli Zaretskii
2018-11-02  6:42   ` Eli Zaretskii
2019-06-22 13:19 ` Lars Ingebrigtsen

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.