GNU bug report logs - #28621
Proposed patch for doc of posn-window and code of posn-set-point to handle frame arguments

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: minor; Reported by: rswgnu@HIDDEN; dated Wed, 27 Sep 2017 16:03:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 28621 <at> debbugs.gnu.org:


Received: (at 28621) by debbugs.gnu.org; 29 Sep 2017 16:49:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Sep 29 12:49:04 2017
Received: from localhost ([127.0.0.1]:39472 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1dxyTI-0002p2-Ih
	for submit <at> debbugs.gnu.org; Fri, 29 Sep 2017 12:49:04 -0400
Received: from eggs.gnu.org ([208.118.235.92]:54392)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rsw@HIDDEN>) id 1dxyTG-0002oW-RF
 for 28621 <at> debbugs.gnu.org; Fri, 29 Sep 2017 12:49:03 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <rsw@HIDDEN>) id 1dxyT7-0008FW-N8
 for 28621 <at> debbugs.gnu.org; Fri, 29 Sep 2017 12:48:57 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: *
X-Spam-Status: No, score=1.3 required=5.0 tests=BAYES_50,HTML_MESSAGE,
 RCVD_IN_SORBS_SPAM,RP_MATCHES_RCVD autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:49205)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <rsw@HIDDEN>)
 id 1dxyT7-0008FJ-JR
 for 28621 <at> debbugs.gnu.org; Fri, 29 Sep 2017 12:48:53 -0400
Received: from mail-qt0-f180.google.com ([209.85.216.180]:52323)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128)
 (Exim 4.82) (envelope-from <rsw@HIDDEN>) id 1dxyT7-0006od-5n
 for 28621 <at> debbugs.gnu.org; Fri, 29 Sep 2017 12:48:53 -0400
Received: by mail-qt0-f180.google.com with SMTP id o52so274960qtc.9
 for <28621 <at> debbugs.gnu.org>; Fri, 29 Sep 2017 09:48:53 -0700 (PDT)
X-Gm-Message-State: AMCzsaXSE8RRcJSm0WxDckDii1BN1wt6v/z2PRheT7iMhfXSZMR+7ybH
 eNS+DyXF1dDk4ZLRXPcdUWgflNBt6LYFuDINNC0=
X-Google-Smtp-Source: AOwi7QAmqZnI5YRzFGknMEmZUwofubt2jJ0/Wf7+tESd+hy/FDe8Kak3fujKWO37hUv4GNboSJaxEfThfsuzwH5GHuc=
X-Received: by 10.200.54.3 with SMTP id m3mr7415180qtb.197.1506703732516; Fri,
 29 Sep 2017 09:48:52 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.237.34.225 with HTTP; Fri, 29 Sep 2017 09:48:22 -0700 (PDT)
In-Reply-To: <59CE05A4.80701@HIDDEN>
References: <CA+OMD9ieLvVUCu6ubaHohNso+s9TGK+oJcnRVkdyZ4+2JtM41g@HIDDEN>
 <59CE05A4.80701@HIDDEN>
From: Robert Weiner <rsw@HIDDEN>
Date: Fri, 29 Sep 2017 12:48:22 -0400
X-Gmail-Original-Message-ID: <CA+OMD9ia44v+iK4A8Juaf0YtJXbNiUcW_bRJiV2Yfg_feNzv7Q@HIDDEN>
Message-ID: <CA+OMD9ia44v+iK4A8Juaf0YtJXbNiUcW_bRJiV2Yfg_feNzv7Q@HIDDEN>
Subject: Re: bug#28621: Proposed patch for doc of posn-window and code of
 posn-set-point to handle frame arguments
To: martin rudalics <rudalics@HIDDEN>
Content-Type: multipart/alternative; boundary="001a1137b054c22e48055a56cc46"
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -2.0 (--)
X-Debbugs-Envelope-To: 28621
Cc: 28621 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: rswgnu@HIDDEN
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.5 (----)

--001a1137b054c22e48055a56cc46
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Fri, Sep 29, 2017 at 4:34 AM, martin rudalics <rudalics@HIDDEN> wrote:

