unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: David McCracken <davidm@ixont.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 71162@debbugs.gnu.org
Subject: bug#71162: bug-gnu-emacs@gnu.org
Date: Sun, 26 May 2024 21:16:19 -0700	[thread overview]
Message-ID: <3056cd9d-9e4b-4822-a12d-a78ecaba91f5@ixont.com> (raw)
In-Reply-To: <86wmnj3fc5.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 2643 bytes --]

grep -r XPM3 * in /usr/share/emacs shows etc/PROBLEMS:** macOS doesn't 
come with libxpm, so only XPM3 is supported. This subservience  to Apple 
contradicts the general principle of open source. However, we can adapt 
to it. sudo install xpmutils installs sxpm, which can convert XPM 1 and 
2 to 3. sxpm --help is inscrutable. sxpm /file/.xpm - o /file/.xpm 
changes /file/.xpm to XPM3. When this is applied to the icon files, 
emacs 27.1 in Linux correctly uses them in the toolbar even when they 
are located in ~/icons.

Many thanks to Benjamin Riefenstahl and Eli Zaretskii for helping me to 
resolve this problem.

On 2024-05-23 11:15 PM, Eli Zaretskii wrote:
>> Date: Thu, 23 May 2024 21:08:24 -0700
>> From: David McCracken<davidm@ixont.com>
>>
>> I have developed a library that includes a toolbar with custom icons. It
>> works in all versions of Emacs in Windows and in Emacs version 26.3
>> under Ubuntu-Mate 20.54 but the toolbar doesn't work in Emacs 27.1 under
>> Ubuntu-Mate 22.04. In my preferred configuration I put my icons under
>> the user home directory so that this doesn't change if Emacs is
>> updated. My library accesses this with e.g.
>> (tool-bar-add-item "~/icons/lxa-next"
>> to use my lxa-next.xpm icon. In Emacs 26.3 it also works to put my icon
>> in /usr/share/emacs/26.3/etc/images and refer to it as simply
>> "lxa-next". Emacs 27.1 shows nothing either way. My lxa-next.xpm appears
>> similar to the native lock-broken.xpm (4.7kB vs. 4.6kB) so I
>> experimented referring to that instead of mine and it worked. I also
>> tested left-arrow but instead of left-arrow.xpm or pbm, it showed a very
>> plain < image that doesn't exist in the images directory. It should be
>> noted that there is a lock-broken.pbm but the xpm version was
>> automatically selected. The icon selection mechanism of Emacs 26.3 is
>> usable but could be improved by accepting an explicit icon file
>> extension. That of 27.1 is unusable and, unless we can fix it, I will
>> have to advise users of my library to install an older version of Emacs.
> I tried to visit the XPM file you attached, and it displays okay with
> both Emacs 27.1 and the current development version, at least on
> MS-Windows.  So I don't see a reason why this would not work on a tool
> bar.  I suggest that you post some minimal Lisp code that displays
> these icons on the Emacs tool bar, starting from "emacs -Q", and then
> we could try the code and see if the problem can be reproduced and
> debugged.
>
> Btw, to clarify: you are saying that your XPM icons don't work in
> Emacs 27.1 both on MS-Windows and on Ubuntu?  Or only on Ubuntu?
>
> Thanks.

[-- Attachment #2: Type: text/html, Size: 3151 bytes --]

  parent reply	other threads:[~2024-05-27  4:16 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-24  4:08 bug#71162: bug-gnu-emacs@gnu.org David McCracken
2024-05-24  6:15 ` Eli Zaretskii
     [not found]   ` <9002e131-3466-4a73-a88c-bad260e5b886@ixont.com>
2024-05-25  6:09     ` Eli Zaretskii
2024-05-25 19:08       ` David McCracken
2024-05-26  4:44         ` Eli Zaretskii
2024-05-25 20:04   ` David McCracken
2024-05-27  4:16   ` David McCracken [this message]
2024-05-27 11:20     ` bug#71162: In Linux Emacs 27.1 rejects custom toolbar icons Eli Zaretskii
2024-05-25 10:42 ` bug#71162: bug-gnu-emacs@gnu.org Benjamin Riefenstahl
2024-05-26 20:54 ` bug#71162: In Linux Emacs 27.1 rejects custom toolbar icons David McCracken
2024-05-28  3:56 ` bug#71162: Linux-Emacs > 26 icons David McCracken

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=3056cd9d-9e4b-4822-a12d-a78ecaba91f5@ixont.com \
    --to=davidm@ixont.com \
    --cc=71162@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /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 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).