* Customize topic?
@ 1998-10-26 8:23 Kai Grossjohann
1998-10-28 18:21 ` Patch for customizing topics (was: Re: Customize topic?) Per Abrahamsen
0 siblings, 1 reply; 2+ messages in thread
From: Kai Grossjohann @ 1998-10-26 8:23 UTC (permalink / raw)
Some time ago, I suggested to Lars that `G c' should customize topics
as well as groups, similar to `G p' editing the parameters of both
topics and groups. Lars said he didn't want to go into that, so I had
a look at gnus-cus.el, and I must confess I understand none of it :-(
Is anybody interested in extending M-x gnus-group-customize RET to
topics? Per?
kai
--
Life is hard and then you die.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Patch for customizing topics (was: Re: Customize topic?)
1998-10-26 8:23 Customize topic? Kai Grossjohann
@ 1998-10-28 18:21 ` Per Abrahamsen
0 siblings, 0 replies; 2+ messages in thread
From: Per Abrahamsen @ 1998-10-28 18:21 UTC (permalink / raw)
This patch is for Gnus v5.6.42, I haven't installed pgnus yet. But it
might apply cleanly to pgnus nonetheless.
1998-10-28 Per Abrahamsen <abraham@dina.kvl.dk>
* gnus-cus-new.el (gnus-custom-topic): New free variable.
(gnus-group-customize): Support editing topic parameters.
cd ~/emacs/gnus/lisp/
diff -c gnus-cus.el gnus-cus-new.el
*** gnus-cus.el Thu Aug 27 11:03:56 1998
--- gnus-cus-new.el Wed Oct 28 19:10:38 1998
***************
*** 169,178 ****
(defvar gnus-custom-params)
(defvar gnus-custom-method)
(defvar gnus-custom-group)
! (defun gnus-group-customize (group)
! "Edit the group on the current line."
! (interactive (list (gnus-group-group-name)))
(let (info
(types (mapcar (lambda (entry)
`(cons :format "%v%h\n"
--- 169,179 ----
(defvar gnus-custom-params)
(defvar gnus-custom-method)
(defvar gnus-custom-group)
+ (defvar gnus-custom-topic)
! (defun gnus-group-customize (group topic)
! "Edit the group or topicon the current line."
! (interactive (list (gnus-group-group-name) (gnus-group-topic-name)))
(let (info
(types (mapcar (lambda (entry)
`(cons :format "%v%h\n"
***************
*** 180,188 ****
(const :format "" ,(nth 0 entry))
,(nth 1 entry)))
gnus-group-parameters)))
! (unless group
(error "No group on current line"))
! (unless (setq info (gnus-get-info group))
(error "Killed group; can't be edited"))
;; Ready.
(kill-buffer (gnus-get-buffer-create "*Gnus Customize*"))
--- 181,191 ----
(const :format "" ,(nth 0 entry))
,(nth 1 entry)))
gnus-group-parameters)))
! (unless (or group topic)
(error "No group on current line"))
! (when (and group topic)
! (error "Both a group an topic on current line"))
! (unless (or topic (setq info (gnus-get-info group)))
(error "Killed group; can't be edited"))
;; Ready.
(kill-buffer (gnus-get-buffer-create "*Gnus Customize*"))
***************
*** 190,202 ****
(gnus-custom-mode)
(make-local-variable 'gnus-custom-group)
(setq gnus-custom-group group)
(widget-insert "Customize the ")
! (widget-create 'info-link
! :help-echo "Push me to learn more."
! :tag "group parameters"
! "(gnus)Group Parameters")
(widget-insert " for <")
! (widget-insert group)
(widget-insert "> and press ")
(widget-create 'push-button
:tag "done"
--- 193,212 ----
(gnus-custom-mode)
(make-local-variable 'gnus-custom-group)
(setq gnus-custom-group group)
+ (make-local-variable 'gnus-custom-topic)
+ (setq gnus-custom-topic topic)
(widget-insert "Customize the ")
! (if group
! (widget-create 'info-link
! :help-echo "Push me to learn more."
! :tag "group parameters"
! "(gnus)Group Parameters")
! (widget-create 'info-link
! :help-echo "Push me to learn more."
! :tag "topic parameters"
! "(gnus)Topic Parameters"))
(widget-insert " for <")
! (widget-insert (or group topic))
(widget-insert "> and press ")
(widget-create 'push-button
:tag "done"
***************
*** 206,220 ****
(make-local-variable 'gnus-custom-params)
(setq gnus-custom-params
(widget-create 'group
! :value (gnus-info-params info)
`(set :inline t
:greedy t
:tag "Parameters"
:format "%t:\n%h%v"
:doc "\
These special paramerters are recognized by Gnus.
! Check the [ ] for the parameters you want to apply to this group, then
! edit the value to suit your taste."
,@types)
'(repeat :inline t
:tag "Variables"
--- 216,232 ----
(make-local-variable 'gnus-custom-params)
(setq gnus-custom-params
(widget-create 'group
! :value (if group
! (gnus-info-params info)
! (gnus-topic-parameters topic))
`(set :inline t
:greedy t
:tag "Parameters"
:format "%t:\n%h%v"
:doc "\
These special paramerters are recognized by Gnus.
! Check the [ ] for the parameters you want to apply to this group or
! to the groups in this topic, then edit the value to suit your taste."
,@types)
'(repeat :inline t
:tag "Variables"
***************
*** 240,265 ****
'(repeat :inline t
:tag "Unknown entries"
sexp)))
! (widget-insert "\n\nYou can also edit the ")
! (widget-create 'info-link
! :tag "select method"
! :help-echo "Push me to learn more about select methods."
! "(gnus)Select Methods")
! (widget-insert " for the group.\n")
! (setq gnus-custom-method
! (widget-create 'sexp
! :tag "Method"
! :value (gnus-info-method info)))
(use-local-map widget-keymap)
(widget-setup)))
(defun gnus-group-customize-done (&rest ignore)
"Apply changes and bury the buffer."
(interactive)
! (gnus-group-edit-group-done 'params gnus-custom-group
! (widget-value gnus-custom-params))
! (gnus-group-edit-group-done 'method gnus-custom-group
! (widget-value gnus-custom-method))
(bury-buffer))
;;; Score Customization:
--- 252,281 ----
'(repeat :inline t
:tag "Unknown entries"
sexp)))
! (when group
! (widget-insert "\n\nYou can also edit the ")
! (widget-create 'info-link
! :tag "select method"
! :help-echo "Push me to learn more about select methods."
! "(gnus)Select Methods")
! (widget-insert " for the group.\n")
! (setq gnus-custom-method
! (widget-create 'sexp
! :tag "Method"
! :value (gnus-info-method info))))
(use-local-map widget-keymap)
(widget-setup)))
(defun gnus-group-customize-done (&rest ignore)
"Apply changes and bury the buffer."
(interactive)
! (if gnus-custom-topic
! (gnus-topic-set-parameters gnus-custom-topic
! (widget-value gnus-custom-params))
! (gnus-group-edit-group-done 'params gnus-custom-group
! (widget-value gnus-custom-params))
! (gnus-group-edit-group-done 'method gnus-custom-group
! (widget-value gnus-custom-method)))
(bury-buffer))
;;; Score Customization:
Compilation exited abnormally with code 1 at Wed Oct 28 19:14:13
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1998-10-28 18:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-10-26 8:23 Customize topic? Kai Grossjohann
1998-10-28 18:21 ` Patch for customizing topics (was: Re: Customize topic?) Per Abrahamsen
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).