Subject: bug#6130: 23.1; artist-mode spray-can malfunction

From: martin rudalics <[email-masked]>
Date: Wed, 21 Jan 2015 17:54:49 +0100

> The Right Thing to do, AFAICT, is for posnp to return non-nil also when
 > the `car' is a frame.

If the caller of `posnp' is not prepared to deal with a frame but used
`posnp' to check that the position is "valid", it currently will not
fail.  If we have `posnp' return t for a frame as well, it will fail.
And as Daniel has shown, such a failure can be quite annoying in its
consequences.  It probably could have been avoided if artist had used
`posnp'.  So at least for Emacs 24.5 I would rather not change the
current behavior.  I would change it for Emacs 25.

 > For posn-window, the question is more tricky.  I don't think it should
 > ever return a frame, since its name makes it clear it returns a window.

Agreed.  But `posn-window' is just a mnemonic for "get me the first
element of a position".

 > So we should either make it return nil when the car is a frame, or
 > signal an error, or return the frame's selected-window,

The latter would be certainly wrong.  We are NOT in that window.

 > and/or deprecate
 > it (in favor of a new posn-window-or-frame).

That's what I had in mind.

 > Can someone look at its various users to see what would be best?

martin