Gnus development mailing list
 help / color / mirror / Atom feed
* downscore a subject temporarily
@ 2023-03-21  4:11 Emanuel Berg
  2023-03-21 16:51 ` Andreas Schwab
  0 siblings, 1 reply; 9+ messages in thread
From: Emanuel Berg @ 2023-03-21  4:11 UTC (permalink / raw)
  To: ding

How do you say "not into this thread" in Gnus?

I tried to use `gnus-summary-lower-score' but it's a lot of
keys to hit: first a key for that function, then s for the
subject, then e for exact match, then t for temporary ...

That interface is also peculiar, not what we are used to in
Lisp, so I don't understand how to automate it from just
looking at the source ...

-- 
underground experts united
https://dataswamp.org/~incal



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

* Re: downscore a subject temporarily
  2023-03-21  4:11 downscore a subject temporarily Emanuel Berg
@ 2023-03-21 16:51 ` Andreas Schwab
  2023-03-21 17:14   ` Emanuel Berg
  0 siblings, 1 reply; 9+ messages in thread
From: Andreas Schwab @ 2023-03-21 16:51 UTC (permalink / raw)
  To: ding

On Mär 21 2023, Emanuel Berg wrote:

> I tried to use `gnus-summary-lower-score' but it's a lot of
> keys to hit: first a key for that function, then s for the
> subject, then e for exact match, then t for temporary ...

For a temporary score two keys are enough (L S), or three if you need
exact match (L s E) or customize gnus-score-default-type and/or
gnus-score-default-header.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


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

* Re: downscore a subject temporarily
  2023-03-21 16:51 ` Andreas Schwab
@ 2023-03-21 17:14   ` Emanuel Berg
  2023-03-21 17:47     ` Andreas Schwab
  0 siblings, 1 reply; 9+ messages in thread
From: Emanuel Berg @ 2023-03-21 17:14 UTC (permalink / raw)
  To: ding

Andreas Schwab wrote:

>> I tried to use `gnus-summary-lower-score' but it's a lot of
>> keys to hit: first a key for that function, then s for the
>> subject, then e for exact match, then t for temporary ...
>
> For a temporary score two keys are enough (L S), or three if
> you need exact match (L s E) or customize
> gnus-score-default-type and/or gnus-score-default-header.

You mean like this?

(setq gnus-score-default-type   'e)
(setq gnus-score-default-header 's)

It's still 3 keys, L t RET - it's better (thanks), but it's
still too much. Why isn't there a proper interface so you can
use a custom Lisp function?

Something like

  (gnus-summary-downscore-article-at-point 'subject 'exact 'temporary)

PS. Is that the best way to block a thread on something you
    don't care about BTW? Maybe it should be based on
    a reference to a mail/post (article) instead? But recall
    that subjects sometimes change, and you want to give them
    a new chanse, if that happens. As in

      Subject: Really interesting stuff (was: Uninteresting stuff)

-- 
underground experts united
https://dataswamp.org/~incal



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

* Re: downscore a subject temporarily
  2023-03-21 17:14   ` Emanuel Berg
@ 2023-03-21 17:47     ` Andreas Schwab
  2023-03-21 18:04       ` Emanuel Berg
  0 siblings, 1 reply; 9+ messages in thread
From: Andreas Schwab @ 2023-03-21 17:47 UTC (permalink / raw)
  To: ding

You have misspelled gnus-summary-score-entry.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


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

* Re: downscore a subject temporarily
  2023-03-21 17:47     ` Andreas Schwab
@ 2023-03-21 18:04       ` Emanuel Berg
  2023-03-21 18:39         ` Andreas Schwab
  0 siblings, 1 reply; 9+ messages in thread
From: Emanuel Berg @ 2023-03-21 18:04 UTC (permalink / raw)
  To: ding

Andreas Schwab wrote:

> You have misspelled gnus-summary-score-entry.

It can't be used like that, well, one must then retrieve the
header manually, and find and reuse the function that
calculates what temporary means ... and make it interactive.

-- 
underground experts united
https://dataswamp.org/~incal



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

* Re: downscore a subject temporarily
  2023-03-21 18:04       ` Emanuel Berg
