unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Kévin Le Gouguec" <kevin.legouguec@gmail.com>
To: 42334@debbugs.gnu.org
Subject: bug#42334: 28.0.50; gnus-thread-sort-functions vs. loose threads
Date: Sun, 12 Jul 2020 15:05:56 +0200	[thread overview]
Message-ID: <87blkkc28b.fsf@gmail.com> (raw)

[-- 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

             reply	other threads:[~2020-07-12 13:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-12 13:05 Kévin Le Gouguec [this message]
2020-07-19  0:13 ` bug#42334: 28.0.50; gnus-thread-sort-functions vs. loose threads Lars Ingebrigtsen
2020-07-19  9:42   ` Kévin Le Gouguec
2020-07-19 13:09     ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87blkkc28b.fsf@gmail.com \
    --to=kevin.legouguec@gmail.com \
    --cc=42334@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).