all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Reiner Steib <reinersteib+gmane@imap.cc>
Subject: Re: Where to put images for lisp packages?
Date: Thu, 23 Sep 2004 18:22:55 +0200	[thread overview]
Message-ID: <v9hdpprm3k.fsf@marauder.physik.uni-ulm.de> (raw)
In-Reply-To: 87brgff2eg.fsf@tc-1-100.kawasaki.gol.ne.jp

On Fri, Sep 10 2004, Miles Bader wrote:

> Reiner Steib <4.uce.03.r.s@nurfuerspam.de> writes:
>>> If they're to go in etc/, it would be nice if they went in to a
>>> sub-hierarchy that strictly mirrored the correspodning lisp dirs, to
>>> make them easier to find (for a hacker, not for the code :-).
>>
>> "strictly" would require minor changes in `smilies.el': Look in
>> etc/gnus instead of etc/smilies.
>
> What about moving the standalone Gnus to do the same thing?

Sure.

> I'd actually go farther and put _all_ images in something like
> `etc/images/' (with further subdirs like `etc/images/gnus/' etc).

I'm not familiar with the way images should be found in Emacs.  But at
least Gnus doesn't seems to use a uniform method for finding the image
directories.  See `mm-image-load-path' (for the tool bars),
`smiley.el', `gnus-picon.el', the function
`gnus-group-startup-message', the use of `gnus-pointer.xpm', ...

After...

