Gnus development mailing list
 help / color / mirror / Atom feed
From: sigurd@12move.de (Karl Pflästerer)
Subject: Re: A lot of questions concerning `gnus-score-edit-file-at-point'
Date: Tue, 30 Dec 2003 18:30:01 +0100	[thread overview]
Message-ID: <m38ykui5k8.fsf@hamster.pflaesterer.de> (raw)
In-Reply-To: <v9k74e5sqj.fsf@marauder.physik.uni-ulm.de>

On 30 Dec 2003, Reiner Steib <- 4.uce.03.r.s@nurfuerspam.de wrote:

> On Tue, Dec 30 2003, Karl Pflästerer wrote:

>> (defvar gnus-score-trace-format-alist
>>   (list ;; name            format string     regexp    
>>    (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.SCORE
> ^^^^^^^^^^^^^^^^^^^^^^^^^^--^^^^^^^^_^^^^^----------------------------------
> (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

-- 
"Programs must be written for people to read, and only incidentally
for machines to execute."
                -- Abelson & Sussman, SICP (preface to the first edition)



  reply	other threads:[~2003-12-30 17:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-28 17:45 Karl Pflästerer
2003-12-29 17:15 ` Reiner Steib
2003-12-29 19:59   ` Karl Pflästerer
2003-12-29 21:15     ` Reiner Steib
2003-12-29 23:10       ` Karl Pflästerer
2003-12-30 13:40         ` Reiner Steib
2003-12-30 17:30           ` Karl Pflästerer [this message]
2003-12-30 20:58             ` Reiner Steib
2003-12-30 21:17               ` Karl Pflästerer

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=m38ykui5k8.fsf@hamster.pflaesterer.de \
    --to=sigurd@12move.de \
    /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).