unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#37655: 27.0.50; reversing `gnus-thread-sort-by-most-recent-date' does not work properly
@ 2019-10-08  5:02 Hong Xu
  2019-10-09 18:55 ` Eric Abrahamsen
  2019-10-28 15:04 ` Lars Ingebrigtsen
  0 siblings, 2 replies; 9+ messages in thread
From: Hong Xu @ 2019-10-08  5:02 UTC (permalink / raw)
  To: 37655, larsi

Reversing `gnus-thread-sort-by-most-recent-date' does not seem to work properly.

To reproduce:

Download the test mbox file from here: https://lists.gnu.org/archive/mbox/bug-gnu-emacs/2000-10 and save it as 2000-10.mbox.

Start Emacs with "-Q", and evaluate the following:

	;; Latest at bottom
	(setq gnus-thread-sort-functions
	      '((not gnus-thread-sort-by-most-recent-date)))

	(setq gnus-summary-line-format "%U%R%z %(%&user-date;  %-15,15f  %B %s%)\n")

`M-x gnus', followed by `G f /path/to/2000-10.mbox'. There is only one topic. Type `C-u Enter'.

The summary buffer is supposed to sort the messages in reversed most recent date order in each thread, but a lot of non-compliance can be observed. For instance:

     Oct 02 2000  wm08894@educ.cc  >  (no subject)
     Oct 12 2000  fujyama yuu        \->
     Oct 05 2000  bigsuma@home.co   Repost PLEASE HELP or reply!!! please  :)
     Oct 05 2000  Stefan Reichör    Docstring for kill-line not complete


The ``(no subject)'' thread's latest mail is on Oct 12, but ``Docstring for kill-line not complete'' on Oct 05 is positioned after that.

In GNU Emacs 27.0.50 (build 5, x86_64-pc-linux-gnu, GTK+ Version 3.24.5)
  of 2019-10-07 built on home
Repository revision: 32a67a5cfbfb92a9f76a5caf1c4b84beffcb1d9e
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12004000
System Description: Debian GNU/Linux 10 (buster)

Configured using:
  'configure --with-modules --with-xwidgets
  --prefix=/home/hong/.local/opt/emacs/
  '--program-transform-name=s/^ctags$/ctags.emacs/' --with-mailutils
  'CFLAGS=-march=native -O3''

Configured features:
XPM JPEG TIFF GIF PNG SOUND DBUS GSETTINGS GLIB NOTIFY INOTIFY
LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ XFT ZLIB TOOLKIT_SCROLL_BARS
GTK3 X11 XDBE XIM MODULES THREADS XWIDGETS PDUMPER GMP

Important settings:
   value of $LANG: en_US.UTF-8
   value of $XMODIFIERS: @im=fcitx
   locale-coding-system: utf-8-unix







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

* bug#37655: 27.0.50; reversing `gnus-thread-sort-by-most-recent-date' does not work properly
  2019-10-08  5:02 bug#37655: 27.0.50; reversing `gnus-thread-sort-by-most-recent-date' does not work properly Hong Xu
@ 2019-10-09 18:55 ` Eric Abrahamsen
  2019-10-09 20:44   ` Hong Xu
  2019-10-28 15:04 ` Lars Ingebrigtsen
  1 sibling, 1 reply; 9+ messages in thread
From: Eric Abrahamsen @ 2019-10-09 18:55 UTC (permalink / raw)
  To: Hong Xu; +Cc: 37655, larsi

Hong Xu <hong@topbug.net> writes:

> Reversing `gnus-thread-sort-by-most-recent-date' does not seem to work properly.
>
> To reproduce:
>
> Download the test mbox file from here: https://lists.gnu.org/archive/mbox/bug-gnu-emacs/2000-10 and save it as 2000-10.mbox.
>
> Start Emacs with "-Q", and evaluate the following:
>
> 	;; Latest at bottom
> 	(setq gnus-thread-sort-functions
> 	      '((not gnus-thread-sort-by-most-recent-date)))
>
> 	(setq gnus-summary-line-format "%U%R%z %(%&user-date;  %-15,15f  %B %s%)\n")
>
> `M-x gnus', followed by `G f /path/to/2000-10.mbox'. There is only one topic. Type `C-u Enter'.
>
> The summary buffer is supposed to sort the messages in reversed most recent date order in each thread, but a lot of non-compliance can be observed. For instance:
>
>     Oct 02 2000  wm08894@educ.cc  >  (no subject)
>     Oct 12 2000  fujyama yuu        \->
>     Oct 05 2000  bigsuma@home.co   Repost PLEASE HELP or reply!!! please  :)
>     Oct 05 2000  Stefan Reichör    Docstring for kill-line not complete
>
>
> The ``(no subject)'' thread's latest mail is on Oct 12, but ``Docstring for kill-line not complete'' on Oct 05 is positioned after that.

