* bug#58002: 29.1: Sokoban: obsoletion warnings in gamegrid
@ 2022-09-22 10:06 Mattias Engdegård
2022-09-22 12:29 ` Dieter Deyke
0 siblings, 1 reply; 9+ messages in thread
From: Mattias Engdegård @ 2022-09-22 10:06 UTC (permalink / raw)
To: 58002; +Cc: Dieter Deyke, Stefan Kangas
[-- Attachment #1: Type: text/plain, Size: 685 bytes --]
On Emacs master, starting Sokoban (from GNU ELPA) results in several warnings:
> Warning (gamegrid): Using obsolete XEmacs style "glyph"; convert to an Emacs image-spec instead
which apparently is from
> (defvar sokoban-target-options
> `(((glyph
> [xpm :data ,sokoban-target-xpm])
[...]
where (after some digging) it seems that the vector needs to be
((:type xpm :data ,sokoban-target-xpm :ascent center)))
somewhat non-intuitively, because of the slightly alarming line
> (find-image data)) ;untested!
in gamegrid.el. Suggested patch attached.
Is this all correct and as desired? Does it break anything when using old Emacs versions?
[-- Attachment #2: sokoban-warning.diff --]
[-- Type: application/octet-stream, Size: 2120 bytes --]
diff --git a/sokoban.el b/sokoban.el
index 128d59ad98..710139b09f 100644
--- a/sokoban.el
+++ b/sokoban.el
@@ -403,7 +403,7 @@ static char * player_on_target_xpm[] = {
(defvar sokoban-floor-options
`(((glyph
- [xpm :data ,sokoban-floor-xpm])
+ ((:type xpm :data ,sokoban-floor-xpm :ascent center)))
(t ?\040))
((color-x color-x)
(mono-x grid-x)
@@ -413,7 +413,7 @@ static char * player_on_target_xpm[] = {
(defvar sokoban-target-options
`(((glyph
- [xpm :data ,sokoban-target-xpm])
+ ((:type xpm :data ,sokoban-target-xpm :ascent center)))
((mono-x mono-tty emacs-tty) ?\.)
(t ?\040))
((color-x color-x)
@@ -424,7 +424,7 @@ static char * player_on_target_xpm[] = {
(defvar sokoban-wall-options
`(((glyph
- [xpm :data ,sokoban-wall-xpm])
+ ((:type xpm :data ,sokoban-wall-xpm :ascent center)))
(emacs-tty ?\X)
(t ?\040))
((color-x color-x)
@@ -436,7 +436,7 @@ static char * player_on_target_xpm[] = {
(defvar sokoban-block-options
`(((glyph
- [xpm :data ,sokoban-block-xpm])
+ ((:type xpm :data ,sokoban-block-xpm :ascent center)))
((mono-x mono-tty emacs-tty) ?\O)
(t ?\040))
((color-x color-x)
@@ -447,7 +447,7 @@ static char * player_on_target_xpm[] = {
(defvar sokoban-block-on-target-options
`(((glyph
- [xpm :data ,sokoban-block-on-target-xpm])
+ ((:type xpm :data ,sokoban-block-on-target-xpm :ascent center)))
((mono-x mono-tty emacs-tty) ?\O)
(t ?\040))
((color-x color-x)
@@ -458,7 +458,7 @@ static char * player_on_target_xpm[] = {
(defvar sokoban-player-options
`(((glyph
- [xpm :data ,sokoban-player-xpm])
+ ((:type xpm :data ,sokoban-player-xpm :ascent center)))
(t ?\*))
((color-x color-x)
(mono-x grid-x)
@@ -468,7 +468,7 @@ static char * player_on_target_xpm[] = {
(defvar sokoban-player-on-target-options
`(((glyph
- [xpm :data ,sokoban-player-on-target-xpm])
+ ((:type xpm :data ,sokoban-player-on-target-xpm :ascent center)))
(t ?\*))
((color-x color-x)
(mono-x grid-x)
^ permalink raw reply related [flat|nested] 9+ messages in thread
* bug#58002: 29.1: Sokoban: obsoletion warnings in gamegrid
2022-09-22 10:06 bug#58002: 29.1: Sokoban: obsoletion warnings in gamegrid Mattias Engdegård
@ 2022-09-22 12:29 ` Dieter Deyke
2022-09-22 12:39 ` Mattias Engdegård
0 siblings, 1 reply; 9+ messages in thread
From: Dieter Deyke @ 2022-09-22 12:29 UTC (permalink / raw)
To: Mattias Engdegård; +Cc: 58002, stefankangas
Mattias Engdegård <mattias.engdegard@gmail.com> writes:
> On Emacs master, starting Sokoban (from GNU ELPA) results in several warnings:
>
>> Warning (gamegrid): Using obsolete XEmacs style "glyph"; convert to an Emacs image-spec instead
>
> which apparently is from
>
>> (defvar sokoban-target-options
>> `(((glyph
>> [xpm :data ,sokoban-target-xpm])
> [...]
>
> where (after some digging) it seems that the vector needs to be
>
> ((:type xpm :data ,sokoban-target-xpm :ascent center)))
>
> somewhat non-intuitively, because of the slightly alarming line
>
>> (find-image data)) ;untested!
>
> in gamegrid.el. Suggested patch attached.
> Is this all correct and as desired? Does it break anything when using old Emacs versions?
Thanks for your efforts, but that patch does not silence the warnings on
my system. It looks like more is needed, but I do not know how to fix
it.
--
Dieter Deyke
mailto:dieter.deyke@gmail.com
Get my Gnupg key:
gpg --keyserver keys.gnupg.net --recv-keys B116EA20
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#58002: 29.1: Sokoban: obsoletion warnings in gamegrid
2022-09-22 12:29 ` Dieter Deyke
@ 2022-09-22 12:39 ` Mattias Engdegård
2022-09-22 12:54 ` Dieter Deyke
0 siblings, 1 reply; 9+ messages in thread
From: Mattias Engdegård @ 2022-09-22 12:39 UTC (permalink / raw)
To: Dieter Deyke; +Cc: 58002, stefankangas
22 sep. 2022 kl. 14.29 skrev Dieter Deyke <dieter.deyke@gmail.com>:
> Thanks for your efforts, but that patch does not silence the warnings on
> my system. It looks like more is needed, but I do not know how to fix
> it.
That's odd. What warnings do you get with the patch applied?
And the usual IT support questions: Are you sure you are running the right file? Did you remember to recompile it?
Are you sure your computer is plugged in?
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#58002: 29.1: Sokoban: obsoletion warnings in gamegrid
2022-09-22 12:39 ` Mattias Engdegård
@ 2022-09-22 12:54 ` Dieter Deyke
2022-09-22 14:01 ` Stefan Kangas
2022-11-12 21:11 ` Stefan Kangas
0 siblings, 2 replies; 9+ messages in thread
From: Dieter Deyke @ 2022-09-22 12:54 UTC (permalink / raw)
To: Mattias Engdegård; +Cc: 58002, stefankangas
Mattias Engdegård <mattias.engdegard@gmail.com> writes:
> 22 sep. 2022 kl. 14.29 skrev Dieter Deyke <dieter.deyke@gmail.com>:
>
>> Thanks for your efforts, but that patch does not silence the warnings on
>> my system. It looks like more is needed, but I do not know how to fix
>> it.
>
> That's odd. What warnings do you get with the patch applied?
> And the usual IT support questions: Are you sure you are running the
> right file? Did you remember to recompile it?
> Are you sure your computer is plugged in?
Obviously not. I patched the file, loaded it into an emacs buffer, did
an eval-buffer on it, followed by M-x sokoban. That was not good
enough. So I deleted the .elc file, killed, and re-started emacs, and
now everything is fine, and I stand there as a fool (but I get used to
that). I do not know, how your patch will affect older emacs versions,
but if I get no negative feedback, I will apply the patch to the repo in
a week.
Thanks again.
--
Dieter Deyke
mailto:dieter.deyke@gmail.com
Get my Gnupg key:
gpg --keyserver keys.gnupg.net --recv-keys B116EA20
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#58002: 29.1: Sokoban: obsoletion warnings in gamegrid
2022-09-22 12:54 ` Dieter Deyke
@ 2022-09-22 14:01 ` Stefan Kangas
2022-09-23 8:56 ` Mattias Engdegård
2022-11-12 21:11 ` Stefan Kangas
1 sibling, 1 reply; 9+ messages in thread
From: Stefan Kangas @ 2022-09-22 14:01 UTC (permalink / raw)
To: Dieter Deyke, Mattias Engdegård; +Cc: 58002
Dieter Deyke <dieter.deyke@gmail.com> writes:
> I do not know, how your patch will affect older emacs versions, but if
> I get no negative feedback, I will apply the patch to the repo in a
> week.
Thanks for the patch, Mattias. I was meaning to look into this, but it
seems like you beat me to it.
I've done some minimal testing of the patch on Emacs 27.1 and current
master, and everything seems to work here.
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#58002: 29.1: Sokoban: obsoletion warnings in gamegrid
2022-09-22 14:01 ` Stefan Kangas
@ 2022-09-23 8:56 ` Mattias Engdegård
0 siblings, 0 replies; 9+ messages in thread
From: Mattias Engdegård @ 2022-09-23 8:56 UTC (permalink / raw)
To: Stefan Kangas; +Cc: 58002, Dieter Deyke
22 sep. 2022 kl. 16.01 skrev Stefan Kangas <stefankangas@gmail.com>:
> I was meaning to look into this, but it
> seems like you beat me to it.
We must get our priorities right, it's Sokoban after all!
> I've done some minimal testing of the patch on Emacs 27.1 and current
> master, and everything seems to work here.
Thank you. Let's see how far back in Emacs history Dieter wants to test it.
Oh, and about the
> (find-image data)) ;untested!
in gamegrid-make-glyph, well that path isn't untested any more -- but the Sokoban patch works backwards from that code so it isn't really a proper validation. Then again, the ;untested! line is 20 years old so...
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#58002: 29.1: Sokoban: obsoletion warnings in gamegrid
2022-09-22 12:54 ` Dieter Deyke
2022-09-22 14:01 ` Stefan Kangas
@ 2022-11-12 21:11 ` Stefan Kangas
2022-11-13 6:17 ` Dieter Deyke
1 sibling, 1 reply; 9+ messages in thread
From: Stefan Kangas @ 2022-11-12 21:11 UTC (permalink / raw)
To: Dieter Deyke; +Cc: 58002, Mattias Engdegård
Dieter Deyke <dieter.deyke@gmail.com> writes:
> Mattias Engdegård <mattias.engdegard@gmail.com> writes:
>
>> 22 sep. 2022 kl. 14.29 skrev Dieter Deyke <dieter.deyke@gmail.com>:
>>
>>> Thanks for your efforts, but that patch does not silence the warnings on
>>> my system. It looks like more is needed, but I do not know how to fix
>>> it.
>>
>> That's odd. What warnings do you get with the patch applied?
>> And the usual IT support questions: Are you sure you are running the
>> right file? Did you remember to recompile it?
>> Are you sure your computer is plugged in?
>
> Obviously not. I patched the file, loaded it into an emacs buffer, did
> an eval-buffer on it, followed by M-x sokoban. That was not good
> enough. So I deleted the .elc file, killed, and re-started emacs, and
> now everything is fine, and I stand there as a fool (but I get used to
> that). I do not know, how your patch will affect older emacs versions,
> but if I get no negative feedback, I will apply the patch to the repo in
> a week.
Was this patch installed? Can the bug be closed? Thanks in advance.
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#58002: 29.1: Sokoban: obsoletion warnings in gamegrid
2022-11-12 21:11 ` Stefan Kangas
@ 2022-11-13 6:17 ` Dieter Deyke
2022-11-13 13:59 ` Stefan Kangas
0 siblings, 1 reply; 9+ messages in thread
From: Dieter Deyke @ 2022-11-13 6:17 UTC (permalink / raw)
To: Stefan Kangas; +Cc: 58002, Mattias Engdegård
Stefan Kangas <stefankangas@gmail.com> writes:
> Dieter Deyke <dieter.deyke@gmail.com> writes:
>
>> Mattias Engdegård <mattias.engdegard@gmail.com> writes:
>>
>>> 22 sep. 2022 kl. 14.29 skrev Dieter Deyke <dieter.deyke@gmail.com>:
>>>
>>>> Thanks for your efforts, but that patch does not silence the warnings on
>>>> my system. It looks like more is needed, but I do not know how to fix
>>>> it.
>>>
>>> That's odd. What warnings do you get with the patch applied?
>>> And the usual IT support questions: Are you sure you are running the
>>> right file? Did you remember to recompile it?
>>> Are you sure your computer is plugged in?
>>
>> Obviously not. I patched the file, loaded it into an emacs buffer, did
>> an eval-buffer on it, followed by M-x sokoban. That was not good
>> enough. So I deleted the .elc file, killed, and re-started emacs, and
>> now everything is fine, and I stand there as a fool (but I get used to
>> that). I do not know, how your patch will affect older emacs versions,
>> but if I get no negative feedback, I will apply the patch to the repo in
>> a week.
>
> Was this patch installed? Can the bug be closed? Thanks in advance.
Yes, the patch was installed, the warnings are gone, everything is fine
now. Please close the bug.
Thank you,
--
Dieter Deyke
mailto:dieter.deyke@gmail.com
Get my Gnupg key:
gpg --keyserver keys.gnupg.net --recv-keys B116EA20
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2022-11-13 13:59 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-22 10:06 bug#58002: 29.1: Sokoban: obsoletion warnings in gamegrid Mattias Engdegård
2022-09-22 12:29 ` Dieter Deyke
2022-09-22 12:39 ` Mattias Engdegård
2022-09-22 12:54 ` Dieter Deyke
2022-09-22 14:01 ` Stefan Kangas
2022-09-23 8:56 ` Mattias Engdegård
2022-11-12 21:11 ` Stefan Kangas
2022-11-13 6:17 ` Dieter Deyke
2022-11-13 13:59 ` Stefan Kangas
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.