Gnus development mailing list
 help / color / mirror / Atom feed
From: Simon Josefsson <jas@extundo.com>
Subject: Re: Use entire subject when sorting summary buffer
Date: Tue, 29 Apr 2003 17:53:14 +0200	[thread overview]
Message-ID: <ilu1xzlti51.fsf@latte.josefsson.org> (raw)
In-Reply-To: <ud6j5y8kk.fsf@axis.com> (Niklas Morberg's message of "Tue, 29 Apr 2003 11:08:43 +0200")

Niklas Morberg <niklas.morberg@axis.com> writes:

> We have a corporate spam filter that puts `[SPAM]' in the
> Subject of suspected spam. When sorting a folder that
> contains these messages by subject, the `[SPAM]' part is
> ignored.
>
> I sent a test message to myself with `[TEST] a' as Subject.
> This got sorted as the letter a
>
> In other words: only the text after brackets are used for
> sorting. I would like to use the brackets and the text
> within brackets as well when sorting.
>
> I have set:
>
>      (gnus-simplify-subject-functions nil)
>      (gnus-simplify-ignored-prefixes nil)
>      (gnus-thread-sort-functions '(gnus-thread-sort-by-subject))))
>
> using gnus-parameters. `C-h v variable' in the summary
> buffer tells me that the above settings are in effect.
>
> Is there anything else I need to set/unset?

Try:

(setq gnus-thread-sort-functions '(my-gnus-thread-sort-by-subject))

(defun my-gnus-article-sort-by-subject (h1 h2)
  "Sort articles by root subject."
  (string-lessp
   (downcase (mail-header-subject h1))
   (downcase (mail-header-subject h2))))

Compare with original:

(defsubst gnus-article-sort-by-subject (h1 h2)
  "Sort articles by root subject."
  (string-lessp
   (downcase (gnus-simplify-subject-re (mail-header-subject h1)))
   (downcase (gnus-simplify-subject-re (mail-header-subject h2)))))




  reply	other threads:[~2003-04-29 15:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-29  9:08 Niklas Morberg
2003-04-29 15:53 ` Simon Josefsson [this message]
2003-05-06 11:24   ` Niklas Morberg

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

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

  git send-email \
    --in-reply-to=ilu1xzlti51.fsf@latte.josefsson.org \
    --to=jas@extundo.com \
    /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.
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).