I can reproduce this, but oddly it only seems to have gone wrong for
that one thread -- all the other threads in the mailbox seem to be
sorted correctly. I also note that the Summary buffer displays the date
of both messages in the thread as one day earlier than the Date header
in the message itself. So I wonder if there's just something weird about
one or both of the messages that's causing Gnus to handle the date
incorrectly.

When I have a bit more time I'll try to figure out what date Gnus is
trying to use for that thread.

Eric





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

* bug#37655: 27.0.50; reversing `gnus-thread-sort-by-most-recent-date' does not work properly
  2019-10-09 18:55 ` Eric Abrahamsen
@ 2019-10-09 20:44   ` Hong Xu
  2019-10-09 21:04     ` Eric Abrahamsen
  0 siblings, 1 reply; 9+ messages in thread
From: Hong Xu @ 2019-10-09 20:44 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: 37655, larsi

On 10/9/19 11:55 AM, Eric Abrahamsen wrote:
> 
> I can reproduce this, but oddly it only seems to have gone wrong for
> that one thread -- all the other threads in the mailbox seem to be
> sorted correctly. I also note that the Summary buffer displays the date
> of both messages in the thread as one day earlier than the Date header
> in the message itself. So I wonder if there's just something weird about
> one or both of the messages that's causing Gnus to handle the date
> incorrectly.
> 
> When I have a bit more time I'll try to figure out what date Gnus is
> trying to use for that thread.
> 

On my personal messages, there is also only exactly one thread placed in the wrong position. My guess is that there may be something on the boundary not handled properly during sorting ...






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

* bug#37655: 27.0.50; reversing `gnus-thread-sort-by-most-recent-date' does not work properly
  2019-10-09 20:44   ` Hong Xu
@ 2019-10-09 21:04     ` Eric Abrahamsen
  2019-10-09 21:08       ` Hong Xu
  0 siblings, 1 reply; 9+ messages in thread
From: Eric Abrahamsen @ 2019-10-09 21:04 UTC (permalink / raw)
  To: Hong Xu; +Cc: 37655, larsi

Hong Xu <hong@topbug.net> writes:

> On 10/9/19 11:55 AM, Eric Abrahamsen wrote:
>> I can reproduce this, but oddly it only seems to have gone wrong for
>> that one thread -- all the other threads in the mailbox seem to be
>> sorted correctly. I also note that the Summary buffer displays the date
>> of both messages in the thread as one day earlier than the Date header
>> in the message itself. So I wonder if there's just something weird about
>> one or both of the messages that's causing Gnus to handle the date
>> incorrectly.
>> When I have a bit more time I'll try to figure out what date Gnus is
>> trying to use for that thread.
>> 
>
> On my personal messages, there is also only exactly one thread placed
> in the wrong position. My guess is that there may be something on the
> boundary not handled properly during sorting ...

Ah, I guess that would make sense. Are the dates also displayed
incorrectly in the Summary format line for the messages in that thread?

Eric





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

* bug#37655: 27.0.50; reversing `gnus-thread-sort-by-most-recent-date' does not work properly
  2019-10-09 21:04     ` Eric Abrahamsen
@ 2019-10-09 21:08       ` Hong Xu
  2019-10-09 21:32         ` Eric Abrahamsen
  0 siblings, 1 reply; 9+ messages in thread
From: Hong Xu @ 2019-10-09 21:08 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: 37655, larsi

On 10/9/19 2:04 PM, Eric Abrahamsen wrote:
> Hong Xu <hong@topbug.net> writes:
> 
>> On 10/9/19 11:55 AM, Eric Abrahamsen wrote:
>>> I can reproduce this, but oddly it only seems to have gone wrong for
>>> that one thread -- all the other threads in the mailbox seem to be
>>> sorted correctly. I also note that the Summary buffer displays the date
>>> of both messages in the thread as one day earlier than the Date header
>>> in the message itself. So I wonder if there's just something weird about
>>> one or both of the messages that's causing Gnus to handle the date
>>> incorrectly.
>>> When I have a bit more time I'll try to figure out what date Gnus is
>>> trying to use for that thread.
>>>
>>
>> On my personal messages, there is also only exactly one thread placed
>> in the wrong position. My guess is that there may be something on the
>> boundary not handled properly during sorting ...
> 
> Ah, I guess that would make sense. Are the dates also displayed
> incorrectly in the Summary format line for the messages in that thread?
> 

I don't observe incorrect date. Is there an incorrect date in the example above?

I also observed that `gnus-thread-latest-date' does not return correct dates for some messages, although they displayed as in one thread.






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