$ mkdir -p etc/images/gnus
$ mv lisp/gnus/*.[px][pb]? etc/images/gnus
$ mv etc/gnus*.[px][pb]?   etc/images/gnus

... and the following patch, all Gnus images (splash, mode-line,
smilies, tool bar) are found.

--8<---------------cut here---------------start------------->8---
Index: gnus.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/gnus/gnus.el,v
retrieving revision 1.30
diff -u -r1.30 gnus.el
--- gnus.el	20 Sep 2004 12:03:04 -0000	1.30
+++ gnus.el	23 Sep 2004 16:05:06 -0000
@@ -325,7 +325,8 @@
   (defvar gnus-mode-line-image-cache t)
   (if (fboundp 'find-image)
       (defun gnus-mode-line-buffer-identification (line)
-	(let ((str (car-safe line)))
+	(let ((str (car-safe line))
+	      (load-path (mm-image-load-path)))
 	  (if (and (stringp str)
 		   (string-match "^Gnus:" str))
 	      (progn (add-text-properties
@@ -874,7 +875,7 @@
    ((and
      (fboundp 'find-image)
      (display-graphic-p)
-     (let* ((data-directory (nnheader-find-etc-directory "gnus"))
+     (let* ((data-directory (nnheader-find-etc-directory "images/gnus"))
 	    (image (find-image
 		    `((:type xpm :file "gnus.xpm"
 			     :color-symbols
Index: mm-util.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/gnus/mm-util.el,v
retrieving revision 1.31
diff -u -r1.31 mm-util.el
--- mm-util.el	20 Sep 2004 12:03:04 -0000	1.31
+++ mm-util.el	23 Sep 2004 16:05:06 -0000
@@ -788,7 +788,7 @@
       (if (file-directory-p
 	   (setq dir (concat (file-name-directory
 			      (directory-file-name path))
-			     "etc/" (or package "gnus/"))))
+			     "etc/images/" (or package "gnus/"))))
 	  (push dir result))
       (push path result))))
 
Index: smiley.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/gnus/smiley.el,v
retrieving revision 1.3
diff -u -r1.3 smiley.el
--- smiley.el	20 Sep 2004 12:03:05 -0000	1.3
+++ smiley.el	23 Sep 2004 16:05:06 -0000
@@ -44,7 +44,7 @@
   :group 'gnus-visual)
 
 ;; Maybe this should go.
-(defcustom smiley-data-directory (nnheader-find-etc-directory "smilies")
+(defcustom smiley-data-directory (nnheader-find-etc-directory "images/gnus")
   "*Location of the smiley faces files."
   :type 'directory
   :group 'smiley)
--8<---------------cut here---------------end--------------->8---

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/

  reply	other threads:[~2004-09-23 16:22 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-12 23:54 Gnus branch Stefan Monnier
2004-08-13  0:08 ` David Kastrup
2004-08-13 23:58   ` Richard Stallman
2004-08-18 12:48     ` Reiner Steib
2004-08-19 18:05       ` Richard Stallman
2004-08-19 18:26         ` Stefan Monnier
2004-08-20 21:08           ` Richard Stallman
2004-08-22 21:06         ` Reiner Steib
2004-08-22 21:06         ` Reiner Steib
2004-08-30 21:51         ` Reiner Steib
2004-08-30 23:46           ` Katsumi Yamaoka
2004-08-31 22:55             ` Katsumi Yamaoka
2004-08-31 22:06           ` Richard Stallman
2004-08-31 22:46           ` Miles Bader
2004-09-01  7:49             ` Reiner Steib
2004-09-04 13:24               ` Gnus 5.10 is now on the trunk Miles Bader
2004-09-05 17:45                 ` Reiner Steib
2004-09-05 23:10                   ` Miles Bader
2004-09-07  3:43                   ` Richard Stallman
2004-09-07  4:28                     ` Miles Bader
2004-09-08  0:22                       ` Richard Stallman
2004-09-07 15:01                     ` Lars Magne Ingebrigtsen
2004-09-07 21:38                       ` Kim F. Storm
2004-09-08 18:18                         ` defcustoms without group declaration (was: Gnus 5.10 is now on the trunk) Reiner Steib
2004-09-08  0:22                       ` Gnus 5.10 is now on the trunk Richard Stallman
2004-09-08 10:33                         ` Lars Magne Ingebrigtsen
2004-09-06  2:08                 ` Sam Steingold
2004-09-06  2:54                   ` Miles Bader
2004-09-06 17:58                     ` Reiner Steib
2004-09-07  0:15                       ` Sam Steingold
2004-09-09 13:32                         ` Gnus image problem (was: Gnus 5.10 is now on the trunk) Reiner Steib
2004-09-07  0:22                       ` Gnus 5.10 is now on the trunk Miles Bader
2004-09-09 10:11                     ` Miles Bader
2004-09-09 13:33                       ` Where to put images for lisp packages? (was: Gnus 5.10 is now on the trunk) Reiner Steib
2004-09-09 23:28                         ` Where to put images for lisp packages? Miles Bader
2004-09-23 16:22                           ` Reiner Steib [this message]
2004-10-06 18:42                             ` Reiner Steib
2004-10-07  1:03                               ` Miles Bader
2004-10-07  7:22                                 ` Reiner Steib
2004-09-09 14:19                       ` Gnus version numbers (was: Gnus 5.10 is now on the trunk) Reiner Steib
2004-09-09 15:49                         ` Gnus version numbers Lars Magne Ingebrigtsen
2004-09-10 12:29                           ` Reiner Steib
2004-09-10 13:48                             ` Lars Magne Ingebrigtsen
2004-09-10 17:49                             ` Stefan Monnier
2004-09-10 18:04                               ` Lars Magne Ingebrigtsen
2004-09-13 17:20                             ` Reiner Steib
2004-09-13 18:29                               ` Lars Magne Ingebrigtsen
2004-09-14  9:49                         ` Per Abrahamsen
2004-08-22 20:55 ` Gnus branch Reiner Steib
     [not found]   ` <E1Bz9hx-0003St-5X@fencepost.gnu.org>
2004-08-23 13:17     ` Reiner Steib
2004-08-23 23:52       ` Richard Stallman
2004-08-24  8:48         ` Reiner Steib
2004-08-25  4:40           ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=v9hdpprm3k.fsf@marauder.physik.uni-ulm.de \
    --to=reinersteib+gmane@imap.cc \
    --cc=Reiner.Steib@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.