* gnus-score-edit-file + find-file-at-point
@ 2003-01-13 20:53 Reiner Steib
2003-01-13 20:59 ` Lars Magne Ingebrigtsen
0 siblings, 1 reply; 2+ messages in thread
From: Reiner Steib @ 2003-01-13 20:53 UTC (permalink / raw)
[-- Attachment #1: Type: text/plain, Size: 728 bytes --]
Hi,
quite often I do `V t' (gnus-score-find-trace) and then I want to
modify one of the score files listed. Putting the cursor on the
filename and `M-x ffap RET' (find-file-at-point) doesn't do the right
thing (changes are lost when I check it later with `V f
some-score-file RET' (gnus-score-edit-file)).
Therefore, I've added `gnus-score-edit-file-at-point' and bound it to
`e' in the buffer "*Score Trace*":
--8<---------------cut here---------------start------------->8---
2003-01-13 Reiner Steib <Reiner.Steib@gmx.de>
* gnus-score.el (gnus-score-edit-file-at-point): New function.
(gnus-score-find-trace): Bind it to `e' key. Added `q' for quit.
--8<---------------cut here---------------end--------------->8---
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: gnus-score.ffap.patch --]
[-- Type: text/x-patch, Size: 1243 bytes --]
--- gnus-score.el 2003/01/10 18:02:51 6.26
+++ gnus-score.el 2003/01/13 20:54:42
@@ -36,6 +36,8 @@
(require 'message)
(require 'score-mode)
+(autoload 'ffap-string-at-point "ffap")
+
(defcustom gnus-global-score-files nil
"List of global score files and directories.
Set this variable if you want to use people's score files. One entry
@@ -1101,6 +1103,11 @@
4 (substitute-command-keys
"\\<gnus-score-mode-map>\\[gnus-score-edit-exit] to save edits")))
+(defun gnus-score-edit-file-at-point ()
+ "Edit score file at point. Useful especially after `V t'."
+ (interactive)
+ (gnus-score-edit-file (ffap-string-at-point)))
+
(defun gnus-score-load-file (file)
;; Load score file FILE. Returns a list a retrieved score-alists.
(let* ((file (expand-file-name
@@ -2343,7 +2350,14 @@
1 "No score rules apply to the current article (default score %d)."
gnus-summary-default-score)
(set-buffer "*Score Trace*")
+ ;; ToDo: Use a keymap instead?
+ (local-set-key "q"
+ (lambda ()
+ (interactive)
+ (kill-buffer nil)
+ (gnus-article-show-summary)))
+ (local-set-key "e" 'gnus-score-edit-file-at-point)
(setq truncate-lines t)
(while trace
(insert (format "%S -> %s\n" (cdar trace)
[-- Attachment #3: Type: text/plain, Size: 116 bytes --]
Bye, Reiner.
--
,,,
(o o)
---ooO-(_)-Ooo--- PGP key available via WWW http://rsteib.home.pages.de/
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: gnus-score-edit-file + find-file-at-point
2003-01-13 20:53 gnus-score-edit-file + find-file-at-point Reiner Steib
@ 2003-01-13 20:59 ` Lars Magne Ingebrigtsen
0 siblings, 0 replies; 2+ messages in thread
From: Lars Magne Ingebrigtsen @ 2003-01-13 20:59 UTC (permalink / raw)
Reiner Steib <4uce.02.r.steib@gmx.net> writes:
> Therefore, I've added `gnus-score-edit-file-at-point' and bound it to
> `e' in the buffer "*Score Trace*":
Nice.
Thanks for the patch; I've applied it to Oort Gnus v0.13 (i. e., CVS).
--
(domestic pets only, the antidote for overdose, milk.)
larsi@gnus.org * Lars Magne Ingebrigtsen
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-01-13 20:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-13 20:53 gnus-score-edit-file + find-file-at-point Reiner Steib
2003-01-13 20:59 ` Lars Magne Ingebrigtsen
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).