* bug#37655: 27.0.50; reversing `gnus-thread-sort-by-most-recent-date' does not work properly
  2019-10-09 21:08       ` Hong Xu
@ 2019-10-09 21:32         ` Eric Abrahamsen
  2019-10-09 22:51           ` Hong Xu
  0 siblings, 1 reply; 9+ messages in thread
From: Eric Abrahamsen @ 2019-10-09 21:32 UTC (permalink / raw)
  To: Hong Xu; +Cc: 37655, larsi


On 10/09/19 14:08 PM, Hong Xu wrote:
> On 10/9/19 2:04 PM, Eric Abrahamsen wrote:
>> Hong Xu <hong@topbug.net> writes:
>> 
>>> On 10/9/19 11:55 AM, Eric Abrahamsen wrote:
>>>> I can reproduce this, but oddly it only seems to have gone wrong for
>>>> that one thread -- all the other threads in the mailbox seem to be
>>>> sorted correctly. I also note that the Summary buffer displays the date
>>>> of both messages in the thread as one day earlier than the Date header
>>>> in the message itself. So I wonder if there's just something weird about
>>>> one or both of the messages that's causing Gnus to handle the date
>>>> incorrectly.
>>>> When I have a bit more time I'll try to figure out what date Gnus is
>>>> trying to use for that thread.
>>>>
>>>
>>> On my personal messages, there is also only exactly one thread placed
>>> in the wrong position. My guess is that there may be something on the
>>> boundary not handled properly during sorting ...
>> Ah, I guess that would make sense. Are the dates also displayed
>> incorrectly in the Summary format line for the messages in that thread?
>> 
>
> I don't observe incorrect date. Is there an incorrect date in the example above?

Yes, the dates as displayed in the Summary format line are off from the
dates in the Date header of the article itself. At least, that's what
I'm seeing in the Emacs -Q test.

In your personal messages, is it also the first thread in the Summary
buffer that's sorted incorrectly? That would definitely indicate some
sort of error in the start/end of looping.

> I also observed that `gnus-thread-latest-date' does not return correct
> dates for some messages, although they displayed as in one thread.

Okay, noted. I'll probably have time to look deeper tomorrow.





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

* bug#37655: 27.0.50; reversing `gnus-thread-sort-by-most-recent-date' does not work properly
  2019-10-09 21:32         ` Eric Abrahamsen
@ 2019-10-09 22:51           ` Hong Xu
  2019-10-18  4:46             ` Eric Abrahamsen
  0 siblings, 1 reply; 9+ messages in thread
From: Hong Xu @ 2019-10-09 22:51 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: 37655, larsi

On 10/9/19 2:32 PM, Eric Abrahamsen wrote:
>>
>> I don't observe incorrect date. Is there an incorrect date in the example above?
> 
> Yes, the dates as displayed in the Summary format line are off from the
> dates in the Date header of the article itself. At least, that's what
> I'm seeing in the Emacs -Q test.
> 
> In your personal messages, is it also the first thread in the Summary
> buffer that's sorted incorrectly? That would definitely indicate some
> sort of error in the start/end of looping.
> 

The date of the message is correct for my personal message. The example mbox file actually also shows the correct date (as posted in the original report), because the article at issue was dated Fri, 13 Oct 2000 10:15:42 +0900 in the mbox file, and I am on GMT-7, therefore 12 Oct 2000 was the correct date for me.






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

* bug#37655: 27.0.50; reversing `gnus-thread-sort-by-most-recent-date' does not work properly
  2019-10-09 22:51           ` Hong Xu
@ 2019-10-18  4:46             ` Eric Abrahamsen
  0 siblings, 0 replies; 9+ messages in thread
