GNU bug report logs -
#7834
24.0.50; doc of `put-image'
Previous Next
Reported by: "Drew Adams" <drew.adams <at> oracle.com>
Date: Wed, 12 Jan 2011 22:41:01 UTC
Severity: minor
Tags: fixed
Found in version 24.0.50
Fixed in version 24.2
Done: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 7834 in the body.
You can then email your comments to 7834 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#7834
; Package
emacs
.
(Wed, 12 Jan 2011 22:41:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
"Drew Adams" <drew.adams <at> oracle.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Wed, 12 Jan 2011 22:41:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
The doc string does not tell you what you need to know.
Look at the code for `image-dired-dired-toggle-marked-thumbs', for
instance. You will see that it makes use of the `put-image' overlay
property (to gather the right overlay(s)). That property was added by
the call to function `put-image'.
But there is nothing in the doc for function `put-image' that mentions
that it adds property `put-image' to the overlay that it creates.
In fact, the doc says nothing about this overlay, just calling it "an
overlay". Well, at least it says that the overlay has a `before-string'
string with a `display' property whose value is the image.
1. The doc should mention the `put-image' property, which is the only
way for you to recognize such an overlay AFAICT.
2. Why not have `put-image' return the overlay itself? That would
simplify code such as that of `image-dired-dired-toggle-marked-thumbs',
which, just after calling `put-image', tries to examine all overlays at
point just to find the right one - the one with a `put-image' property.
In GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600)
of 2011-01-03 on 3249CTO
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (4.4) --no-opt --cflags
-Ic:/imagesupport/include'
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#7834
; Package
emacs
.
(Thu, 14 Jul 2011 17:45:06 GMT)
Full text and
rfc822 format available.
Message #8 received at 7834 <at> debbugs.gnu.org (full text, mbox):
"Drew Adams" <drew.adams <at> oracle.com> writes:
> 1. The doc should mention the `put-image' property, which is the only
> way for you to recognize such an overlay AFAICT.
I've now done this.
> 2. Why not have `put-image' return the overlay itself? That would
> simplify code such as that of `image-dired-dired-toggle-marked-thumbs',
> which, just after calling `put-image', tries to examine all overlays at
> point just to find the right one - the one with a `put-image' property.
That's a good idea. Stefan, however, is really against primarily
side-effect-ey functions returning usable values, so we should check
with him first.
Stefan?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog http://lars.ingebrigtsen.no/
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#7834
; Package
emacs
.
(Fri, 15 Jul 2011 14:44:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 7834 <at> debbugs.gnu.org (full text, mbox):
>> 2. Why not have `put-image' return the overlay itself? That would
>> simplify code such as that of `image-dired-dired-toggle-marked-thumbs',
>> which, just after calling `put-image', tries to examine all overlays at
>> point just to find the right one - the one with a `put-image' property.
> That's a good idea. Stefan, however, is really against primarily
> side-effect-ey functions returning usable values, so we should check
> with him first.
This function creates a new object, and that's a good idea to return it.
The cases to which I'm opposed is when the function returns something
which the caller knows even before calling the function.
Stefan
Added tag(s) pending.
Request was from
Lars Magne Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Fri, 15 Jul 2011 14:52:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#7834
; Package
emacs
.
(Fri, 15 Jul 2011 14:53:01 GMT)
Full text and
rfc822 format available.
Message #16 received at 7834 <at> debbugs.gnu.org (full text, mbox):
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
> This function creates a new object, and that's a good idea to return it.
> The cases to which I'm opposed is when the function returns something
> which the caller knows even before calling the function.
Okidoke.
I'll mark this bug as "pending", since changing the return value of
`put-image' is a new feature (and may possibly break something that
relied on the un-announced old value).
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog http://lars.ingebrigtsen.no/
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#7834
; Package
emacs
.
(Fri, 15 Jul 2011 21:02:01 GMT)
Full text and
rfc822 format available.
Message #19 received at 7834 <at> debbugs.gnu.org (full text, mbox):
> I'll mark this bug as "pending", since changing the return value of
> `put-image' is a new feature (and may possibly break something that
> relied on the un-announced old value).
OK. You can also install the change in the `pending' branch and close
the bug as "fixed in 24.2".
Stefan
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#7834
; Package
emacs
.
(Sun, 17 Jul 2011 17:51:02 GMT)
Full text and
rfc822 format available.
Message #22 received at 7834 <at> debbugs.gnu.org (full text, mbox):
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
>> I'll mark this bug as "pending", since changing the return value of
>> `put-image' is a new feature (and may possibly break something that
>> relied on the un-announced old value).
>
> OK. You can also install the change in the `pending' branch and close
> the bug as "fixed in 24.2".
For me it easier to just mark it as pending. Having a long-lived tree
that will need to be merged back later can be a bit complicated, in my
experience.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog http://lars.ingebrigtsen.no/
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#7834
; Package
emacs
.
(Tue, 10 Apr 2012 02:37:01 GMT)
Full text and
rfc822 format available.
Message #25 received at 7834 <at> debbugs.gnu.org (full text, mbox):
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
> This function creates a new object, and that's a good idea to return it.
> The cases to which I'm opposed is when the function returns something
> which the caller knows even before calling the function.
I've now installed this change.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog http://lars.ingebrigtsen.no/
Added tag(s) fixed.
Request was from
Lars Magne Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Tue, 10 Apr 2012 02:37:02 GMT)
Full text and
rfc822 format available.
bug marked as fixed in version 24.2, send any further explanations to
7834 <at> debbugs.gnu.org and "Drew Adams" <drew.adams <at> oracle.com>
Request was from
Lars Magne Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Tue, 10 Apr 2012 02:37:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 08 May 2012 11:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 12 years ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.