From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/39548 Path: main.gmane.org!not-for-mail From: Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai =?iso-8859-1?q?Gro=DFjohann?=) Newsgroups: gmane.emacs.gnus.general Subject: Re: [bug] Mark limit score Date: Sat, 20 Oct 2001 13:26:46 +0200 Sender: owner-ding@hpc.uh.edu Message-ID: References: <7ktt2sb6.fsf@hschmi22.userfqdn.rz-online.de> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035175242 28589 80.91.224.250 (21 Oct 2002 04:40:42 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 04:40:42 +0000 (UTC) Cc: ding@gnus.org Return-Path: Original-Received: (qmail 3620 invoked from network); 20 Oct 2001 11:27:43 -0000 Original-Received: from malifon.math.uh.edu (mail@129.7.128.13) by mastaler.com with SMTP; 20 Oct 2001 11:27:43 -0000 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 15uuHy-0004v8-00; Sat, 20 Oct 2001 06:27:38 -0500 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Sat, 20 Oct 2001 06:27:16 -0500 (CDT) Original-Received: from sclp3.sclp.com (qmailr@sclp3.sclp.com [209.196.61.66]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id GAA20605 for ; Sat, 20 Oct 2001 06:27:01 -0500 (CDT) Original-Received: (qmail 3615 invoked by alias); 20 Oct 2001 11:27:19 -0000 Original-Received: (qmail 3610 invoked from network); 20 Oct 2001 11:27:18 -0000 Original-Received: from waldorf.cs.uni-dortmund.de (129.217.4.42) by gnus.org with SMTP; 20 Oct 2001 11:27:18 -0000 Original-Received: from lothlorien.cs.uni-dortmund.de (lothlorien [129.217.19.67]) by waldorf.cs.uni-dortmund.de with ESMTP id f9KBQpG21784; Sat, 20 Oct 2001 13:26:51 +0200 (MES) Original-Received: from lucy.cs.uni-dortmund.de (lucy [129.217.19.80]) by lothlorien.cs.uni-dortmund.de id NAA06259; Sat, 20 Oct 2001 13:26:46 +0200 (MET DST) Original-Received: by lucy.cs.uni-dortmund.de (Postfix, from userid 6104) id 45E6B2019; Sat, 20 Oct 2001 13:26:46 +0200 (CEST) Original-To: In-Reply-To: (Frank Schmitt's message of "Fri, 19 Oct 2001 00:32:52 +0200") Original-Lines: 54 User-Agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.1.50 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:39548 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:39548 Frank Schmitt writes: > Simon Josefsson 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