From: Eric Abrahamsen @ 2019-10-18  4:46 UTC (permalink / raw)
  To: Hong Xu; +Cc: 37655, larsi


On 10/09/19 15:51 PM, Hong Xu wrote:
> On 10/9/19 2:32 PM, Eric Abrahamsen wrote:
>>>
>>> I don't observe incorrect date. Is there an incorrect date in the example above?
>> Yes, the dates as displayed in the Summary format line are off from
>> the
>> dates in the Date header of the article itself. At least, that's what
>> I'm seeing in the Emacs -Q test.
>> In your personal messages, is it also the first thread in the
>> Summary
>> buffer that's sorted incorrectly? That would definitely indicate some
>> sort of error in the start/end of looping.
>> 
>
> The date of the message is correct for my personal message. The
> example mbox file actually also shows the correct date (as posted in
> the original report), because the article at issue was dated Fri, 13
> Oct 2000 10:15:42 +0900 in the mbox file, and I am on GMT-7, therefore
> 12 Oct 2000 was the correct date for me.

Right, sorry, I wasn't thinking clearly.

Unfortunately I haven't been able to make any process on this. Threading
is so complicated I can't even get a little test case going in the
*scratch* buffer to see what's happening. I'm going to have to bow out
of this one...





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

* bug#37655: 27.0.50; reversing `gnus-thread-sort-by-most-recent-date' does not work properly
  2019-10-08  5:02 bug#37655: 27.0.50; reversing `gnus-thread-sort-by-most-recent-date' does not work properly Hong Xu
  2019-10-09 18:55 ` Eric Abrahamsen
@ 2019-10-28 15:04 ` Lars Ingebrigtsen
  1 sibling, 0 replies; 9+ messages in thread
From: Lars Ingebrigtsen @ 2019-10-28 15:04 UTC (permalink / raw)
  To: Hong Xu; +Cc: 37655

Hong Xu <hong@topbug.net> writes:

> Start Emacs with "-Q", and evaluate the following:
>
> 	;; Latest at bottom
> 	(setq gnus-thread-sort-functions
> 	      '((not gnus-thread-sort-by-most-recent-date)))
>
> 	(setq gnus-summary-line-format "%U%R%z %(%&user-date;  %-15,15f  %B %s%)\n")
>
> `M-x gnus', followed by `G f /path/to/2000-10.mbox'. There is only one topic. Type `C-u Enter'.
>
> The summary buffer is supposed to sort the messages in reversed most recent date order in each thread, but a lot of non-compliance can be observed. For instance:
>
>     Oct 02 2000  wm08894@educ.cc  >  (no subject)
>     Oct 12 2000  fujyama yuu        \->
>     Oct 05 2000  bigsuma@home.co   Repost PLEASE HELP or reply!!! please  :)
>     Oct 05 2000  Stefan Reichör    Docstring for kill-line not complete

With the formatting you've chosen, you can't see any difference between
real threads and gathered threads.  gnus-thread-sort-functions is about
how real threads are sorted.  After sorting, if you have thread
gathering switched on, articles with the same subject (in the example
mail box "(no subject")) are displayed after one another, but that
doesn't affect the sorting.

So this isn't a bug, and this works as designed.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

end of thread, other threads:[~2019-10-28 15:04 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-08  5:02 bug#37655: 27.0.50; reversing `gnus-thread-sort-by-most-recent-date' does not work properly Hong Xu
2019-10-09 18:55 ` Eric Abrahamsen
2019-10-09 20:44   ` Hong Xu
2019-10-09 21:04     ` Eric Abrahamsen
2019-10-09 21:08       ` Hong Xu
2019-10-09 21:32         ` Eric Abrahamsen
2019-10-09 22:51           ` Hong Xu
2019-10-18  4:46             ` Eric Abrahamsen
2019-10-28 15:04 ` Lars Ingebrigtsen

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).