From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: New Context Menu and mouse-1 Date: Mon, 30 Aug 2021 08:54:30 -0400 Message-ID: References: <20210818120834.i3orh535tb2enpos.ref@Ergus> <20210818120834.i3orh535tb2enpos@Ergus> <87tujb77vq.fsf_-_@mail.linkov.net> <83y28nqsuv.fsf@gnu.org> <87bl5ig6qk.fsf@mail.linkov.net> <87h7f88aa7.fsf@mail.linkov.net> <87y28j1lja.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34963"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Eli Zaretskii , emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Aug 30 14:55:44 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 1mKgpD-0008me-5i for ged-emacs-devel@m.gmane-mx.org; Mon, 30 Aug 2021 14:55:43 +0200 Original-Received: from localhost ([::1]:54624 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mKgpB-0006po-Nw for ged-emacs-devel@m.gmane-mx.org; Mon, 30 Aug 2021 08:55:41 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57424) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mKgo9-000622-OO for emacs-devel@gnu.org; Mon, 30 Aug 2021 08:54:37 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:63532) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mKgo6-0000ee-MY; Mon, 30 Aug 2021 08:54:36 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 395EC440909; Mon, 30 Aug 2021 08:54:32 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 084E144076C; Mon, 30 Aug 2021 08:54:31 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1630328071; bh=61FUu+vW7yMw2X3IEotUa9YvhCnL9/TpFFLiPDH7aFQ=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=lb5XR2R7P1CQGjo8wrmQWvGGuYBDKSXGR1ymyFlaBJlseWCGA5ljUvWOVlL9V+FJi 7NCq1XhYU7IfVOcAiMK0+h5S6YbC+YGLV8yiXNoiUF3YtP9RW2c3McZ/rAiQ9rjsvr 84CeTEpV2/+hrW1WigGueCl548Q9Z3C0KB8levD8B6tZOG54SqCcgFQOXqd4JLcSy7 2JUdn2mzKaCmtoJD3EpT87jco3F5c9a51NdIf8mpwr2WdG+EYDk+W35ArX1IrdFDq6 K8ykzoaXe8EqlmaPks1plfhwv3XyAP4lYElM9ivPdy4vT/cVXTCCPQc8trsqPpTfqX RVgSQbpr1r+QA== Original-Received: from alfajor (unknown [104.247.244.135]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id CC27512027C; Mon, 30 Aug 2021 08:54:30 -0400 (EDT) In-Reply-To: <87y28j1lja.fsf@mail.linkov.net> (Juri Linkov's message of "Mon, 30 Aug 2021 10:22:01 +0300") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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:273486 Archived-At: Juri Linkov [2021-08-30 10:22:01] wrote: >>> BTW, maybe another way to look at the problem is to say that >>> invoking the context-menu should not exit the transient map (but this >>> may come with its own set of problems, of course). >> >> + (when (memq (car-safe last-input-event) '(mouse-1 drag-mouse-1)) >> + (deactivate-mark) >> + (pop-mark)))))) > > Or rather > > + (unless (and context-menu-mode > + (eq (car-safe (aref (this-command-keys-vector) 0)) > + 'down-mouse-3)) > + (deactivate-mark) > + (pop-mark)))))) This looks "honest and safe". If you can add a comment explaining why we have this ad-hoc hack there, then I think it's quite acceptable (given that we're unable to figure out what is The Right Way). Stefan