From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/55378 Path: main.gmane.org!not-for-mail From: Reiner Steib <4.uce.03.r.s@nurfuerspam.de> Newsgroups: gmane.emacs.gnus.general Subject: Re: A lot of questions concerning `gnus-score-edit-file-at-point' Date: Tue, 30 Dec 2003 14:40:20 +0100 Organization: Dept. of Theoretical Physics, University of Ulm Sender: ding-owner@lists.math.uh.edu Message-ID: References: Reply-To: reiner.steib@gmx.de 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 1072791770 9163 80.91.224.253 (30 Dec 2003 13:42:50 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 30 Dec 2003 13:42:50 +0000 (UTC) Original-X-From: ding-owner+M3918@lists.math.uh.edu Tue Dec 30 14:42:47 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 1AbK91-0000DG-00 for ; Tue, 30 Dec 2003 14:42:47 +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 1AbK88-0006cR-00; Tue, 30 Dec 2003 07:41:52 -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 1AbK80-0006cL-00 for ding@lists.math.uh.edu; Tue, 30 Dec 2003 07:41:44 -0600 Original-Received: from main.gmane.org (main.gmane.org [80.91.224.249]) by justine.libertine.org (Postfix) with ESMTP id 637543A0110 for ; Tue, 30 Dec 2003 07:41:43 -0600 (CST) Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1AbK7y-00013l-00 for ; Tue, 30 Dec 2003 14:41:42 +0100 Mail-Followup-To: ding@gnus.org X-Injected-Via-Gmane: http://gmane.org/ Original-To: ding@gnus.org Original-Received: from sea.gmane.org ([80.91.224.252]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AbK7x-00013d-00 for ; Tue, 30 Dec 2003 14:41:41 +0100 Original-Received: from news by sea.gmane.org with local (Exim 3.35 #1 (Debian)) id 1AbK7x-0002MF-00 for ; Tue, 30 Dec 2003 14:41:41 +0100 Original-Lines: 64 Original-X-Complaints-To: usenet@sea.gmane.org X-Face: #vK]N[`vqjuod*|)'[iD7/"3AB-ApT%fmN"LWAg@oS7OesGv~)n[OBTLM#I="J'Y^-7I I/ps7o_'IK@#-Rs{::DZ@O8yS|fexe,XslY[:dNWOb~>?mC-&i_c)say:"\IpA.5U.b]'NY;Pks{lb h.+#6%DpZuaK3dcHB`Av3zc:r!C%~s0&m,tWj]&},qg.+0ww2gK%f!:GK|wMl.I!(voY*1"^li8"~B BNG)9LvPi?^DMR-GVDnZqhu*3Hi,+g=wFhI)BL6&u{EOVEHjVEVq~d?_}lMntWAc3(6?kftjc>_f>! g0wM(qPM$d5]^TT_Qyi&L?LGVG)SHN;Gk/,pkY9,~ Mail-Copies-To: nobody User-Agent: Gnus/5.1004 (Gnus v5.10.4) Emacs/21.3 (gnu/linux) Cancel-Lock: sha1:ZhLlZ+n+q0DsIzXNdEvqQwf5Tyo= Precedence: bulk Xref: main.gmane.org gmane.emacs.gnus.general:55378 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:55378 On Tue, Dec 30 2003, Karl Pfl=E4sterer wrote: > On 29 Dec 2003, Reiner Steib <- 4.uce.03.r.s@nurfuerspam.de wrote: [...] >> But we can make the *Score Trace* buffer more readable with >> `truncate-lines': We can use `abbreviate-file-name' on the full file >> name and also print the file name (without directory and extension). >> It could look like this: > >> ("@my-fqdn>$" 10000 nil r) [my-posts] -> ~/News/score/topics/my-posts.S= CORE > > What are =BB[my-posts]=AB? "my-posts" is the name of the score file without directory and without extension: + (file-name-sans-extension + (file-name-nondirectory file)) > [b]=20 > (defun gnus-score-edit-file-at-point () [...] > (sep "[ \n\r\t]*") > (reg (cddr (assq 'newformat gnus-score-trace-format-alist))) > (file (save-excursion > ;; only works in a Score Trace buffer > (end-of-line) > (if (and (re-search-backward reg (point-at-bol) t) > (re-search-forward reg (point-at-eol) t)) > (buffer-substring (point) (point-at-eol)) > nil)))) [...] > (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. We could use a variable to hold the delimiters (and maybe regexps?): ("@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. Bye, Reiner. --=20 ,,, (o o) ---ooO-(_)-Ooo--- PGP key available via WWW http://rsteib.home.pages.de/