On Wed, 06 Mar 2002, youngs(a)xemacs.org wrote:
VETO
[Please direct followups to xemacs-beta (Mail-Followup-To: set)]
I like the idea behind this patch, but I think it needs a different
approach.
|--==> "JM" == Jeff Mincy <jeff(a)delphioutpost.com> writes:
JM> Here is a patch for package-ui.el to add a
JM> pui-uninteresting-package-face to show boring packages.
JM> I also added pui-uninteresting-packages, which for non mule xemacs
JM> defaults to mule packages.
Just my opinion, but 'pui-boring-package*' seems like a better name.
That wasn't the reason for the veto, and if you want to keep
"uninteresting", that's cool.
The 'uninteresting' seemed to fit in with 'uninstalled' better (since
these boring packages are a subclass of uninstalled) also,
uninteresting seemed less pejorative than 'boring'. But, I'm easy ...
And I think it would be better to "hide" these packages
completely,
rather than just make them look like they're deleted. This wouldn't
be too hard to do, just use the 'invisible' extent property.
I tried using the invisible extent property.
(if (eq (car (cdr disp)) 'invisible)
(set-extent-property extent 'invisible t)
...)
I got a blank line where each of the mule packages were.
I got:
edebug 1.14 An Emacs Lisp debugger.
ediff 1.37 Interface over GNU patch.
I don't particularly like blank line look, so then I figured out
that the newline character at the end isn't in the extent.
(setq e (progn
(forward-line -1)
(end-of-line)
(forward-char-command 1) ;;<<<
(point)))
Ok, so no blank lines now. I don't think that change breaks anything.
Then doing
(setq buffer-invisibility-spec (not buffer-invisibility-spec))
Causes the boring invisible lines to become visible.
Which is kind of cool. Maybe that can go on the 'b' key
JM> +(defcustom pui-uninteresting-package-face 'italic
JM> + "*The face to use for uninstalled and uninteresting packages.
JM> +Set this to `nil' to use the `default' face."
JM> + :group 'pui
JM> + :type 'face)
This is fine. But it won't be needed if you make these packages invisible.
Well, now hold on there. I think you want both, a way to change the
face and to make the package line invisible.
I think you also want this choice for the other package-face possibilities.
In particular make packages that are up to date invisible. (Ie don't
bug me about the things that I don't have to do)
JM> +(defvar pui-uninteresting-packages (if (featurep 'mule)
() (list 'edict 'egg-its 'latin-unity 'leim 'locale 'lookup
'mule-base 'mule-ucs 'skk))
JM> + "List of packages that should be shown in
`pui-uninteresting-package-face'.")
JM> +
This needs to be a 'defcustom' and it should probably default to
'nil'. Also the doc string needs to be expanded upon. The way I see
it looking would be something like this (untested, may not be
correct)...
Yea, ok. I think you have an extra set of parens around the all mule choice.
The default should certainly be nil if the default action is to make
these packages invisible.
JM> version))
JM> (list " " pui-up-to-date-package-face)
JM> (list "*" pui-outdated-package-face)))
JM> - (list "-" pui-uninstalled-package-face))
JM> - ))
JM> + (list "-" (if (memq pkg-sym pui-uninteresting-packages)
JM> + pui-uninteresting-package-face
JM> + pui-uninstalled-package-face)))))
Not needed if we're hiding instead of fontifying.
The change here for pui-up-to-date-package-face depends on what your
definition of boring is and where you want to plug this feature in at.
My definition of boring is packages that are not installed and that I
never want to install (ie mule). Packages that are installed, but out
of date are by my definition *not* boring.
Intercepting at pui-package-symbol-char is an easy way to implement
my particular definition, and also allows you to make up-to-date
packages invisible.
Jeff, will you be able to submit a patch along these lines, or
should
I put it on my todo list? The more I think about this idea, the more
I like it. :-)
I can probably handle it, but if you want to make some changes along
the same line, feel free...
-jeff