emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tree widget


From: David PONCE
Subject: Re: tree widget
Date: Thu, 29 Apr 2004 18:06:00 +0200 (CEST)

[...]
> How do you think including tree-widget developed by David PONCE 
> in emacs official distribution?

Hi All,

I received, and will shortly send back the signed paper
allowing to include tree-widget in the GNU Emacs distribution.  As I
got write access to CVS, I should be able to check it in myself.

In order to do so, I would like some advice about the following
points.

First, I suppose that tree-widget.el should go into the main lisp
directory?

The next point looks more promizing ;-)

tree-widget can use image themes to display nice-looking trees.  For
now, I created two graphical themes: a general purpose "default"
theme, and a file system oriented "folder" theme.  Each theme contains
a set of images with predefined names that represent the different
parts of the tree to draw.  When an image is not found in a particular
theme, the one in the "default" theme is used, so it is easy to create
a new theme by overriding only certain images.

>From an implementation point of view, a theme is a subdirectory in a
main theme directory:

 tree-widget-themes/
   default/
     <default-theme-images>
   folder/
     <folder-theme-images>

Choosing a theme, is simply to give the name of the corresponding
subdirectory.

The main theme directory is customizable, it can be an absolute name,
or the name of a subdirectory located respectively in the `load-path'
or in the `data-directory'.  By default, tree-widget search for a
"tree-widget-themes" subdirectory.

My question is where to install the theme directory?  In the lisp
directory (I am not convinced this is the right place), or in the
`data-directory' ("./etc"), which seems a better choice.

It is not clear to me where images (and other data files) specific to a
package should be installed.  To compare, in XEmacs things look
better: each package has its own data directory where you can put
images and other things.  A `locate-data-directory' function is
provided for packages to easily retrieve their data directory.  For
example tree-widget uses (locate-data-directory "tree-widget").

Perhaps it could be worth having a similar organization in "etc", that
is a sub-directory for each package that needs one for its data files.
This way the lisp directory would remain clean (only Elisp).

For example, there could be a "etc/tree-widget" directory where
tree-widget could search for the "built-in" themes.  It is easily to
use its own themes via a customized theme directory added to the
`load-path'.

I hope my explanations were clear enough.  Thank you so much for any
advice.

Regards.

David




reply via email to

[Prev in Thread] Current Thread [Next in Thread]