unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#42334: 28.0.50; gnus-thread-sort-functions vs. loose threads
@ 2020-07-12 13:05 Kévin Le Gouguec
  2020-07-19  0:13 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 4+ messages in thread
From: Kévin Le Gouguec @ 2020-07-12 13:05 UTC (permalink / raw)
  To: 42334

[-- Attachment #1: Type: text/plain, Size: 2132 bytes --]

Hello,

I try to configure gnus-thread-sort-functions so that threads are sorted
from least recently updated (at the top) to most recently updated (at
the bottom):

#+begin_src elisp
(setq gnus-thread-sort-functions '(gnus-thread-sort-by-number
                                   (not gnus-thread-sort-by-most-recent-date)))
#+end_src

The above works as intended most of the time, except when loose threads
are involved.  To reproduce:

- copy the attached emacs-devel.mbox to /tmp,
- copy the attached init.el somewhere,
- install gnus-mock from ELPA,
- evaluate the following, with init.el in default-directory:

#+begin_src elisp
(let ((gnus-mock-init-file (expand-file-name "init.el"))
      (gnus-mock-emacs-program (expand-file-name "src/emacs" source-directory)))
  (package-initialize)
  (gnus-mock-start))
#+end_src

This produces the following summary buffer:

20200708T163331 Philip K.               Re: Updating dired-guess-shell-alist-default
20200708T170847     Stefan Monnier          
20200708T163824 João Távora             Re: Byte-compilation warnings after merging eldoc changes

AFAICT, the first thread should be sorted last, since it has been
updated more recently than the second thread.  What leads me to believe
that this issue is linked to loose threads is that if we ask Gnus not to
gather those…

#+begin_src elisp
;; Evaluate:
(setq gnus-summary-make-false-root nil)
;; Then refresh with M-g.
#+end_src

… then the issue goes away:

20200708T163331 Philip K.               Re: Updating dired-guess-shell-alist-default
20200708T163824 João Távora             Re: Byte-compilation warnings after merging eldoc changes
20200708T170847 Stefan Monnier          Re: Updating dired-guess-shell-alist-default


Is this indeed a bug, or am I missing something?

Thank you for your time.


PS: when playing with this example, if you happen to set
gnus-summary-make-false-root to 'dummy, and notice that both the dummy
root *and* the first message display the subject line, note that I
already sent a report (and a patch) over at bug#40520.



[-- Attachment #2: emacs-devel.mbox --]
[-- Type: application/mbox, Size: 17769 bytes --]

[-- Attachment #3: init.el --]
[-- Type: application/emacs-lisp, Size: 289 bytes --]

[-- Attachment #4: Type: text/plain, Size: 757 bytes --]



In GNU Emacs 28.0.50 (build 10, x86_64-pc-linux-gnu, GTK+ Version 3.24.5, cairo version 1.16.0)
 of 2020-07-04 built on hirondell
Repository revision: 5d1bac0ac951e25d0b0b39a9919f13053162d5df
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-xwidgets --with-cairo'

Configured features:
XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND GPM DBUS GSETTINGS GLIB NOTIFY
INOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF
ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS XWIDGETS
LIBSYSTEMD JSON PDUMPER LCMS2 GMP

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

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

end of thread, other threads:[~2020-07-19 13:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-12 13:05 bug#42334: 28.0.50; gnus-thread-sort-functions vs. loose threads Kévin Le Gouguec
2020-07-19  0:13 ` Lars Ingebrigtsen
2020-07-19  9:42   ` Kévin Le Gouguec
2020-07-19 13:09     ` 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).