From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/55380 Path: main.gmane.org!not-for-mail From: sigurd@12move.de (Karl =?iso-8859-1?q?Pfl=E4sterer?=) Newsgroups: gmane.emacs.gnus.general Subject: Re: A lot of questions concerning `gnus-score-edit-file-at-point' Date: Tue, 30 Dec 2003 18:30:01 +0100 Organization: Lemis World Sender: ding-owner@lists.math.uh.edu Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1072805497 1363 80.91.224.253 (30 Dec 2003 17:31:37 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 30 Dec 2003 17:31:37 +0000 (UTC) Original-X-From: ding-owner+M3920@lists.math.uh.edu Tue Dec 30 18:31:30 2003 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AbNiM-0003T7-00 for ; Tue, 30 Dec 2003 18:31:30 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1AbNhi-00072X-00; Tue, 30 Dec 2003 11:30:50 -0600 Original-Received: from justine.libertine.org ([66.139.78.221] ident=postfix) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1AbNhZ-00072P-00 for ding@lists.math.uh.edu; Tue, 30 Dec 2003 11:30:41 -0600 Original-Received: from quimby.gnus.org (quimby.gnus.org [80.91.224.244]) by justine.libertine.org (Postfix) with ESMTP id DD1673A0038 for ; Tue, 30 Dec 2003 11:30:40 -0600 (CST) Original-Received: from news by quimby.gnus.org with local (Exim 3.35 #1 (Debian)) id 1AbNhY-0000RW-00 for ; Tue, 30 Dec 2003 18:30:40 +0100 Original-To: ding@gnus.org Original-Path: wintendo.pflaesterer.de!not-for-mail Original-Newsgroups: gnus.ding Original-Lines: 58 Original-NNTP-Posting-Host: p62.246.52.45.tisdip.tiscali.de Original-X-Trace: quimby.gnus.org 1072805439 1705 62.246.52.45 (30 Dec 2003 17:30:39 GMT) Original-X-Complaints-To: usenet@quimby.gnus.org Original-NNTP-Posting-Date: Tue, 30 Dec 2003 17:30:39 +0000 (UTC) X-Face: #iIcL\6>Qj/G*F@AL9T*v/R$j@7Q`6#FU&Flg6u6aVsLdWf(H$U5>:;&*>oy>jOIWgA%8w* A!V7X`\fEGoQ[@D'@i^*p3FCC6&Rg~JT/H_*MOX;"o~flADb8^ Mail-Copies-To: never User-Agent: Gnus/5.1003 (Gnus v5.10.3) Hamster/2.0.4.0 Cancel-Lock: sha1:/0YkS7S0A98gWaJhBwX9pvCX88I= Precedence: bulk Xref: main.gmane.org gmane.emacs.gnus.general:55380 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:55380 On 30 Dec 2003, Reiner Steib <- 4.uce.03.r.s@nurfuerspam.de wrote: > On Tue, Dec 30 2003, Karl Pfl=E4sterer wrote: >> (defvar gnus-score-trace-format-alist >> (list ;; name format string regexp=20=20=20=20 >> (cons 'newformat (cons "%S [%s] -> %s\n" "-> +")) >> (cons 'oldformat (cons "%S -> %3$s\n" "-> +")))) > I don't understand the aim behind `gnus-score-trace-format-alist' in > your code. If 'newformat (or 'oldformat) is hard-coded in the > relevant functions, I see no need for the variable. If you use that var you asure that the two functions use the right pair of format string and regexp. As I wrote: best would be to have a second var which holds the name of the key. > We could use a variable to hold the delimiters (and maybe regexps?): I don't see the difference to what I wrote. > ("@my-fqdn>$" 10000 nil r) [my-posts] -> ~/News/score/topics/my-posts.SC= ORE > ^^^^^^^^^^^^^^^^^^^^^^^^^^--^^^^^^^^_^^^^^-------------------------------= --- > (a) | (c) | (e) (f) > (b) (d) > (a) the score rule > (b) opening delimiter for (c) > (c) abbreviated score file name (w/o directory and extension) > (d) closing delimiter for (c) > (e) separator (needed in `gnus-score-edit-file-at-point') > (f) full name of the score file > (b), (d) and (e) could be in the variable (alist). > `gnus-score-edit-file-at-point' and `gnus-score-find-trace' use this > variable. The same as I proposed. But with my proposal it's easy to add and use new formats. You would have two new vars: `gnus-score-trace-format-alist' and `gnus-score-trace-format'. The later one has eg. 'oldformat as value. Everywhere you see at the moment oldformat that var could be used. With that you are free to create fancy formats. Only the rule must be first and the long file name last on the line. KP --=20 "Programs must be written for people to read, and only incidentally for machines to execute." -- Abelson & Sussman, SICP (preface to the first edition)