From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: browse-url-interactive-arg calls `mouse-set-point' too eagerly Date: Sat, 20 Nov 2021 09:31:12 +0200 Message-ID: <83lf1jtha7.fsf@gnu.org> References: <87r1bbqqzm.fsf.ref@yahoo.com> <87r1bbqqzm.fsf@yahoo.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4582"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Po Lu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Nov 20 08:32:27 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1moKrK-0000xx-Os for ged-emacs-devel@m.gmane-mx.org; Sat, 20 Nov 2021 08:32:26 +0100 Original-Received: from localhost ([::1]:34188 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1moKrJ-0006TN-KK for ged-emacs-devel@m.gmane-mx.org; Sat, 20 Nov 2021 02:32:25 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:42102) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1moKq8-0005ky-C6 for emacs-devel@gnu.org; Sat, 20 Nov 2021 02:31:12 -0500 Original-Received: from [2001:470:142:3::e] (port=58882 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1moKq7-0002RI-K0; Sat, 20 Nov 2021 02:31:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=/MmjjUVy6TDoedG7FCSPM+Oo8T4H+jhEe7OZy1BSvw4=; b=idRKJkYH0rGy MLx/VlhGDYzuOx3ON0GMlxUySNmKnsf+lEbdKYITQJauEppK++8KbpFb9VIyHtoo38o211d1jrBLv dPq7FbLUEooq7VjjEQTYooFfRpx/7gsdfuHwARDYxRXX9IgexYKP/UVHai440vtTNv9DbbvOctxjl IXrnzI1mUPbt5hl7MBzeZotRP9AE686+9QAIWODp1C7W0YrD+laSQhycK3encbRPh35c7SCKfQdks 7MHvLxkXh8zZ90vrmBaL+ieLPoxF5DXFOCFLcedeGUJlXxEvg7u33YmYGgfNcYGWrEotq0IpHtvAD HoRxO35c3pg8Wmwxi2J4EA==; Original-Received: from [87.69.77.57] (port=3273 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1moKq7-0006pv-92; Sat, 20 Nov 2021 02:31:11 -0500 In-Reply-To: <87r1bbqqzm.fsf@yahoo.com> (message from Po Lu on Sat, 20 Nov 2021 14:29:49 +0800) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:279787 Archived-At: > From: Po Lu > Date: Sat, 20 Nov 2021 14:29:49 +0800 > > The doc string of browse-url-interactive-arg says: > > If invoked with a mouse button, it moves point to the position clicked > before acting. > > But the code treats any event that is a list as a mouse event, which > fails horribly with menu bar events. > > So why not replace the faulty code with something like: > > (let ((event (elt (this-command-keys) 0))) > (when (mouse-event-p event) > (mouse-set-point event))) > > WDYT? SGTM, thanks. Please do this on the emacs-28 branch, as I believe the same problem exists there.