GNU bug report logs - #53249
Context menu in other window

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; Reported by: Juri Linkov <juri@HIDDEN>; dated Fri, 14 Jan 2022 08:54:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

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


Received: (at 53249) by debbugs.gnu.org; 14 Jan 2022 09:00:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jan 14 04:00:37 2022
Received: from localhost ([127.0.0.1]:35556 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1n8IRo-0004af-OO
	for submit <at> debbugs.gnu.org; Fri, 14 Jan 2022 04:00:37 -0500
Received: from quimby.gnus.org ([95.216.78.240]:35236)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1n8IRn-0004T8-1S
 for 53249 <at> debbugs.gnu.org; Fri, 14 Jan 2022 04:00:35 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=1O5s5EikM5tLT36PtbOF2JDWk5e3nEnkVJ32ttEYvSw=; b=TIW2chdA9IGTX49SsJkU95i4Nw
 IrRmmjNgrwyPk7GNnGyHj+mUfZ0DZu1ursb97uXpZElY3EP1SvBC15VRxUA8JfdMayl/Zmi1IGdmK
 96Vixg0nZ2xsvbvSUaZFUImfCCdP0lQRL7N/GJQiP56NZAJgVEA/e00VEHv+CifPzy/c=;
Received: from [84.212.220.105] (helo=xo)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1n8IRe-0001uv-LL; Fri, 14 Jan 2022 10:00:29 +0100
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#53249: Context menu in other window
References: <86fspqn1i5.fsf@HIDDEN>
Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj
 SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAFVBMVEUZGRojIyV/f39i
 YmOhoaDc29n///+lfWGoAAAAAWJLR0QGYWa4fQAAAAd0SU1FB+YBDgg1H/BckkcAAAFpSURBVDjL
 xZJtcoQgDIaTcgGyegGr/b8Ke4Cu4QSF+1+lCeCuqP1dZmCGPOTrJQBEVrYuC9siPTCfoFaE/1qo
 +ekKoIBPe0EI0PD30Wo1Evr4vAAAXUh8PwJlj5TifErh7JJSOiZB9D8fQey8lvtWXXcLsxjdxJxN
 L6XpEafVmsB8zI4cCTonoE1ioec585rkrQCGAQiJT2VRWp253wIPrd24FMVBWp+rcBvxKc0kx9Pu
 AZKbRA6WvZYWNg83fYkeQYEtLyvwrEC1mukP4HKoF+g5ZHtk14bquTjE59iGMhWIIq2HWb0WLCD3
 IRO+9TdSr8WKRxsKHBUHEbepCuiWa2Iey/WtVSdGL1sbxD2wuc2S2zagm7hUazXFe7qp8/IZfEdo
 ytVHC2/t7ZNr9iD/imcgkVJN3YQC+dY41LlpgAgs44lVkR0wkwxItTQgP5apsCegS6b3EtDideCQ
 DiAruR7Lzb0IYMrgF7e4T4Xs5IhwAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIyLTAxLTE0VDA4OjUz
 OjMwKzAwOjAw6FVrIQAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMi0wMS0xNFQwODo1MzozMCswMDow
 MJkI050AAAAASUVORK5CYII=
X-Now-Playing: Noveller's _Arrow_: "Canyons"
Date: Fri, 14 Jan 2022 10:00:26 +0100
In-Reply-To: <86fspqn1i5.fsf@HIDDEN> (Juri Linkov's message of "Fri, 
 14 Jan 2022 10:42:43 +0200")
Message-ID: <87h7a6pu8l.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview: Juri Linkov <juri@HIDDEN> writes: > So the safest thing
 to do here is to select the window where > the context menu is invoked: Makes
 sense to me. 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 53249
Cc: 53249 <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: -3.3 (---)

Juri Linkov <juri@HIDDEN> writes:

> So the safest thing to do here is to select the window where
> the context menu is invoked:

Makes sense to me.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




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

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


Received: (at submit) by debbugs.gnu.org; 14 Jan 2022 08:53:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jan 14 03:53:26 2022
Received: from localhost ([127.0.0.1]:35536 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1n8IKs-0003mw-3r
	for submit <at> debbugs.gnu.org; Fri, 14 Jan 2022 03:53:26 -0500
Received: from lists.gnu.org ([209.51.188.17]:58320)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1n8IKo-0003mk-JZ
 for submit <at> debbugs.gnu.org; Fri, 14 Jan 2022 03:53:24 -0500
Received: from eggs.gnu.org ([209.51.188.92]:42936)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <juri@HIDDEN>) id 1n8IKo-00081Y-Av
 for bug-gnu-emacs@HIDDEN; Fri, 14 Jan 2022 03:53:22 -0500
Received: from relay4-d.mail.gandi.net ([217.70.183.196]:44593)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <juri@HIDDEN>) id 1n8IKm-0008R8-0j
 for bug-gnu-emacs@HIDDEN; Fri, 14 Jan 2022 03:53:22 -0500
Received: (Authenticated sender: juri@HIDDEN)
 by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 55B57E0006
 for <bug-gnu-emacs@HIDDEN>; Fri, 14 Jan 2022 08:53:15 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: Context menu in other window
Organization: LINKOV.NET
Date: Fri, 14 Jan 2022 10:42:43 +0200
Message-ID: <86fspqn1i5.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
Received-SPF: pass client-ip=217.70.183.196; envelope-from=juri@HIDDEN;
 helo=relay4-d.mail.gandi.net
X-Spam_score_int: -25
X-Spam_score: -2.6
X-Spam_bar: --
X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7,
 RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.6 (-)
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>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.6 (--)

When clicking the right mouse button in another window,
some context-menu functions break the window configuration.
For example, when two windows show different parts of the same buffer,
this code in `prog-context-menu':

  (let ((identifier (save-excursion
                      (mouse-set-point click)
                      (xref-backend-identifier-at-point
                       (xref-find-backend)))))

moves window point of another window to the same position of the
selected window.

So the safest thing to do here is to select the window where
the context menu is invoked:

diff --git a/lisp/mouse.el b/lisp/mouse.el
index 0d8d7d6175..45b7d51da7 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -320,6 +320,8 @@ context-menu-map
          (fun (mouse-posn-property (event-start click)
                                    'context-menu-function)))
 
+    (select-window (posn-window (event-start click)))
+
     (if (functionp fun)
         (setq menu (funcall fun menu click))
       (run-hook-wrapped 'context-menu-functions
-- 




Acknowledgement sent to Juri Linkov <juri@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#53249; 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, 14 Jan 2022 09:15:01 UTC

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