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: Sat, 17 Jan 2015 14:56:26 +0100 Message-ID: <54BA6A0A.4080408@gmx.at> References: <8dd014e7478827e94e3a8fe5b2b948e0@lysator.liu.se> 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 1421503032 1791 80.91.229.3 (17 Jan 2015 13:57:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 17 Jan 2015 13:57:12 +0000 (UTC) Cc: 6130@debbugs.gnu.org To: Daniel Koning , busk Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jan 17 14:57: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 1YCTsD-0008LP-ST for geb-bug-gnu-emacs@m.gmane.org; Sat, 17 Jan 2015 14:57:10 +0100 Original-Received: from localhost ([::1]:59260 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YCTsD-0002vj-C5 for geb-bug-gnu-emacs@m.gmane.org; Sat, 17 Jan 2015 08:57:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58902) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YCTsA-0002ve-6m for bug-gnu-emacs@gnu.org; Sat, 17 Jan 2015 08:57:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YCTs7-000332-1j for bug-gnu-emacs@gnu.org; Sat, 17 Jan 2015 08:57:06 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:50898) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YCTs6-00032w-Ua for bug-gnu-emacs@gnu.org; Sat, 17 Jan 2015 08:57:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YCTs6-0002Vf-DD for bug-gnu-emacs@gnu.org; Sat, 17 Jan 2015 08:57: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: Sat, 17 Jan 2015 13:57:02 +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.14215030199637 (code B ref 6130); Sat, 17 Jan 2015 13:57:02 +0000 Original-Received: (at 6130) by debbugs.gnu.org; 17 Jan 2015 13:56:59 +0000 Original-Received: from localhost ([127.0.0.1]:59759 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YCTs2-0002VM-2I for submit@debbugs.gnu.org; Sat, 17 Jan 2015 08:56:58 -0500 Original-Received: from mout.gmx.net ([212.227.15.15]:59334) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YCTrv-0002V1-Ge for 6130@debbugs.gnu.org; Sat, 17 Jan 2015 08:56:52 -0500 Original-Received: from [178.191.141.62] ([178.191.141.62]) by mail.gmx.com (mrgmx001) with ESMTPSA (Nemesis) id 0Lux3h-1XmOTX2aYb-0101Ec; Sat, 17 Jan 2015 14:56:38 +0100 In-Reply-To: X-Provags-ID: V03:K0:ywOZ88QF6H/MULECZjsh8N40wN8rvV70XdQtstoGY6lS09AVjil L/6YZe+gR9/rWhS8I279lvp/AMrgZpGWEU1N80siQhvBtMV3VFWwYGDu2EjcTHM0DBkso41 JnzKiAPlJWSAcvy7u+aa19h5v+f56U7OSI57xJjKDEvU48wIKxaTJQi7Njz1ktxGn2AVRnh Tsfhst1iw9maP7pisfzyg== 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:98438 Archived-At: Thank you very much, especially for the detailed explanation. > Here's a patch that handles 1 through 3. I think your patch should go into Emacs 24.5. Have you signed a FSF copyright form? If not, please do that as soon as possible. > The extra explanatory material > in the docs might be an inelegant half measure, though, considering the > function and variable names still refer to the object as a window > regardless of its actual type. We could rename it to `posn-window-or-frame' and provide an alias. > I also went ahead and searched the lisp/ tree for other places that > looked risky -- that is, where a position object was assumed to hold a > window in a context where there was no such guarantee. Nothing jumped > out at me, but there could be any number of issues with third-party > code. `posnp' also looks strange in this regard. > +the second element of any mouse event in the same way. However, the ^ Please always use two spaces after the end of a sentence. > +drag event may end outside the boundaries of the selected frame. In > +that case, the third element's position list contains the selected > +frame in place of a window. I'd expect it to be the selected frame but are we 100% sure? Could this frame not still be the frame selected at the time mouse dragging started while the selected frame has changed under our feet? Think of weird things like `focus-follows-mouse' and `mouse-autoselect-window'. (This remark might be silly but I was too lazy to test its validity right now.) > +location outside the boundaries of the selected frame, in which case > +the list contains the selected frame in place of a window. Same as before. > +Return the window that @var{position} is in. If the frame with input > +focus does not have any window at @var{position}, return the frame > +instead. Hmmm... here you use "frame with input focus". This looks better but I'm still not entirely convinced. > + (window (if (windowp frame-or-window) > + frame-or-window > + nil)) Please use either (and (windowp frame-or-window) frame-or-window) or (when (windowp frame-or-window) frame-or-window) here. > + (let* ((spacing (when (display-graphic-p frame) > + (or (with-current-buffer (window-buffer window) Here `window' is the selected window. IMHO (frame-selected-window frame) sounds more accurate, given what I said about the selected frame above. > diff --git a/lisp/textmodes/artist.el b/lisp/textmodes/artist.el I didn't look into these but just trust your experience here. Thanks again, martin