From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#6130: 23.1; artist-mode spray-can malfunction Date: Fri, 23 Jan 2015 17:54:42 +0100 Message-ID: <54C27CD2.1040402@gmx.at> 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> <83mw59u91v.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1422032175 10372 80.91.229.3 (23 Jan 2015 16:56:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 23 Jan 2015 16:56:15 +0000 (UTC) Cc: 6130@debbugs.gnu.org, busk@lysator.liu.se, dk@danielkoning.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jan 23 17:56:14 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 1YEhWl-0002wR-B8 for geb-bug-gnu-emacs@m.gmane.org; Fri, 23 Jan 2015 17:56:11 +0100 Original-Received: from localhost ([::1]:60331 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YEhWk-0001UZ-VY for geb-bug-gnu-emacs@m.gmane.org; Fri, 23 Jan 2015 11:56:10 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50490) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YEhWg-0001Ts-5f for bug-gnu-emacs@gnu.org; Fri, 23 Jan 2015 11:56:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YEhWc-0000eo-VM for bug-gnu-emacs@gnu.org; Fri, 23 Jan 2015 11:56:06 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:35821) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YEhWc-0000ej-S1 for bug-gnu-emacs@gnu.org; Fri, 23 Jan 2015 11:56:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YEhWb-0005o4-Sg for bug-gnu-emacs@gnu.org; Fri, 23 Jan 2015 11:56:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 23 Jan 2015 16:56: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.142203211822263 (code B ref 6130); Fri, 23 Jan 2015 16:56:01 +0000 Original-Received: (at 6130) by debbugs.gnu.org; 23 Jan 2015 16:55:18 +0000 Original-Received: from localhost ([127.0.0.1]:54513 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YEhVs-0005n0-W8 for submit@debbugs.gnu.org; Fri, 23 Jan 2015 11:55:17 -0500 Original-Received: from mout.gmx.net ([212.227.15.18]:57273) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YEhVq-0005mk-TL for 6130@debbugs.gnu.org; Fri, 23 Jan 2015 11:55:15 -0500 Original-Received: from [178.190.18.67] ([178.190.18.67]) by mail.gmx.com (mrgmx001) with ESMTPSA (Nemesis) id 0MFtf4-1YSOcs07ba-00ErO6; Fri, 23 Jan 2015 17:54:52 +0100 In-Reply-To: <83mw59u91v.fsf@gnu.org> X-Provags-ID: V03:K0:LIDd5M1rCUl1+zSs+T1xUGKYb9w438iGHMw9ZOleLlodcsitegw pVuwWOg7/ys6BRrPM5a/9sosdY178G5U/8q/9nV9lcjhzvtMjqXtBPhzoL657E1fJMcQhgb w0RW0lJ8V5BrtDw+xpqVEyI7K+2mrOcIDhFzWutC0f7FT2PmXpRo25RPTeBj/C+GsEKrnYX 3dJb5QMHjiPBgvCljKC6Q== X-UI-Out-Filterresults: notjunk:1; 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:98638 Archived-At: >> `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. Yes. In these cases we'd probably pop up the menu at a position calculated from the upper left corner of the selected window. > See, for example, mouse-select-buffer in > msb.el and popup-menu-normalize-position in menu-bar.el. IIUC `popup-menu-normalize-position' relies on `posnp' so it would already fail now with a frame. > 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 suppose that (select-window (if (framep window) (frame-selected-window window) window)) would select the `frame-selected-window' of the selected frame. >> 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? It wouldn't. We'd have to use `posn-frame' here. But I fail to understand what happens when we call this with a window in EVENT. Or don't we ever? >> > 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. We've hidden the semantics of this function from the users for very long time. It's not easy to get out of this situation without compromises. martin