> > ! `posn-window': The window or frame of the event end.
>
> If we start talking about "event ends" here we should export that
> =E2=80=8B=E2=80=8B
> concept to the remaining =E2=80=98posn-*=E2=80=99 functions as well.
> =E2=80=8B=E2=80=8B
>

=E2=80=8BYes.

> =E2=80=8B=E2=80=8B
> =E2=80=8B=E2=80=8B
>
> =E2=80=8B=E2=80=8B
> > ! If POSITION is outside the frame where the event was initiated, retur=
n
> =E2=80=8B=E2=80=8B
> > ! that frame instead.  POSITION should be a list of the form returned b=
y
> =E2=80=8B=E2=80=8B
>
> =E2=80=8B=E2=80=8B
> I suppose this is not sufficient: We get a frame also when the mouse is
> =E2=80=8B=E2=80=8B
> on its tool or menu bar, some of ist borders ...
>

=E2=80=8Bposn-area reports whether the event was in the text area or not.=
=E2=80=8B

=E2=80=8B=E2=80=8B
>
> =E2=80=8B=E2=80=8B
> But note that I've never been able to understand the purpose of these
> =E2=80=8B=E2=80=8B
> =E2=80=98posn-*=E2=80=99 functions and they usually confuse the hell out =
of me.  IMHO it
> =E2=80=8B=E2=80=8B
> would make much more sense to declare them obsolete and concentrate on
> =E2=80=8B=E2=80=8B
> describing event structures better.


=E2=80=8BIt does seem like some additional work is needed to simplify event
handling and handle a multi-frame world better.

Bob

=E2=80=8B=E2=80=8B
=E2=80=8B=E2=80=8B

--001a1137b054c22e48055a56cc46
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_default" style=3D"font-family:monospac=
e,monospace"><span style=3D"font-family:arial,sans-serif">On Fri, Sep 29, 2=
017 at 4:34 AM, martin rudalics </span><span dir=3D"ltr" style=3D"font-fami=
ly:arial,sans-serif">&lt;<a href=3D"mailto:rudalics@HIDDEN" target=3D"_blan=
k">rudalics@HIDDEN</a>&gt;</span><span style=3D"font-family:arial,sans-seri=
f"> wrote:</span><br></div><div class=3D"gmail_extra"><div class=3D"gmail_q=
uote"><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-l=
eft:1px #ccc solid;padding-left:1ex">&gt; ! `posn-window&#39;: The window o=
r frame of the event end.<br>
<br>
If we start talking about &quot;event ends&quot; here we should export that=
<br>
<div class=3D"gmail_default" style=3D"font-family:monospace,monospace;displ=
ay:inline">=E2=80=8B=E2=80=8B</div>concept to the remaining =E2=80=98posn-*=
=E2=80=99 functions as well.<div class=3D"gmail_default" style=3D"font-fami=
ly:monospace,monospace;display:inline">=E2=80=8B=E2=80=8B</div></blockquote=
><div><br></div><div class=3D"gmail_default" style=3D"font-family:monospace=
,monospace">=E2=80=8BYes.</div><blockquote class=3D"gmail_quote" style=3D"m=
argin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class=3D=
"gmail_default" style=3D"font-family:monospace,monospace;display:inline">=
=E2=80=8B=E2=80=8B</div><div class=3D"gmail_default" style=3D"font-family:m=
onospace,monospace;display:inline">=E2=80=8B=E2=80=8B</div><br>
<div class=3D"gmail_default" style=3D"font-family:monospace,monospace;displ=
ay:inline">=E2=80=8B=E2=80=8B</div>&gt; ! If POSITION is outside the frame =
where the event was initiated, return<br>
<div class=3D"gmail_default" style=3D"font-family:monospace,monospace;displ=
ay:inline">=E2=80=8B=E2=80=8B</div>&gt; ! that frame instead.=C2=A0 POSITIO=
N should be a list of the form returned by<br>
<div class=3D"gmail_default" style=3D"font-family:monospace,monospace;displ=
ay:inline">=E2=80=8B=E2=80=8B</div><br>
<div class=3D"gmail_default" style=3D"font-family:monospace,monospace;displ=
ay:inline">=E2=80=8B=E2=80=8B</div>I suppose this is not sufficient: We get=
 a frame also when the mouse is<br>
<div class=3D"gmail_default" style=3D"font-family:monospace,monospace;displ=
ay:inline">=E2=80=8B=E2=80=8B</div>on its tool or menu bar, some of ist bor=
ders ...<br></blockquote><div><br></div><div class=3D"gmail_default" style=
=3D"font-family:monospace,monospace">=E2=80=8Bposn-area reports whether the=
 event was in the text area or not.=E2=80=8B</div><div class=3D"gmail_defau=
lt" style=3D"font-family:monospace,monospace"><br></div><blockquote class=
=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padd=
ing-left:1ex">
<div class=3D"gmail_default" style=3D"font-family:monospace,monospace;displ=
ay:inline">=E2=80=8B=E2=80=8B</div><br>
<div class=3D"gmail_default" style=3D"font-family:monospace,monospace;displ=
ay:inline">=E2=80=8B=E2=80=8B</div>But note that I&#39;ve never been able t=
o understand the purpose of these<br>
<div class=3D"gmail_default" style=3D"font-family:monospace,monospace;displ=
ay:inline">=E2=80=8B=E2=80=8B</div>=E2=80=98posn-*=E2=80=99 functions and t=
hey usually confuse the hell out of me.=C2=A0 IMHO it<br>
<div class=3D"gmail_default" style=3D"font-family:monospace,monospace;displ=
ay:inline">=E2=80=8B=E2=80=8B</div>would make much more sense to declare th=
em obsolete and concentrate on<br>
<div class=3D"gmail_default" style=3D"font-family:monospace,monospace;displ=
ay:inline">=E2=80=8B=E2=80=8B</div>describing event structures better.</blo=
ckquote><div><font color=3D"#ffffff" style=3D"background-color:rgb(255,255,=
255)"><br></font></div><div class=3D"gmail_default" style=3D"font-family:mo=
nospace,monospace"><font color=3D"#000000" style=3D"background-color:rgb(25=
5,255,255)">=E2=80=8B<font style=3D"">It does seem like some additional wor=
k is needed to simplify event handling and handle a multi-frame world bette=
r.</font></font></div><div class=3D"gmail_default" style=3D"font-family:mon=
ospace,monospace"><font style=3D"background-color:rgb(255,255,255)" color=
=3D"#000000"><br></font></div><div class=3D"gmail_default" style=3D"font-fa=
mily:monospace,monospace"><font style=3D"background-color:rgb(255,255,255)"=
 color=3D"#000000">Bob</font></div><div class=3D"gmail_default" style=3D"fo=
