From: Reiner Steib <4.uce.03.r.s@nurfuerspam.de>
Subject: Re: A lot of questions concerning `gnus-score-edit-file-at-point'
Date: Mon, 29 Dec 2003 18:15:03 +0100 [thread overview]
Message-ID: <v9oetrbl60.fsf@marauder.physik.uni-ulm.de> (raw)
In-Reply-To: <m34qvkc2g1.fsf@hamster.pflaesterer.de>
On Sun, Dec 28 2003, Karl Pflästerer wrote:
> (a) Does anyone really use `gnus-score-edit-file-at-point' outside a
> *Score Trace* buffer? If not the function could be written simpler.
I don't think it's necessary that it works outside *Score Trace*
buffers. So we could use option [d].
> (b) At the moment `ffap-string-at-point' gets used in that function.
> But that's the sole usage of that function in gnus-score.el (the
> sole usage in Gnus at all).
Since `ffap' is available in all supported (X)Emacs versions, it's
okay to use it. If we can do the same with `buffer-substring' it's
fine.
> (c) Furthermore there would no longer be a need to define it
> interactive. To bind it to a key the function could get called by a
> lambda form. That would help to clean the interactive namespace a
> bit (one function less :-) ). So that leads to[d]
>
> So what do you say?
Unlike the old code, your function always goes to the rule. So we
should change the manual.
,----[ (info "(gnus)Summary Score Commands") ]
| `V t'
| Display all score rules that have been used on the current article
| (`gnus-score-find-trace'). In the `*Score Trace*' buffer, you can
| use `q' to quit. `e' edits the corresponding score file. When
| point is on a string within the match element, `e' will try to
| bring you to this string in the score file.
`----
> [d]
>
> (defun gnus-score-edit-file-at-point ()
[...]
> (file (save-excursion
> ;; only works in a Score Trace buffer
> (beginning-of-line)
> (re-search-forward "-> +" nil t)
Fails in this example:
("foo -> bar" 1 nil s) -> /some/score/file
Maybe search for a more strict expression, such as ") -> ".
Example:
("^[^)]+" 2 nil r) -> /some/score/file
Or is there a function to jump to the matching parenthesis, even when
there is one inside the score entry? If not, using `end-of-line' and
`re-search-backward' should be more robust.
Bye, Reiner.
--
,,,
(o o)
---ooO-(_)-Ooo--- PGP key available via WWW http://rsteib.home.pages.de/
next prev parent reply other threads:[~2003-12-29 17:15 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 [this message]
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
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=v9oetrbl60.fsf@marauder.physik.uni-ulm.de \
--to=4.uce.03.r.s@nurfuerspam.de \
--cc=reiner.steib@gmx.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).