From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/18270 Path: main.gmane.org!not-for-mail From: Per Abrahamsen Newsgroups: gmane.emacs.gnus.general Subject: Patch for customizing topics (was: Re: Customize topic?) Date: 28 Oct 1998 19:21:52 +0100 Organization: The Church of Emacs Sender: owner-ding@hpc.uh.edu Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1035156822 5259 80.91.224.250 (20 Oct 2002 23:33:42 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 23:33:42 +0000 (UTC) Return-Path: Original-Received: from fisher.math.uh.edu (fisher.math.uh.edu [129.7.128.35]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id NAA29962 for ; Wed, 28 Oct 1998 13:22:58 -0500 (EST) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by fisher.math.uh.edu (8.9.1/8.9.1) with ESMTP id MAB23476; Wed, 28 Oct 1998 12:22:27 -0600 (CST) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Wed, 28 Oct 1998 12:22:13 -0600 (CST) Original-Received: from sclp3.sclp.com (root@sclp3.sclp.com [209.195.19.139]) by sina.hpc.uh.edu (8.7.3/8.7.3) with ESMTP id MAA07203 for ; Wed, 28 Oct 1998 12:22:01 -0600 (CST) Original-Received: from sheridan.dina.kvl.dk (root@sheridan.dina.kvl.dk [130.225.40.227]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id NAA29947 for ; Wed, 28 Oct 1998 13:21:58 -0500 (EST) Original-Received: from zuse.dina.kvl.dk (zuse.dina.kvl.dk [130.225.40.245]) by sheridan.dina.kvl.dk (8.9.0.Beta5/8.9.0.Beta5) with ESMTP id TAA19562; Wed, 28 Oct 1998 19:22:20 +0100 Original-Received: (abraham@localhost) by zuse.dina.kvl.dk (8.6.12/8.6.4) id TAA08718; Wed, 28 Oct 1998 19:21:52 +0100 Original-To: ding@gnus.org X-Face: +kRV2]2q}lixHkE{U)mY#+6]{AH=yN~S9@IFiOa@X6?GM|8MBp/ Original-Lines: 191 X-Mailer: Gnus v5.6.42/Emacs 20.2 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:18270 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:18270 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 * 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