nt-family:monospace,monospace"><font color=3D"#888888"><br></font></div></d=
iv><div class=3D"gmail_default" style=3D"font-family:monospace,monospace">=
=E2=80=8B=E2=80=8B</div><div class=3D"gmail_default" style=3D"font-family:m=
onospace,monospace">=E2=80=8B=E2=80=8B</div><br></div></div>

--001a1137b054c22e48055a56cc46--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#28621; Package emacs. Full text available.

Message received at 28621 <at> debbugs.gnu.org:


Received: (at 28621) by debbugs.gnu.org; 29 Sep 2017 08:34:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Sep 29 04:34:54 2017
Received: from localhost ([127.0.0.1]:37545 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1dxql4-0006wq-Ka
	for submit <at> debbugs.gnu.org; Fri, 29 Sep 2017 04:34:54 -0400
Received: from mout.gmx.net ([212.227.17.21]:60793)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1dxql3-0006we-3u
 for 28621 <at> debbugs.gnu.org; Fri, 29 Sep 2017 04:34:53 -0400
Received: from [192.168.1.100] ([46.125.249.81]) by mail.gmx.com (mrgmx103
 [212.227.17.168]) with ESMTPSA (Nemesis) id 0Mbx62-1defTc3eJa-00JIBz; Fri, 29
 Sep 2017 10:34:47 +0200
Message-ID: <59CE05A4.80701@HIDDEN>
Date: Fri, 29 Sep 2017 10:34:44 +0200
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: rswgnu@HIDDEN, 28621 <at> debbugs.gnu.org
Subject: Re: bug#28621: Proposed patch for doc of posn-window and code of
 posn-set-point to handle frame arguments
References: <CA+OMD9ieLvVUCu6ubaHohNso+s9TGK+oJcnRVkdyZ4+2JtM41g@HIDDEN>
In-Reply-To: <CA+OMD9ieLvVUCu6ubaHohNso+s9TGK+oJcnRVkdyZ4+2JtM41g@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: quoted-printable
X-Provags-ID: V03:K0:itvtbKcLdlAa7rcVcBEL9T3rwfNdakz5EqQOZRJtaKmhQX42Czw
 yMjVwbZdJcuajv3P4lAT+BwqsAqCgyjYSiVnvQiC9nwbTMA/hysDU5RRZI7G35DVaa6GdlR
 gfdqrUv+xSjKcp44IMO2U79SyxFVfy1mCTG8j8xwBdQ8C4iCYAKRY+El1O6RjNzVZzrQC0F
 gCpI7n8wmmNQH9KPfns0w==
X-UI-Out-Filterresults: notjunk:1;V01:K0:MJ/FvE6Obuk=:CdZ77szicQg12Op2W4JEHz
 PrXp/XwNF2ez2XKs2a5pVbQ2MKSsKJQbGPe7qgVyEcMg/13Y+qDMczpVuZVBQCdqqlt+2EWU3
 YtzKxbzcNOaw7++ylTlhonpDwngkgrTV346mV6N0P4ClB/lg7v2B+ZMzndrAB1ks/irgtW2Y9
 OnfQ/ZY38ogaaxfJB3e2rgJa7gihPOGENd3KPcmep51G6DGodtu6Cxt+KVdF0s/EYdj7Bmr3Z
 2VwvwbdkSakpvNWUhlnwU22lEzAPyMR9iNMz5uyQqskErdXveJ9E6MAa6iPaCyknhP05Az7R/
 8iebmU5UwS0l+gRR0nhZTMPwo5pqautCJ7TBJXtXeiVZTZZxw9OL4plyCtObecclE2tpqUGP0
 HMMOhXV4/IBMgi6U3n9r51NNFTOpsXr8uJIkHXPB3XQQty1Dz8M5Jk2074kkvLRGtY5bppkCK
 DnGp7Zrv3wo0+v7Mbegany27wgJ5LTKXvAasc4h/jthKIlW+pbqVU2d10QxnUHcN8UKOsuDGv
 3EnJ7N2oNl+QLJk54pLSKwUdtlZtRUfsK17XwyF7b1eHppSQw1O+xVDZBXZE5r5/nnqsofhrv
 PQKuZ1jO8jVKwlhOBNOVr+h3iXKHPLvV4TLuRPeTiDH+RgyxZVa6IyTmZUpagF6YqbwQZTBzg
 8pbbEA5oJ5Oq3Pi5jOVww40hIcDdJhDn5dSG5pvatNQG4V923wy8hkyBJIOR+Oi9IhnlqttqC
 EmUWFh3Oz1iOU/SOXeQyoma7sBVjgXKBGkqJNvWHfhV/YY4v3xxFMF4ZAkWrBTcJtnX5odHUv
 krfEyWdr5qS0XYYje/zstLFbA4yTSCXIcLFrI9x0Sqs9gPQ9ZWm1BaZ/Gbq3MFYi5/t8eA9
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 28621
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

 > ! `posn-window': The window or frame of the event end.

If we start talking about "event ends" here we should export that
concept to the remaining =E2=80=98posn-*=E2=80=99 functions as well.

 > ! If POSITION is outside the frame where the event was initiated, retu=
rn
 > ! that frame instead.  POSITION should be a list of the form returned =
by

I suppose this is not sufficient: We get a frame also when the mouse is
on its tool or menu bar, some of ist borders ...

But note that I've never been able to understand the purpose of these
=E2=80=98posn-*=E2=80=99 functions and they usually confuse the hell out =
of me.  IMHO it
would make much more sense to declare them obsolete and concentrate on
describing event structures better.

martin





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#28621; Package emacs. Full text available.

Message received at 28621 <at> debbugs.gnu.org:


Received: (at 28621) by debbugs.gnu.org; 27 Sep 2017 21:34:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 27 17:34:31 2017
Received: from localhost ([127.0.0.1]:35520 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1dxJyR-0004ym-IA
	for submit <at> debbugs.gnu.org; Wed, 27 Sep 2017 17:34:31 -0400
Received: from mail-pf0-f177.google.com ([209.85.192.177]:52297)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <jwiegley@HIDDEN>) id 1dxJyQ-0004yZ-0Z
 for 28621 <at> debbugs.gnu.org; Wed, 27 Sep 2017 17:34:30 -0400
Received: by mail-pf0-f177.google.com with SMTP id p87so7890858pfj.9
 for <28621 <at> debbugs.gnu.org>; Wed, 27 Sep 2017 14:34:29 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:subject:in-reply-to:date:message-id:references
 :user-agent:mime-version;
 bh=gafS/YRzqR9agQgY5e6nlTKFLUkQLARPN1zk4XOFTBA=;
 b=OV6MIWSSgzr61lAvXbfOEl1lG58jCQKRHb+tJAKv0Rsf8eGZSRsKzcNxVhoHUXOTA/
 uEa0DgPVsnvCeIM1sLFbzPaBwYVek9B1AzDPqrF5mtbIMye7TS2vHIvJqK6mf2yNsqVz
 MymNf9jj8NmNOvv94c5HegJFrcPQprQhyEqN2rlWTjtSHNWvmtCUGk2LHVLk9YhKdetX
 jVPWfPt7BwjYfWgAJwpqHfLn3TL1s7DZ28kwq+2xaS2lFay+/Te7rKYlYKHaen1WBfM/
 brVHH/LwpsTaMUBROvQukZkkgTF/ZFI8dbEYEknSW4Er1c7+PCz3EPIoCaGX3ibpeL86
 u2SA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:in-reply-to:date:message-id
 :references:user-agent:mime-version;
 bh=gafS/YRzqR9agQgY5e6nlTKFLUkQLARPN1zk4XOFTBA=;
 b=VDvI9RZ+3fqrpzk/DHSaXpfRrdqOcFaBDwOITMgYveY9nyyBXIDZHHJ2SsP2D8hM0a
 fjNgAxG3pW1Oa67GkYZ8WqI5UisZBwnCETXcG3kuMmG2SU3QAowfrnxO7kNfm0Rt3t+x
 qaibBJ+5cX9sXvYB5vHz32wNluOgKBtl2ahL71Ai4o7fM5GG2lnJtCr2UYyK+BvXE7lW
 4FWDHBREL0DAzNadstC6mejveguihG02CQJzQWEYYdcA/tAjCi2yXXsFH4Pwjtmnb2aR
 abZ2ODe3PFtiZB62Ix7j8zjzecM7ZUsJpUGetN0yk+7xKRCOBofB/ZWs0QJU0Fm9vdS4
 azSg==
X-Gm-Message-State: AHPjjUjWyowYlrv48fmvm/6GeH30jdxzkruDCL3kl9HwdS7ZWz3tZo60
 Sj9B11E+c8XD1RrHJdCAdCI+yD8/
X-Google-Smtp-Source: AOwi7QB1C0m1pVtJ3Z5xwDxyFyjglaWmi5v7GoFenGpWbtjLF+7L5upKR6bd4LGefERlr1TPCcvyfg==
X-Received: by 10.159.216.143 with SMTP id s15mr2260263plp.201.1506548063871; 
 Wed, 27 Sep 2017 14:34:23 -0700 (PDT)
Received: from Vulcan.local (76-234-69-149.lightspeed.frokca.sbcglobal.net.
 [76.234.69.149])
 by smtp.gmail.com with ESMTPSA id r22sm21675880pfe.78.2017.09.27.14.34.22
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Wed, 27 Sep 2017 14:34:23 -0700 (PDT)
From: John Wiegley <jwiegley@HIDDEN>
X-Google-Original-From: "John Wiegley" <johnw@HIDDEN>
Received: by Vulcan.local (Postfix, from userid 501)
 id 5C6E393807CA; Wed, 27 Sep 2017 14:34:22 -0700 (PDT)
To: Robert Weiner <rsw@HIDDEN>
Subject: Re: bug#28621: Proposed patch for doc of posn-window and code of
 posn-set-point to handle frame arguments
In-Reply-To: <CA+OMD9ieLvVUCu6ubaHohNso+s9TGK+oJcnRVkdyZ4+2JtM41g@HIDDEN>
 (Robert Weiner's message of "Wed, 27 Sep 2017 12:01:50 -0400")
Date: Wed, 27 Sep 2017 14:34:21 -0700
Message-ID: <m24lrnx1uq.fsf@HIDDEN>
References: <CA+OMD9ieLvVUCu6ubaHohNso+s9TGK+oJcnRVkdyZ4+2JtM41g@HIDDEN>
User-Agent: Gnus/5.130016 (Ma Gnus v0.16) Emacs/26.0 (darwin)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.8 (--)
X-Debbugs-Envelope-To: 28621
Cc: Eli Zaretskii <eliz@HIDDEN>, rswgnu@HIDDEN, 28621 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.8 (--)

>>>>> "RW" == Robert Weiner <rsw@HIDDEN> writes:

RW> The doc for posn-window is incomplete. posn-set-point does not handle drag
RW> events whose end point argument is a frame, rather than a window. This
RW> patch fixes both of these. Read the code of posn-set-point to ensure the
RW> logic is right in terms of using frame-selected-window.

I'm happy to see this applied, just want confirmation from someone who
understands this code better that this is the correct clarification...

-- 
John Wiegley                  GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com                          60E1 46C4 BD1A 7AC1 4BA2




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#28621; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 27 Sep 2017 16:02:44 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 27 12:02:44 2017
Received: from localhost ([127.0.0.1]:35182 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1dxEnL-0001g0-P1
	for submit <at> debbugs.gnu.org; Wed, 27 Sep 2017 12:02:44 -0400
Received: from eggs.gnu.org ([208.118.235.92]:54131)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rsw@HIDDEN>) id 1dxEnJ-0001fm-QH
 for submit <at> debbugs.gnu.org; Wed, 27 Sep 2017 12:02:42 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <rsw@HIDDEN>) id 1dxEnA-0007C9-BX
 for submit <at> debbugs.gnu.org; Wed, 27 Sep 2017 12:02:36 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: *
X-Spam-Status: No, score=1.3 required=5.0 tests=BAYES_50,HTML_MESSAGE,
 RCVD_IN_SORBS_SPAM,RP_MATCHES_RCVD autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:48941)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <rsw@HIDDEN>) id 1dxEnA-0007C3-8R
 for submit <at> debbugs.gnu.org; Wed, 27 Sep 2017 12:02:32 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:45031)
 by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <rsw@HIDDEN>)
 id 1dxEn3-00079l-QW
 for bug-gnu-emacs@HIDDEN; Wed, 27 Sep 2017 12:02:31 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <rsw@HIDDEN>) id 1dxEn0-00078B-NC
 for bug-gnu-emacs@HIDDEN; Wed, 27 Sep 2017 12:02:25 -0400
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:55084)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <rsw@HIDDEN>)
 id 1dxEn0-000781-Jh
 for bug-gnu-emacs@HIDDEN; Wed, 27 Sep 2017 12:02:22 -0400
Received: from mail-qk0-f179.google.com ([209.85.220.179]:46951)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128)
 (Exim 4.82) (envelope-from <rsw@HIDDEN>) id 1dxEn0-0004Yq-Ao
 for bug-gnu-emacs@HIDDEN; Wed, 27 Sep 2017 12:02:22 -0400
Received: by mail-qk0-f179.google.com with SMTP id z143so13776517qkb.3
 for <bug-gnu-emacs@HIDDEN>; Wed, 27 Sep 2017 09:02:22 -0700 (PDT)
X-Gm-Message-State: AHPjjUhB3+u3W2uVff/qbvzG25FmcOVzmn7WqmDLyBEqEh5amH/0/Khz
 STLmRAd3ziA3pd3/pbtO1q1itL7mmswJlrzmvRE=
X-Google-Smtp-Source: AOwi7QAixGq/A8k7IHOXTlYB+WHGO2Pjjv5gci0jNBUFfKDPhY0SoVJFD0EvKGtDWyDMn4mN7NKdHPp9UPopjKfe8SQ=
X-Received: by 10.55.161.85 with SMTP id k82mr2935947qke.156.1506528141329;
 Wed, 27 Sep 2017 09:02:21 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.200.28.3 with HTTP; Wed, 27 Sep 2017 09:01:50 -0700 (PDT)
From: Robert Weiner <rsw@HIDDEN>
Date: Wed, 27 Sep 2017 12:01:50 -0400
X-Gmail-Original-Message-ID: <CA+OMD9ieLvVUCu6ubaHohNso+s9TGK+oJcnRVkdyZ4+2JtM41g@HIDDEN>
Message-ID: <CA+OMD9ieLvVUCu6ubaHohNso+s9TGK+oJcnRVkdyZ4+2JtM41g@HIDDEN>
Subject: Proposed patch for doc of posn-window and code of posn-set-point to
 handle frame arguments
To: bug-gnu-emacs@HIDDEN
Content-Type: multipart/alternative; boundary="94eb2c0600bcb54b2f055a2dead6"
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -2.0 (--)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: rswgnu@HIDDEN
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.5 (----)

--94eb2c0600bcb54b2f055a2dead6
Content-Type: text/plain; charset="UTF-8"

The doc for posn-window is incomplete.  posn-set-point does not handle drag
events whose end point argument is a frame, rather than a window.
This patch fixes both of these.  Read the code of posn-set-point to ensure
the logic is right in terms of using frame-selected-window.

This diff is against subr.el in Emacs 25.3 but I see none of this has yet
changed in Emacs 26 either, so it is still applicable.

*** subr.el.gz 2017-09-27 11:50:06.000000000 -0400
--- subr-new.el.gz 2017-09-27 11:50:06.000000000 -0400
***************
*** 1090,1096 ****
  The following accessor functions are used to access the elements
  of the position:

! `posn-window': The window the event is in.
  `posn-area': A symbol identifying the area the event occurred in,
  or nil if the event occurred in the text area.
  `posn-point': The buffer position of the event.
--- 1090,1096 ----
  The following accessor functions are used to access the elements
  of the position:

! `posn-window': The window or frame of the event end.
  `posn-area': A symbol identifying the area the event occurred in,
  or nil if the event occurred in the text area.
  `posn-point': The buffer position of the event.
***************
*** 1141,1148 ****

  (defsubst posn-window (position)
    "Return the window in POSITION.
! POSITION should be a list of the form returned by the `event-start'
! and `event-end' functions."
    (nth 0 position))

  (defsubst posn-area (position)
--- 1141,1149 ----

  (defsubst posn-window (position)
    "Return the window in POSITION.
! If POSITION is outside the frame where the event was initiated, return
! that frame instead.  POSITION should be a list of the form returned by
! the `event-start' and `event-end' functions."
    (nth 0 position))

  (defsubst posn-area (position)
***************
*** 1169,1177 ****
  (defun posn-set-point (position)
    "Move point to POSITION.
  Select the corresponding window as well."
!   (if (not (windowp (posn-window position)))
!       (error "Position not in text area of window"))
!   (select-window (posn-window position))
    (if (numberp (posn-point position))
        (goto-char (posn-point position))))

--- 1170,1182 ----
  (defun posn-set-point (position)
    "Move point to POSITION.
  Select the corresponding window as well."
!   (if (framep (posn-window position))
!       (progn (if (not (windowp (frame-selected-window (posn-window
position))))
! (error "Position not in text area of window"))
!      (select-window (frame-selected-window (posn-window position))))
!     (if (not (windowp (posn-window position)))
! (error "Position not in text area of window"))
!     (select-window (posn-window position)))
    (if (numberp (posn-point position))
        (goto-char (posn-point position))))

--94eb2c0600bcb54b2f055a2dead6
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_default"><div class=3D"gmail_default">=
<font face=3D"monospace, monospace">The doc for posn-window is incomplete.=
=C2=A0 posn-set-point does not handle drag events whose end point argument =
is a frame, rather than a window.</font></div><div class=3D"gmail_default">=
<font face=3D"monospace, monospace">This patch fixes both of these.=C2=A0 R=
ead the code of posn-set-point to ensure the logic is right in terms of usi=
ng frame-selected-window.</font></div><div class=3D"gmail_default"><font fa=
ce=3D"monospace, monospace"><br></font></div><div class=3D"gmail_default"><=
font face=3D"monospace, monospace">This diff is against subr.el in Emacs 25=
.3=C2=A0</font><span style=3D"font-family:monospace,monospace">but I see no=
ne of this has yet changed in Emacs 26 either, so it is still applicable.</=
span></div><div class=3D"gmail_default"><font face=3D"monospace, monospace"=
><br></font></div><div class=3D"gmail_default"><font face=3D"monospace, mon=
ospace">*** subr.el.gz<span style=3D"white-space:pre">	</span>2017-09-27 11=
:50:06.000000000 -0400</font></div><div class=3D"gmail_default"><font face=
=3D"monospace, monospace">--- subr-new.el.gz<span style=3D"white-space:pre"=
>	</span>2017-09-27 11:50:06.000000000 -0400</font></div><div class=3D"gmai=
l_default"><font face=3D"monospace, monospace">***************</font></div>=
<div class=3D"gmail_default"><font face=3D"monospace, monospace">*** 1090,1=
096 ****</font></div><div class=3D"gmail_default"><font face=3D"monospace, =
monospace">=C2=A0 The following accessor functions are used to access the e=
lements</font></div><div class=3D"gmail_default"><font face=3D"monospace, m=
onospace">=C2=A0 of the position:</font></div><div class=3D"gmail_default">=
<font face=3D"monospace, monospace">=C2=A0=C2=A0</font></div><div class=3D"=
gmail_default"><font face=3D"monospace, monospace">! `posn-window&#39;: The=
 window the event is in.</font></div><div class=3D"gmail_default"><font fac=
e=3D"monospace, monospace">=C2=A0 `posn-area&#39;: A symbol identifying the=
 area the event occurred in,</font></div><div class=3D"gmail_default"><font=
 face=3D"monospace, monospace">=C2=A0 or nil if the event occurred in the t=
ext area.</font></div><div class=3D"gmail_default"><font face=3D"monospace,=
 monospace">=C2=A0 `posn-point&#39;: The buffer position of the event.</fon=
t></div><div class=3D"gmail_default"><font face=3D"monospace, monospace">--=
- 1090,1096 ----</font></div><div class=3D"gmail_default"><font face=3D"mon=
ospace, monospace">=C2=A0 The following accessor functions are used to acce=
ss the elements</font></div><div class=3D"gmail_default"><font face=3D"mono=
space, monospace">=C2=A0 of the position:</font></div><div class=3D"gmail_d=
efault"><font face=3D"monospace, monospace">=C2=A0=C2=A0</font></div><div c=
lass=3D"gmail_default"><font face=3D"monospace, monospace">! `posn-window&#=
39;: The window or frame of the event end.</font></div><div class=3D"gmail_=
default"><font face=3D"monospace, monospace">=C2=A0 `posn-area&#39;: A symb=
ol identifying the area the event occurred in,</font></div><div class=3D"gm=
ail_default"><font face=3D"monospace, monospace">=C2=A0 or nil if the event=
 occurred in the text area.</font></div><div class=3D"gmail_default"><font =
face=3D"monospace, monospace">=C2=A0 `posn-point&#39;: The buffer position =
of the event.</font></div><div class=3D"gmail_default"><font face=3D"monosp=
ace, monospace">***************</font></div><div class=3D"gmail_default"><f=
ont face=3D"monospace, monospace">*** 1141,1148 ****</font></div><div class=
=3D"gmail_default"><font face=3D"monospace, monospace">=C2=A0=C2=A0</font><=
/div><div class=3D"gmail_default"><font face=3D"monospace, monospace">=C2=
=A0 (defsubst posn-window (position)</font></div><div class=3D"gmail_defaul=
t"><font face=3D"monospace, monospace">=C2=A0 =C2=A0 &quot;Return the windo=
w in POSITION.</font></div><div class=3D"gmail_default"><font face=3D"monos=
pace, monospace">! POSITION should be a list of the form returned by the `e=
vent-start&#39;</font></div><div class=3D"gmail_default"><font face=3D"mono=
space, monospace">! and `event-end&#39; functions.&quot;</font></div><div c=
lass=3D"gmail_default"><font face=3D"monospace, monospace">=C2=A0 =C2=A0 (n=
th 0 position))</font></div><div class=3D"gmail_default"><font face=3D"mono=
space, monospace">=C2=A0=C2=A0</font></div><div class=3D"gmail_default"><fo=
nt face=3D"monospace, monospace">=C2=A0 (defsubst posn-area (position)</fon=
t></div><div class=3D"gmail_default"><font face=3D"monospace, monospace">--=
- 1141,1149 ----</font></div><div class=3D"gmail_default"><font face=3D"mon=
ospace, monospace">=C2=A0=C2=A0</font></div><div class=3D"gmail_default"><f=
ont face=3D"monospace, monospace">=C2=A0 (defsubst posn-window (position)</=
font></div><div class=3D"gmail_default"><font face=3D"monospace, monospace"=
>=C2=A0 =C2=A0 &quot;Return the window in POSITION.</font></div><div class=
=3D"gmail_default"><font face=3D"monospace, monospace">! If POSITION is out=
side the frame where the event was initiated, return</font></div><div class=
=3D"gmail_default"><font face=3D"monospace, monospace">! that frame instead=
.=C2=A0 POSITION should be a list of the form returned by</font></div><div =
class=3D"gmail_default"><font face=3D"monospace, monospace">! the `event-st=
art&#39; and `event-end&#39; functions.&quot;</font></div><div class=3D"gma=
il_default"><font face=3D"monospace, monospace">=C2=A0 =C2=A0 (nth 0 positi=
on))</font></div><div class=3D"gmail_default"><font face=3D"monospace, mono=
space">=C2=A0=C2=A0</font></div><div class=3D"gmail_default"><font face=3D"=
monospace, monospace">=C2=A0 (defsubst posn-area (position)</font></div><di=
v class=3D"gmail_default"><font face=3D"monospace, monospace">*************=
**</font></div><div class=3D"gmail_default"><font face=3D"monospace, monosp=
ace">*** 1169,1177 ****</font></div><div class=3D"gmail_default"><font face=
=3D"monospace, monospace">=C2=A0 (defun posn-set-point (position)</font></d=
iv><div class=3D"gmail_default"><font face=3D"monospace, monospace">=C2=A0 =
=C2=A0 &quot;Move point to POSITION.</font></div><div class=3D"gmail_defaul=
t"><font face=3D"monospace, monospace">=C2=A0 Select the corresponding wind=
ow as well.&quot;</font></div><div class=3D"gmail_default"><font face=3D"mo=
nospace, monospace">!=C2=A0 =C2=A0(if (not (windowp (posn-window position))=
)</font></div><div class=3D"gmail_default"><font face=3D"monospace, monospa=
ce">!=C2=A0 =C2=A0 =C2=A0 =C2=A0(error &quot;Position not in text area of w=
indow&quot;))</font></div><div class=3D"gmail_default"><font face=3D"monosp=
ace, monospace">!=C2=A0 =C2=A0(select-window (posn-window position))</font>=
</div><div class=3D"gmail_default"><font face=3D"monospace, monospace">=C2=
=A0 =C2=A0 (if (numberp (posn-point position))</font></div><div class=3D"gm=
ail_default"><font face=3D"monospace, monospace">=C2=A0 =C2=A0 =C2=A0 =C2=
=A0 (goto-char (posn-point position))))</font></div><div class=3D"gmail_def=
ault"><font face=3D"monospace, monospace">=C2=A0=C2=A0</font></div><div cla=
ss=3D"gmail_default"><font face=3D"monospace, monospace">--- 1170,1182 ----=
</font></div><div class=3D"gmail_default"><font face=3D"monospace, monospac=
e">=C2=A0 (defun posn-set-point (position)</font></div><div class=3D"gmail_=
default"><font face=3D"monospace, monospace">=C2=A0 =C2=A0 &quot;Move point=
 to POSITION.</font></div><div class=3D"gmail_default"><font face=3D"monosp=
