* [Fixed] uneven summary lines
@ 2002-01-10 12:52 Katsumi Yamaoka
2002-01-19 21:26 ` Lars Magne Ingebrigtsen
0 siblings, 1 reply; 7+ messages in thread
From: Katsumi Yamaoka @ 2002-01-10 12:52 UTC (permalink / raw)
Hi,
I am trying to use the following settings in .gnus.el file:
(setq gnus-use-correct-string-widths t)
(setq gnus-summary-line-format
"%C%U%R%z[%5N]%I%S%-60= %(%[%-16,16n%]%)\n")
I expected Gnus shows summary lines orderly as follows:
O. [38006]Is there a new agent bug? [Harry Putnam ]
O. [38007] Re: Is there a new agent bug? [Kai Großjohann ]
O. [38021] Re: Is there a new agent bug? [Harry Putnam ]
O. [38010] Re: Is there a new agent bug? [Paul Stodghill ]
O. [38022] Re: Is there a new agent bug? [Harry Putnam ]
O. [38008]Re: X-Face and depth [Andreas Büsching]
O. [38011] Re: X-Face and depth <Lars Magne Ingeb>
However, authors were not in a column if a subject contains
Japanese wide characters. So, I have modified the function
`gnus-spec-tab' to deal with wide characters when the option
`gnus-use-correct-string-widths' is non-nil, in Gnus CVS.
By the way, why is the default value of
`gnus-use-correct-string-widths' t only for XEmacs?
The value t is fit for me irrespective of the Emacs version, and
nil is fit for people irrespective of the Emacs version, either.
--
Katsumi Yamaoka <yamaoka@jpl.org>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Fixed] uneven summary lines
2002-01-10 12:52 [Fixed] uneven summary lines Katsumi Yamaoka
@ 2002-01-19 21:26 ` Lars Magne Ingebrigtsen
2002-01-20 0:16 ` Daniel Pittman
0 siblings, 1 reply; 7+ messages in thread
From: Lars Magne Ingebrigtsen @ 2002-01-19 21:26 UTC (permalink / raw)
Katsumi Yamaoka <yamaoka@jpl.org> writes:
> By the way, why is the default value of
> `gnus-use-correct-string-widths' t only for XEmacs?
> The value t is fit for me irrespective of the Emacs version, and
> nil is fit for people irrespective of the Emacs version, either.
I thought what we were trying to fix with
`gnus-use-correct-string-widths' was the tendency of `format' under
Emacs and XEmacs to return different lengths.
Emacs:
(length (format "%10s" "你好"))
=> 8
XEmacs:
(length (format "%10s" "你好"))
=> 10
However, there may be other subtle issues in the gnus-spec code that
introduces other problems that `gnus-use-correct-string-widths' fixes,
but my feeling is that these problems are probably bugs in Gnus in the
Emacs case...
I'll do some testing.
--
(domestic pets only, the antidote for overdose, milk.)
larsi@gnus.org * Lars Magne Ingebrigtsen
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Fixed] uneven summary lines
2002-01-19 21:26 ` Lars Magne Ingebrigtsen
@ 2002-01-20 0:16 ` Daniel Pittman
2002-01-20 0:27 ` Lars Magne Ingebrigtsen
0 siblings, 1 reply; 7+ messages in thread
From: Daniel Pittman @ 2002-01-20 0:16 UTC (permalink / raw)
On Sat, 19 Jan 2002, Lars Magne Ingebrigtsen wrote:
> Katsumi Yamaoka <yamaoka@jpl.org> writes:
>
>> By the way, why is the default value of
>> `gnus-use-correct-string-widths' t only for XEmacs?
>> The value t is fit for me irrespective of the Emacs version, and
>> nil is fit for people irrespective of the Emacs version, either.
>
> I thought what we were trying to fix with
> `gnus-use-correct-string-widths' was the tendency of `format' under
> Emacs and XEmacs to return different lengths.
[...]
> However, there may be other subtle issues in the gnus-spec code that
> introduces other problems that `gnus-use-correct-string-widths' fixes,
> but my feeling is that these problems are probably bugs in Gnus in the
> Emacs case...
My recollection, and why the code got written initially, was the
incorrect width used for `cut' forms, pretty much, and for padding in
the summary buffer.
Daniel
--
One likes to believe in the freedom of music,
But glittering prizes and endless compromises
Shatter the illusion of integrity.
-- Rush, _The Spirit of Radio_, 1980
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Fixed] uneven summary lines
2002-01-20 0:16 ` Daniel Pittman
@ 2002-01-20 0:27 ` Lars Magne Ingebrigtsen
2002-01-20 2:11 ` Daniel Pittman
0 siblings, 1 reply; 7+ messages in thread
From: Lars Magne Ingebrigtsen @ 2002-01-20 0:27 UTC (permalink / raw)
Daniel Pittman <daniel@rimspace.net> writes:
> My recollection, and why the code got written initially, was the
> incorrect width used for `cut' forms, pretty much, and for padding in
> the summary buffer.
Let's see...
(length "日本語")
=> 3
(gnus-correct-length "日本語")
=> 6
Indeed. I've now defaulted `gnus-use-correct-string-widths' to t
again.
--
(domestic pets only, the antidote for overdose, milk.)
larsi@gnus.org * Lars Magne Ingebrigtsen
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Fixed] uneven summary lines
2002-01-20 0:27 ` Lars Magne Ingebrigtsen
@ 2002-01-20 2:11 ` Daniel Pittman
2002-01-20 2:23 ` Lars Magne Ingebrigtsen
0 siblings, 1 reply; 7+ messages in thread
From: Daniel Pittman @ 2002-01-20 2:11 UTC (permalink / raw)
On Sun, 20 Jan 2002, Lars Magne Ingebrigtsen wrote:
> Daniel Pittman <daniel@rimspace.net> writes:
>
>> My recollection, and why the code got written initially, was the
>> incorrect width used for `cut' forms, pretty much, and for padding in
>> the summary buffer.
>
> Let's see...
>
> (length "日本語")
> => 3
>
> (gnus-correct-length "日本語")
> => 6
>
> Indeed. I've now defaulted `gnus-use-correct-string-widths' to t
> again.
Things fail if `gnus-use-correct-string-widths' is *not* set (== nil)
under XEmacs. IIRC, Gnus works correctly without that under Emacs,
though.
Anyway, keeping it that way for (featurep 'xemacs), at least, would be
nice.
Daniel
--
The most potent weapon in the hands of the oppressor
is the mind of the oppressed.
-- Steve Biko
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Fixed] uneven summary lines
2002-01-20 2:11 ` Daniel Pittman
@ 2002-01-20 2:23 ` Lars Magne Ingebrigtsen
2002-01-20 10:48 ` Daniel Pittman
0 siblings, 1 reply; 7+ messages in thread
From: Lars Magne Ingebrigtsen @ 2002-01-20 2:23 UTC (permalink / raw)
Daniel Pittman <daniel@rimspace.net> writes:
> Things fail if `gnus-use-correct-string-widths' is *not* set (== nil)
> under XEmacs. IIRC, Gnus works correctly without that under Emacs,
> though.
No -- this is under Emacs:
(length "日本語")
=> 3
This is, of course, correct, although not right for Gnus' purposes.
However:
(string-width "日本語")
=> 6
Which is right. So perhaps I should just conditionalize it to use
`string-width' if that exists and `gnus-use-correct-string-widths' is
not set, and default `gnus-use-correct-string-widths' to `(featurep
'xemacs)' again?
--
(domestic pets only, the antidote for overdose, milk.)
larsi@gnus.org * Lars Magne Ingebrigtsen
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Fixed] uneven summary lines
2002-01-20 2:23 ` Lars Magne Ingebrigtsen
@ 2002-01-20 10:48 ` Daniel Pittman
0 siblings, 0 replies; 7+ messages in thread
From: Daniel Pittman @ 2002-01-20 10:48 UTC (permalink / raw)
On Sun, 20 Jan 2002, Lars Magne Ingebrigtsen wrote:
> Daniel Pittman <daniel@rimspace.net> writes:
>
>> Things fail if `gnus-use-correct-string-widths' is *not* set (== nil)
>> under XEmacs. IIRC, Gnus works correctly without that under Emacs,
>> though.
[...]
> Which is right. So perhaps I should just conditionalize it to use
> `string-width' if that exists and `gnus-use-correct-string-widths' is
> not set, and default `gnus-use-correct-string-widths' to `(featurep
> 'xemacs)' again?
That sounds fine to me, though I should note that the
length/string-width stuff got exactly the same results for me with:
"21.5 (beta4) \"bamboo\" XEmacs Lucid"
Daniel
--
It is easier to build strong children than to repair broken men.
-- Frederick Douglas
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2002-01-20 10:48 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-10 12:52 [Fixed] uneven summary lines Katsumi Yamaoka
2002-01-19 21:26 ` Lars Magne Ingebrigtsen
2002-01-20 0:16 ` Daniel Pittman
2002-01-20 0:27 ` Lars Magne Ingebrigtsen
2002-01-20 2:11 ` Daniel Pittman
2002-01-20 2:23 ` Lars Magne Ingebrigtsen
2002-01-20 10:48 ` Daniel Pittman
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 NNTP newsgroup(s).