Gnus development mailing list
 help / color / mirror / Atom feed
From: Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann)
Cc: ding@gnus.org
Subject: Re: [bug] Mark limit score
Date: Sat, 20 Oct 2001 13:26:46 +0200	[thread overview]
Message-ID: <vafzo6mzh55.fsf@INBOX.auto.gnus.tok.lucy.cs.uni-dortmund.de> (raw)
In-Reply-To: <g08go9yj.fsf@hschmi22.userfqdn.rz-online.de> (Frank Schmitt's message of "Fri, 19 Oct 2001 00:32:52 +0200")

Frank Schmitt <usereplyto@Frank-Schmitt.net> writes:

> Simon Josefsson <jas@extundo.com> writes:
>  
>>> Then: /v calls gnus-summary-limit-to-score. This function is the one I
>>> want, but it doesn't ask for the score I wish to limit the summary
>>> to. It limits the summary to articles with a score bigger or equal than
>>> gnus-summary-default-score which is quite senseless.
>> 
>> Maybe it is possible to use a prefix, e.g. '100 / v'.
> 
> What do you think about this:
> 
> 
> --- lisp/gnus-sum.el	Thu Oct 18 20:03:02 2001
> +++ /cygdrive/c/Programme/XEmacs/xemacs-packages/lisp/gnus/gnus-sum.el	Thu Oct 18 22:26:50 2001
> @@ -6958,9 +6958,12 @@
>  (defun gnus-summary-limit-to-score (&optional score)
>    "Limit to articles with score at or above SCORE."
>    (interactive "P")
> -  (setq score (if score
> -		  (prefix-numeric-value score)
> -		(or gnus-summary-default-score 0)))
> +  (if (not score)
> +      (setq score 
> +	    (string-to-number (read-from-minibuffer 
> +			       "Limit to articles with a score bigger or equal than: " 
> +			       (number-to-string (or gnus-summary-default-score 0)))))
> +    (setq score (prefix-numeric-value score)))
>    (let ((data gnus-newsgroup-data)
>  	articles)
>      (while data

How about the more simple-minded:

(defun gnus-summary-limit-to-score (score)
  "..."
  (interactive "NLimit to articles with score greater or equal to: ")
  ...)

Note how the argument is not optional anymore (callers can supply
gnus-summary-default-score if they like) and how the N spec for
interactive uses the prefix arg, if supplied, but prompts for a number
if no prefix arg is supplied.

Maybe we would like to make the argument optional, so that you don't
have to supply it when calling from Lisp.  But OTOH, there is no call
to this function from Lisp, so maybe this is pointless.

Thoughts?

kai
-- 
Lisp is kinda like tpircstsoP



  parent reply	other threads:[~2001-10-20 11:26 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-18  9:47 Frank Schmitt
2001-10-18 10:00 ` Björn Torkelsson
2001-10-18 19:51 ` Simon Josefsson
2001-10-18 22:32   ` Frank Schmitt
2001-10-19 11:37     ` Kai Großjohann
2001-10-19 12:42       ` Frank Schmitt
2001-10-20  5:57       ` Daniel Pittman
2001-10-20 11:26     ` Kai Großjohann [this message]
2001-10-20 11:51       ` Frank Schmitt
2001-10-20 13:15         ` Frank Schmitt
2001-10-20 18:18         ` Kai Großjohann
2001-10-20 18:40           ` Frank Schmitt
2001-10-20 22:01             ` Kai Großjohann
2001-10-20 22:26               ` Frank Schmitt
2001-10-20 22:20           ` Frank Schmitt
2001-10-21  8:36             ` Kai Großjohann

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=vafzo6mzh55.fsf@INBOX.auto.gnus.tok.lucy.cs.uni-dortmund.de \
    --to=kai.grossjohann@cs.uni-dortmund.de \
    --cc=ding@gnus.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.
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).