@ 2023-03-21 18:39         ` Andreas Schwab
  2023-03-21 18:54           ` Emanuel Berg
  0 siblings, 1 reply; 9+ messages in thread
From: Andreas Schwab @ 2023-03-21 18:39 UTC (permalink / raw)
  To: ding

You are free to write your own interface.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


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

* Re: downscore a subject temporarily
  2023-03-21 18:39         ` Andreas Schwab
@ 2023-03-21 18:54           ` Emanuel Berg
  2023-03-21 18:58             ` Emanuel Berg
  0 siblings, 1 reply; 9+ messages in thread
From: Emanuel Berg @ 2023-03-21 18:54 UTC (permalink / raw)
  To: ding

Andreas Schwab wrote:

> You are free to write your own interface.

There is no interactive Lisp function that corresponds to that
interface, the one currently employed, the way we are used to.

That solution is one of a kind, not bad per se, but it gets
more complicated than necessary, for example as we see
right now.

And for a pretty standard use case at that.

-- 
underground experts united
https://dataswamp.org/~incal



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

* Re: downscore a subject temporarily
  2023-03-21 18:54           ` Emanuel Berg
@ 2023-03-21 18:58             ` Emanuel Berg
  2023-03-25  1:10               ` Emanuel Berg
  0 siblings, 1 reply; 9+ messages in thread
From: Emanuel Berg @ 2023-03-21 18:58 UTC (permalink / raw)
  To: ding

>> You are free to write your own interface.
>
> There is no interactive Lisp function that corresponds to that
> interface, the one currently employed, the way we are used to.
>
> That solution is one of a kind, not bad per se, but it gets
> more complicated than necessary, for example as we see
> right now.
>
> And for a pretty standard use case at that.

But okay, let me work in it, then ...

-- 
underground experts united
https://dataswamp.org/~incal



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

* Re: downscore a subject temporarily
  2023-03-21 18:58             ` Emanuel Berg
@ 2023-03-25  1:10               ` Emanuel Berg
  0 siblings, 0 replies; 9+ messages in thread
From: Emanuel Berg @ 2023-03-25  1:10 UTC (permalink / raw)
  To: ding

I think this works.

Give the boring subjects a new shot in the new year, right?

There is still something in me that tells me there is a better
way to do it, but let's see if this is actually good enough
for government work then ...

;;; -*- lexical-binding: t -*-
;;
;; this file:
;;   https://dataswamp.org/~incal/emacs-init/gnus/gnus-score-incal.el

(require 'gnus-score)

(defun next-year ()
  (format "%d-01-01" (1+ (string-to-number (format-time-string "%Y")))) )

(defun gnus-summary-downscore-subject ()
  (interactive)
  (let ((hdr "subject"))
    (gnus-summary-score-entry
       hdr
       (gnus-summary-header hdr)
       'e
       -1000
       (next-year) )))

(defalias 'gs #'gnus-summary-downscore-subject)

(provide 'gnus-score-incal)

-- 
underground experts united
https://dataswamp.org/~incal



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

end of thread, other threads:[~2023-03-25  1:10 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-21  4:11 downscore a subject temporarily Emanuel Berg
2023-03-21 16:51 ` Andreas Schwab
2023-03-21 17:14   ` Emanuel Berg
2023-03-21 17:47     ` Andreas Schwab
2023-03-21 18:04       ` Emanuel Berg
2023-03-21 18:39         ` Andreas Schwab
2023-03-21 18:54           ` Emanuel Berg
2023-03-21 18:58             ` Emanuel Berg
2023-03-25  1:10               ` Emanuel Berg

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