ace, monospace">=C2=A0 Select the corresponding window as well.&quot;</font=
></div><div class=3D"gmail_default"><font face=3D"monospace, monospace">!=
=C2=A0 =C2=A0(if (framep (posn-window position))</font></div><div class=3D"=
gmail_default"><font face=3D"monospace, monospace">!=C2=A0 =C2=A0 =C2=A0 =
=C2=A0(progn (if (not (windowp (frame-selected-window (posn-window position=
))))</font></div><div class=3D"gmail_default"><font face=3D"monospace, mono=
space">! <span style=3D"white-space:pre">		</span> (error &quot;Position no=
t in text area of window&quot;))</font></div><div class=3D"gmail_default"><=
font face=3D"monospace, monospace">! <span style=3D"white-space:pre">	</spa=
n>=C2=A0 =C2=A0 =C2=A0(select-window (frame-selected-window (posn-window po=
sition))))</font></div><div class=3D"gmail_default"><font face=3D"monospace=
, monospace">!=C2=A0 =C2=A0 =C2=A0(if (not (windowp (posn-window position))=
)</font></div><div class=3D"gmail_default"><font face=3D"monospace, monospa=
ce">! <span style=3D"white-space:pre">	</span>(error &quot;Position not in =
text area of window&quot;))</font></div><div class=3D"gmail_default"><font =
face=3D"monospace, monospace">!=C2=A0 =C2=A0 =C2=A0(select-window (posn-win=
dow position)))</font></div><div class=3D"gmail_default"><font face=3D"mono=
space, monospace">=C2=A0 =C2=A0 (if (numberp (posn-point position))</font><=
/div><div class=3D"gmail_default"><font face=3D"monospace, monospace">=C2=
=A0 =C2=A0 =C2=A0 =C2=A0 (goto-char (posn-point position))))</font></div><d=
iv class=3D"gmail_default"><font face=3D"monospace, monospace">=C2=A0=C2=A0=
</font></div><div style=3D"font-family:monospace,monospace"><br></div></div=
></div>

--94eb2c0600bcb54b2f055a2dead6--




Acknowledgement sent to rswgnu@HIDDEN:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#28621; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 29 Sep 2017 17:00:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.