unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* About `image-load-path'
@ 2005-09-22  8:44 David PONCE
  2005-09-22 10:55 ` Kim F. Storm
  0 siblings, 1 reply; 12+ messages in thread
From: David PONCE @ 2005-09-22  8:44 UTC (permalink / raw)


Hello,

In image.el the new variable `image-load-path' is set to:

(list
 (file-name-as-directory (expand-file-name "images" data-directory))
 'data-directory
 'load-path)

So images are first searched in the Emacs data directory which is an
installation dependent directory. Wouldn't it be more relevant to
search in `load-path' first so it would be easier to overload standard
images?

(list
 'load-path
 (file-name-as-directory (expand-file-name "images" data-directory))
 'data-directory)

Sincerely,
David

^ permalink raw reply	[flat|nested] 12+ messages in thread
* Re: About `image-load-path'
@ 2005-09-22 11:28 David PONCE
  2005-09-22 13:03 ` Kim F. Storm
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: David PONCE @ 2005-09-22 11:28 UTC (permalink / raw)
  Cc: emacs-devel

>>So images are first searched in the Emacs data directory which is an
>>installation dependent directory. Wouldn't it be more relevant to
>>search in `load-path' first so it would be easier to overload standard
>>images?
> 
> 
> Can't you just your local directory to image-load-path ?

Yes it makes sense to let-bind `image-load-path' in my own code but it
is not so easy for libraries which are part of Emacs for example.  Do
you suggest that I change the default value of `image-load-path' in my
init file? So perhaps making `image-load-path' customizable would be a
good idea?

> I think there are some potentially wierd implications of searching
> load-path first.

I don't see them.  

^ permalink raw reply	[flat|nested] 12+ messages in thread
* Re: About `image-load-path'
@ 2005-09-23  8:47 David PONCE
  2005-09-24  7:04 ` Richard M. Stallman
  0 siblings, 1 reply; 12+ messages in thread
From: David PONCE @ 2005-09-23  8:47 UTC (permalink / raw)
  Cc: emacs-devel

Hello,

>     Yes it makes sense to let-bind `image-load-path' in my own code
>     but it is not so easy for libraries which are part of Emacs for
>     example.
> 
> Could you give an example of where you would want to do this
> in the code of a library that is part of Emacs?

I don't want to change the code of existing libraries.  Just to easily
use different sets of images.

For example, I use a different set of toolbar icons. I just put the
new ones (with same names) in a directory in my `load-path' (I have to
add 'tool-bar-setup' to `after-init-hook' too to refresh the pre-built
`tool-bar-map'), and voilà!

With the current setting of `image-load-path', if the default toolbar
icons are put in etc/images those in my `load-path' will be
ignored. To take them into account again, I'll have to change the
default value of `image-load-path' in my init file to search the
`load-path' first, or to add it my own image directory.  That's why I
suggested to at least make `image-load-path' customizable.

Anyway no problem for me ;-)

Sincerely,
David

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2005-09-25  2:40 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-22  8:44 About `image-load-path' David PONCE
2005-09-22 10:55 ` Kim F. Storm
  -- strict thread matches above, loose matches on Subject: below --
2005-09-22 11:28 David PONCE
2005-09-22 13:03 ` Kim F. Storm
2005-09-22 14:08   ` Jason Rumney
2005-09-23  0:17 ` Chong Yidong
2005-09-23  7:24 ` Richard M. Stallman
2005-09-23  8:47 David PONCE
2005-09-24  7:04 ` Richard M. Stallman
2005-09-24  8:04   ` David Kastrup
2005-09-24 11:54     ` Reiner Steib
2005-09-25  2:40     ` Richard M. Stallman

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).