From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#6130: 23.1; artist-mode spray-can malfunction Date: Fri, 23 Jan 2015 11:43:08 +0200 Message-ID: <83mw59u91v.fsf@gnu.org> References: <8dd014e7478827e94e3a8fe5b2b948e0@lysator.liu.se> <54BA6A0A.4080408@gmx.at> <54BB8375.9000506@gmx.at> <54BFD9D9.70708@gmx.at> <54C1402D.1000100@gmx.at> <54C205D0.3000607@gmx.at> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1422006262 13714 80.91.229.3 (23 Jan 2015 09:44:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 23 Jan 2015 09:44:22 +0000 (UTC) Cc: 6130@debbugs.gnu.org, busk@lysator.liu.se, dk@danielkoning.com To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jan 23 10:44:11 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YEamg-0002QN-F3 for geb-bug-gnu-emacs@m.gmane.org; Fri, 23 Jan 2015 10:44:10 +0100 Original-Received: from localhost ([::1]:57857 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YEamf-00011P-OB for geb-bug-gnu-emacs@m.gmane.org; Fri, 23 Jan 2015 04:44:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33209) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YEamb-00011H-VS for bug-gnu-emacs@gnu.org; Fri, 23 Jan 2015 04:44:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YEamY-0003ji-P5 for bug-gnu-emacs@gnu.org; Fri, 23 Jan 2015 04:44:05 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:34790) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YEamY-0003jX-L9 for bug-gnu-emacs@gnu.org; Fri, 23 Jan 2015 04:44:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YEamY-0007Qz-3f for bug-gnu-emacs@gnu.org; Fri, 23 Jan 2015 04:44:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 23 Jan 2015 09:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6130 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 6130-submit@debbugs.gnu.org id=B6130.142200620028486 (code B ref 6130); Fri, 23 Jan 2015 09:44:01 +0000 Original-Received: (at 6130) by debbugs.gnu.org; 23 Jan 2015 09:43:20 +0000 Original-Received: from localhost ([127.0.0.1]:53482 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YEalr-0007PN-NQ for submit@debbugs.gnu.org; Fri, 23 Jan 2015 04:43:20 -0500 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:50143) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YEall-0007Or-Qq for 6130@debbugs.gnu.org; Fri, 23 Jan 2015 04:43:15 -0500 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0NIM00E00IZOZP00@a-mtaout22.012.net.il> for 6130@debbugs.gnu.org; Fri, 23 Jan 2015 11:43:07 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NIM00EE6IZUX330@a-mtaout22.012.net.il>; Fri, 23 Jan 2015 11:43:07 +0200 (IST) In-reply-to: <54C205D0.3000607@gmx.at> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:98621 Archived-At: > Date: Fri, 23 Jan 2015 09:26:56 +0100 > From: martin rudalics > Cc: 6130@debbugs.gnu.org, busk , > Daniel Koning > > > So are there callers that > > actually rely on this wrong behavior? Are there callers where returning > > nil instead of a frame would be a problem? Are there callers where > > signaling an error instead of returning a frame would be a problem? > > `handle-delete-frame' seems to be the only function that expects > `posn-window' to return a frame (unconditionally, BTW). It's not the only one, AFAICS. Any function that calls x-popup-menu with a position constructed from what posn-window returns also depends on that, albeit indirectly. See, for example, mouse-select-buffer in msb.el and popup-menu-normalize-position in menu-bar.el. Other functions provide useful features based on this "misfeature". One is handle-delete-frame already mentioned above; in that case, the mouse click that deletes the frame is always on the frame, not on any window. Another user of this is mouse-buffer-menu in mouse.el. > I don't understand `handle-delete-frame' but it hardly will cause > problems when it gets nil or an error. ??? How can this support deleting a frame by clicking on some of the frame's decorations? > > That's OK, in the sense that we don't care if people's feelings > > are hurt. But if it breaks existing packages it's more problematic. It sounds like it's the latter. According to my grepping, most users of posn-window pass the result to select-window or with-selected-window or window-buffer, and will certainly bomb if the object is not a window. Some of them presumably already hit this problem, because they defend themselves against such a calamity (example: dframe.el). Btw, I'm not sure I understand why you said: > > It's wrong for posn-window to return a frame. Can you explain why it's wrong? If this is just about insufficient documentation and people's surprise when they see a frame coming out of that, then we could improve the docs.