Hello Norbert, All!
Here is some food for thought:
I'd suggest adding a 'bugs property to packages via
package-info.in/Makefile.
We can do this in preparation for that:
How about something like this?
Index: package-ui.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/package-ui.el,v
retrieving revision 1.19
diff -u -u -r1.19 package-ui.el
--- package-ui.el 2003/04/14 03:40:27 1.19
+++ package-ui.el 2003/06/13 00:32:26
@@ -117,6 +117,7 @@
(define-key m "p" 'previous-line)
(define-key m " " 'scroll-up-command)
(define-key m [delete] 'scroll-down-command)
+ (define-key m "b" 'pui-report-package-bug)
m)
"Keymap to use in the `pui-info-buffer' buffer")
@@ -509,6 +510,41 @@
(error 'invalid-operation
"No package under cursor!"))))))
+(defun pui-report-package-bug (&optional no-error event)
+ "Display additional package info in the modeline.
+Designed to be called interactively (from a keypress)."
+ (interactive)
+ (let (extent)
+ (save-excursion
+ (beginning-of-line)
+ (cond
+ ((setq extent (extent-at (point) (current-buffer) 'pui))
+ (message (pui-help-echo extent t))
+ (let (pkg-sym info inst-ver auth-ver date maintainer balloon req)
+ (setq pkg-sym (extent-property extent 'pui-package)
+ info (extent-property extent 'pui-info)
+ inst-ver (package-get-key pkg-sym :version)
+ auth-ver (package-get-info-prop info 'author-version)
+ date (package-get-info-prop info 'date)
+ maintainer (package-get-info-prop info 'maintainer)
+ req (package-get-info-prop info 'requires)
+ bugs (package-get-info-prop info 'bugs))
+ (if bugs
+ (funcall bugs)
+ (compose-mail
+ maintainer
+ (format "[XEmacs \"%s\" package: Inst V: %.2f Auth V: %s] ..."
pkg-sym inst-ver auth-ver)
+ nil
+ nil
+ nil
+ nil
+ nil))))
+ (no-error
+ (clear-message nil))
+ (t
+ (error "No package under cursor!")))
+ )))
+
(defvar pui-menu
'("Packages"
["Toggle install " pui-toggle-package-key :active (pui-current-package)
:suffix (format "`%s'" (or (pui-current-package) "..."))]
@@ -546,14 +582,16 @@
Useful keys:
- `\\[pui-toggle-package-key]' to select/unselect the current package for
installation.
+ `\\[pui-report-package-bug]' to report bug against current package.
`\\[pui-toggle-package-delete-key]' to select/unselect the current package for
removal.
- `\\[pui-add-required-packages]' to add any packages required by those selected.
- `\\[pui-install-selected-packages]' to install/delete selected packages.
- `\\[pui-display-info]' to display additional information about the package in the
modeline.
+ `\\[pui-toggle-package-delete-key]' to select/unselect the current package for
removal.
`\\[pui-list-packages]' to refresh the package list.
- `\\[pui-toggle-verbosity-redisplay]' to toggle between a verbose and non-verbose
display.
+ `\\[pui-display-info]' to display additional information about the package in the
modeline.
`\\[pui-quit]' to kill this buffer.
+ `\\[pui-add-required-packages]' to add any packages required by those selected.
+ `\\[pui-toggle-package-key]' to select/unselect the current package for
installation.
+ `\\[pui-toggle-verbosity-redisplay]' to toggle between a verbose and non-verbose
display.
+ `\\[pui-install-selected-packages]' to install/delete selected packages.
"
(error 'invalid-operation
"You cannot enter this mode directly. Use `pui-list-packages'"))
The biggest problem I see is that some packages don't have a single
bug reporting function.
In that case we could query the user further what bug they want to
submit?
Best regards,
Adrian
>>>> "Norbert" == Norbert Koch
<viteno(a)xemacs.org> writes:
Norbert> Adrian Aichner <adrian(a)xemacs.org> writes:
Norbert> [...]
> Secondly you should submit your patch to the patch maintainer.
>
> One way to find the maintainer is best demonstrated by example (does
> that indicate we should provide a smpler mechanism, Norbert?)
>
> 1. which package is file in?
> M-x locate-library RET tetris RET
> leads
> Library is file c:\Program Files\XEmacs\xemacs-packages\lisp\games\tetris.elc
> which indicates it's in the games packages.
>
> 2. Use following command in the buffer produced by pui-list-packages:
> i runs the command pui-display-info
> This leads
> Inst V: 1.13 Auth V: 1.04 Maint: Glynn Clements <glynn(a)sensei.co.uk>
Norbert> [...]
Norbert> Yes that's definitely something worth thinking about.
Norbert> Eg. what, if we were to enhance package-get-package-provider to
Norbert> display more information, say the maintainer and probably the
Norbert> author-version as well, ie something like
Norbert> Index: package-get.el
Norbert> ===================================================================
Norbert> RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/package-get.el,v
Norbert> retrieving revision 1.63
Norbert> diff -u -u -r1.63 package-get.el
Norbert> --- package-get.el 14 May 2003 23:57:35 -0000 1.63
Norbert> +++ package-get.el 7 Jun 2003 08:48:52 -0000
Norbert> @@ -1224,7 +1224,11 @@
Norbert> (progn (setq done t)
Norbert> (setq found
Norbert> (list (caar packages)
Norbert> - (package-get-info-prop (car this-package) 'version))))
Norbert> + (package-get-info-prop (car this-package) 'version)
Norbert> + (package-get-info-prop (car this-package)
Norbert> + 'maintainer)
Norbert> + (package-get-info-prop (car this-package)
Norbert> + 'author-version))))
Norbert> (setq this-package (cdr this-package)))))
Norbert> (setq packages (cdr packages)))
Norbert> (when (interactive-p)
Norbert> This leads to
Norbert> (package-get-package-provider 'tetris)
Norbert> => (games "1.13" "Glynn Clements
<glynn(a)sensei.co.uk>" "1.04")
Norbert> I'm not sure this doesn't break code, I've only looked up the
Norbert> references in package-get.el which are not affected by this.
Norbert> Steve Y, what do you say? Maybe it's better to add another method
Norbert> which returns a more complete set of items (customisable?) to the
Norbert> caller and leave p-g-p-p in peace?
Norbert> norbert.
--
Adrian Aichner
mailto:adrian@xemacs.org
http://www.xemacs.org/