From unknown Wed Jun 18 23:09:33 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#50067 <50067@debbugs.gnu.org> To: bug#50067 <50067@debbugs.gnu.org> Subject: Status: Context menus Reply-To: bug#50067 <50067@debbugs.gnu.org> Date: Thu, 19 Jun 2025 06:09:33 +0000 retitle 50067 Context menus reassign 50067 emacs submitter 50067 Juri Linkov severity 50067 normal tag 50067 fixed thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 15 04:51:11 2021 Received: (at submit) by debbugs.gnu.org; 15 Aug 2021 08:51:11 +0000 Received: from localhost ([127.0.0.1]:45741 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mFBrH-0005SO-IK for submit@debbugs.gnu.org; Sun, 15 Aug 2021 04:51:11 -0400 Received: from lists.gnu.org ([209.51.188.17]:48268) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mFBrC-0005Rw-GS for submit@debbugs.gnu.org; Sun, 15 Aug 2021 04:51:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53238) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mFBrC-0008SB-71 for bug-gnu-emacs@gnu.org; Sun, 15 Aug 2021 04:51:02 -0400 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:53707) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mFBr9-0004XZ-SJ for bug-gnu-emacs@gnu.org; Sun, 15 Aug 2021 04:51:02 -0400 Received: (Authenticated sender: juri@linkov.net) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 0EC546000A for ; Sun, 15 Aug 2021 08:50:56 +0000 (UTC) From: Juri Linkov To: bug-gnu-emacs@gnu.org Subject: Context menus Organization: LINKOV.NET Date: Sun, 15 Aug 2021 11:48:55 +0300 Message-ID: <87pmufb3u0.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=217.70.183.195; envelope-from=juri@linkov.net; helo=relay3-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@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.6 (--) The branch 'feature/context-menu' is ready for merging to master. It was created after the discussion in https://lists.gnu.org/archive/html/emacs-devel/2021-07/msg00300.html as a proof-of-concept. And after testing with different modes, it proved to be flexible enough to support various needs. After merging it could be improved further with more development in master. The branch contains a NEWS entry and changes in the documentation. From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 15 07:56:25 2021 Received: (at 50067) by debbugs.gnu.org; 15 Aug 2021 11:56:25 +0000 Received: from localhost ([127.0.0.1]:45927 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mFEkW-0008Ti-Fh for submit@debbugs.gnu.org; Sun, 15 Aug 2021 07:56:24 -0400 Received: from quimby.gnus.org ([95.216.78.240]:58036) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mFEkQ-0008TM-4e for 50067@debbugs.gnu.org; Sun, 15 Aug 2021 07:56:18 -0400 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=U8hRI/6idegOzNlE9zzikT6PllUvTJBax/ksutgRmj4=; b=hj9j2dlwVqrJEPwefucX86U90L JAe8pogu0MvOcxedr4TUSnEky8mxqcVe0jO1RNdxCrYW/YuMTLwnfCaNc7a29rQq8bLDIwMuF1RMi rPQ1LCVLXMdYDgDfw9cKtIiLT2f/HaDF/MbkCiZdSk+POwMBZxcSfJw9Y427RJXWF9Pc=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mFEkF-0008HY-B9; Sun, 15 Aug 2021 13:56:07 +0200 From: Lars Ingebrigtsen To: Juri Linkov Subject: Re: bug#50067: Context menus References: <87pmufb3u0.fsf@mail.linkov.net> Date: Sun, 15 Aug 2021 13:56:01 +0200 In-Reply-To: <87pmufb3u0.fsf@mail.linkov.net> (Juri Linkov's message of "Sun, 15 Aug 2021 11:48:55 +0300") Message-ID: <87tujqoram.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.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 writes: > The branch 'feature/context-menu' is ready for merging to master. > > It was created after the discussion in > https://lists.gnu.org/archive/html/emacs-devel/2021-07/msg00300.html > as a proof-of-co [...] 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: 50067 Cc: 50067@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Juri Linkov writes: > The branch 'feature/context-menu' is ready for merging to master. > > It was created after the discussion in > https://lists.gnu.org/archive/html/emacs-devel/2021-07/msg00300.html > as a proof-of-concept. > > And after testing with different modes, it proved to be flexible enough > to support various needs. > > After merging it could be improved further with more development in master. I haven't tested the branch, but reading the diff, it looks like an excellent feature to me. Looking at the implementation of the stuff in various modes, I'm wondering whether the interface should perhaps be tweaked a bit: +(defun eww-context-menu (menu) [...] + (when (or (mouse-posn-property (event-start last-input-event) 'shr-url) + (mouse-posn-property (event-start last-input-event) 'image-url)) + (define-key menu [shr-mouse-browse-url-new-window] Perhaps the signature of the context menu functions should be: +(defun eww-context-menu (menu event) ? I'm also wondering whether we should add a `context-menu' text property. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 15 12:21:17 2021 Received: (at 50067) by debbugs.gnu.org; 15 Aug 2021 16:21:17 +0000 Received: from localhost ([127.0.0.1]:47619 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mFIsv-0003gM-Gm for submit@debbugs.gnu.org; Sun, 15 Aug 2021 12:21:17 -0400 Received: from relay11.mail.gandi.net ([217.70.178.231]:45693) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mFIss-0003g4-Dx for 50067@debbugs.gnu.org; Sun, 15 Aug 2021 12:21:16 -0400 Received: (Authenticated sender: juri@linkov.net) by relay11.mail.gandi.net (Postfix) with ESMTPSA id 2A494100004; Sun, 15 Aug 2021 16:21:06 +0000 (UTC) From: Juri Linkov To: Lars Ingebrigtsen Subject: Re: bug#50067: Context menus Organization: LINKOV.NET References: <87pmufb3u0.fsf@mail.linkov.net> <87tujqoram.fsf@gnus.org> Date: Sun, 15 Aug 2021 19:12:57 +0300 In-Reply-To: <87tujqoram.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sun, 15 Aug 2021 13:56:01 +0200") Message-ID: <871r6u66zm.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 50067 Cc: 50067@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > I haven't tested the branch, but reading the diff, it looks like an > excellent feature to me. Looking at the implementation of the stuff in > various modes, I'm wondering whether the interface should perhaps be > tweaked a bit: > > +(defun eww-context-menu (menu) > [...] > + (when (or (mouse-posn-property (event-start last-input-event) 'shr-url) > + (mouse-posn-property (event-start last-input-event) 'image-url)) > + (define-key menu [shr-mouse-browse-url-new-window] > > Perhaps the signature of the context menu functions should be: > > +(defun eww-context-menu (menu event) > > ? To get an event would be nice, but I see no way to do this. The top function 'context-menu-map' is called by: `(menu-item ,(purecopy "Context Menu") ignore :filter (lambda (_) (context-menu-map)))) that has no access to the event - an unused argument of lambda above is just the binding that is 'ignore' in this case. > I'm also wondering whether we should add a `context-menu' text property. As soon as such a need arises, a text property could be added as well. But it seems currently much cleaner is to use a single context-menu function for every mode. From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 16 07:32:13 2021 Received: (at 50067) by debbugs.gnu.org; 16 Aug 2021 11:32:13 +0000 Received: from localhost ([127.0.0.1]:48645 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mFaqj-0001Nn-2g for submit@debbugs.gnu.org; Mon, 16 Aug 2021 07:32:13 -0400 Received: from quimby.gnus.org ([95.216.78.240]:42204) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mFaqg-0001HZ-AX for 50067@debbugs.gnu.org; Mon, 16 Aug 2021 07:32:12 -0400 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=3rs8lyn6YNG66WMF9rg5d5Huq+D89TVnGBlFeLz1yac=; b=O3UizJW9c919qNeXT0AUZ0KWHy gdshduh6tjoi8wWrMsCMvq5CRFyRZdFpMAqj9WRjTrXTc/2VXiF1Id6lLZiYz158JVXOfF89PyU8J 3U5CqV7vYEE/ZOYQfvaMX+HTUpDZUQFgIEDuF8Uqt21hKJtC2Ee3vGL0OAYCPPA1PN5I=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mFaqV-0004DI-5U; Mon, 16 Aug 2021 13:32:03 +0200 From: Lars Ingebrigtsen To: Juri Linkov Subject: Re: bug#50067: Context menus References: <87pmufb3u0.fsf@mail.linkov.net> <87tujqoram.fsf@gnus.org> <871r6u66zm.fsf@mail.linkov.net> Date: Mon, 16 Aug 2021 13:31:58 +0200 In-Reply-To: <871r6u66zm.fsf@mail.linkov.net> (Juri Linkov's message of "Sun, 15 Aug 2021 19:12:57 +0300") Message-ID: <87o89xfwwh.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.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 writes: >> +(defun eww-context-menu (menu) >> [...] >> + (when (or (mouse-posn-property (event-start last-input-event) 'shr-url) >> + (mouse-posn-property (event-start last-input-event) 'image-url)) >> + (def [...] 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: 50067 Cc: 50067@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Juri Linkov writes: >> +(defun eww-context-menu (menu) >> [...] >> + (when (or (mouse-posn-property (event-start last-input-event) 'shr-url) >> + (mouse-posn-property (event-start last-input-event) 'image-url)) >> + (define-key menu [shr-mouse-browse-url-new-window] [...] > To get an event would be nice, but I see no way to do this. > The top function 'context-menu-map' is called by: > > `(menu-item ,(purecopy "Context Menu") ignore > :filter (lambda (_) (context-menu-map)))) > > that has no access to the event - an unused argument of lambda above > is just the binding that is 'ignore' in this case. Could just use `last-input-event', I guess? But that doesn't really give us anything better than what we have, so there's probably no point. >> I'm also wondering whether we should add a `context-menu' text property. > > As soon as such a need arises, a text property could be added as well. > But it seems currently much cleaner is to use a single context-menu > function for every mode. Right. I was thinking that it's pretty likely that all button-like things are going to grow a context menu, but we can add `context-menu' later if that turns out to be the case. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 17 04:13:20 2021 Received: (at 50067) by debbugs.gnu.org; 17 Aug 2021 08:13:20 +0000 Received: from localhost ([127.0.0.1]:51616 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mFuDn-00071R-U6 for submit@debbugs.gnu.org; Tue, 17 Aug 2021 04:13:20 -0400 Received: from relay8-d.mail.gandi.net ([217.70.183.201]:32771) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mFuDm-000718-15; Tue, 17 Aug 2021 04:13:18 -0400 Received: (Authenticated sender: juri@linkov.net) by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id 5D1191BF205; Tue, 17 Aug 2021 08:13:09 +0000 (UTC) From: Juri Linkov To: Lars Ingebrigtsen Subject: Re: bug#50067: Context menus Organization: LINKOV.NET References: <87pmufb3u0.fsf@mail.linkov.net> <87tujqoram.fsf@gnus.org> <871r6u66zm.fsf@mail.linkov.net> <87o89xfwwh.fsf@gnus.org> Date: Tue, 17 Aug 2021 11:12:41 +0300 In-Reply-To: <87o89xfwwh.fsf@gnus.org> (Lars Ingebrigtsen's message of "Mon, 16 Aug 2021 13:31:58 +0200") Message-ID: <87wnokcww6.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 50067 Cc: 50067@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) tags 50067 fixed close 50067 28.0.50 quit >>> I'm also wondering whether we should add a `context-menu' text property. >> >> As soon as such a need arises, a text property could be added as well. >> But it seems currently much cleaner is to use a single context-menu >> function for every mode. > > Right. I was thinking that it's pretty likely that all button-like > things are going to grow a context menu, but we can add `context-menu' > later if that turns out to be the case. It would be easier to make more experiments with code in master, so now merged the branch to master. From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 18 00:38:17 2021 Received: (at 50067) by debbugs.gnu.org; 18 Aug 2021 04:38:17 +0000 Received: from localhost ([127.0.0.1]:54532 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGDLE-0007EA-Rm for submit@debbugs.gnu.org; Wed, 18 Aug 2021 00:38:16 -0400 Received: from mail-pj1-f47.google.com ([209.85.216.47]:40878) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGDLD-0007Dv-BZ for 50067@debbugs.gnu.org; Wed, 18 Aug 2021 00:38:15 -0400 Received: by mail-pj1-f47.google.com with SMTP id n13-20020a17090a4e0d00b0017946980d8dso8050423pjh.5 for <50067@debbugs.gnu.org>; Tue, 17 Aug 2021 21:38:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=d/tPCq+zhxfexJSZeY+bcD6ooo/yLSWRifzzRl5+t2E=; b=eiJrNAPNvn4ZfHPyRYYWDUgz/TtbsVIm5uQZpXOg8yDX3QTinTzbPMaJ3AMY6rkdwY U4D4liQ+VQ8gOMqiIPqBrjdgN2m99dqczbiHetRhAO3Y8oVQBxDCmC6/aL6/X1aWYrcw 6PrTZPLS3jOn7nP5+sbpF+kIdqj/RGvfCu7ysruqWD3IuQ4ZBhdABKni90u6D96c7AZw lj10bGMExeq6Lqpi4D/cLcWwh1yGIbSQJgVMzdE9op1HTu70FxKPwitspMMyE6bqePIy MSMTowCPSBKEpXXjsXfAg6RHT91vdmX2sJ9pvCufesehoWjqqI74QNONpT/fl3nDGu9e LThA== 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:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=d/tPCq+zhxfexJSZeY+bcD6ooo/yLSWRifzzRl5+t2E=; b=DaRVcCdmqhbYhwIDsSFO8VWMigu48ARzaxZu+iyO1hudtCF3ykWx0Co1YjZKL4khFl s9BW32QHaNQSYUGNUXoUi1vTathOJNzIrEyJpZ2iy+smJ3HwUhn/LCR0l0ksA06mbS5s F5AzEkjO7xtSbqwBCtkhuy50xvxla5Cb6z8Z+8aCGDFJ0yKWAIhTQEeyTwPdOvWExKF5 CvSVrDFpUX0cWb72QEhO+TzGYVt6hp5To9MnHbjOUYqdaufvfxC48Y8qq9u5GMW6XA6J FFbjTm2ytDbi798vumKIcoD9oJnyD7EZ9Gp3Y4MJ7ev9VhRHGzfPTfJJp+Qrf7GHzhUu fFNA== X-Gm-Message-State: AOAM531h1rOa0peOHtzdhVYkEMOG7xcL9qSyTPiMAEXpAWObr/HXbH11 sCuRI8dn8vXG5j+5b01Fqfk= X-Google-Smtp-Source: ABdhPJzAZyvvLNLAzfamNsLmEN7mNzk/fcwNX6TfBT5vltF4SAJpVV+LZEg7bn1su47tS2/4D/Ho8g== X-Received: by 2002:a17:90b:4905:: with SMTP id kr5mr7089825pjb.112.1629261489544; Tue, 17 Aug 2021 21:38:09 -0700 (PDT) Received: from DreamMini2019.local (vesta.misasa.okayama-u.ac.jp. [150.46.48.154]) by smtp.gmail.com with ESMTPSA id y62sm4177329pfy.183.2021.08.17.21.38.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Aug 2021 21:38:08 -0700 (PDT) From: Tak Kunihiro X-Google-Original-From: Tak Kunihiro To: Juri Linkov Subject: Re: bug#50067: Context menus References: <87pmufb3u0.fsf@mail.linkov.net> <87tujqoram.fsf@gnus.org> <871r6u66zm.fsf@mail.linkov.net> <87o89xfwwh.fsf@gnus.org> <87wnokcww6.fsf@mail.linkov.net> Date: Wed, 18 Aug 2021 13:38:04 +0900 In-Reply-To: <87wnokcww6.fsf@mail.linkov.net> (Juri Linkov's message of "Tue, 17 Aug 2021 11:12:41 +0300") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (darwin) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 50067 Cc: Lars Ingebrigtsen , 50067@debbugs.gnu.org, tkk@misasa.okayama-u.ac.jp X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > It would be easier to make more experiments with code in master, > so now merged the branch to master. I see the context menu after M-x context-menu-mode. Thank you for working on this. I will see how it works and try to give feedback soon. From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 18 04:10:05 2021 Received: (at 50067) by debbugs.gnu.org; 18 Aug 2021 08:10:05 +0000 Received: from localhost ([127.0.0.1]:54778 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGGeD-0004Ri-EG for submit@debbugs.gnu.org; Wed, 18 Aug 2021 04:10:05 -0400 Received: from relay10.mail.gandi.net ([217.70.178.230]:58677) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGGeA-0004Qo-It for 50067@debbugs.gnu.org; Wed, 18 Aug 2021 04:10:03 -0400 Received: (Authenticated sender: juri@linkov.net) by relay10.mail.gandi.net (Postfix) with ESMTPSA id CAF41240007; Wed, 18 Aug 2021 08:09:52 +0000 (UTC) From: Juri Linkov To: Tak Kunihiro Subject: Re: bug#50067: Context menus Organization: LINKOV.NET References: <87pmufb3u0.fsf@mail.linkov.net> <87tujqoram.fsf@gnus.org> <871r6u66zm.fsf@mail.linkov.net> <87o89xfwwh.fsf@gnus.org> <87wnokcww6.fsf@mail.linkov.net> Date: Wed, 18 Aug 2021 10:47:34 +0300 In-Reply-To: (Tak Kunihiro's message of "Wed, 18 Aug 2021 13:38:04 +0900") Message-ID: <87bl5vtbuh.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 50067 Cc: Lars Ingebrigtsen , 50067@debbugs.gnu.org, tkk@misasa.okayama-u.ac.jp X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> It would be easier to make more experiments with code in master, >> so now merged the branch to master. > > I see the context menu after M-x context-menu-mode. Thank you for > working on this. Thank you for the great idea of using a list of functions. > I will see how it works and try to give feedback soon. Waiting for your feedback. From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 18 12:45:11 2021 Received: (at 50067) by debbugs.gnu.org; 18 Aug 2021 16:45:11 +0000 Received: from localhost ([127.0.0.1]:57444 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGOgh-00028Y-31 for submit@debbugs.gnu.org; Wed, 18 Aug 2021 12:45:11 -0400 Received: from relay2-d.mail.gandi.net ([217.70.183.194]:44383) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGOgb-00027E-Aq for 50067@debbugs.gnu.org; Wed, 18 Aug 2021 12:45:06 -0400 Received: (Authenticated sender: juri@linkov.net) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id B346040009; Wed, 18 Aug 2021 16:44:54 +0000 (UTC) From: Juri Linkov To: Mattias =?iso-8859-1?Q?Engdeg=E5rd?= Subject: Re: bug#50067: Context menus Organization: LINKOV.NET References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@acm.org> Date: Wed, 18 Aug 2021 19:42:12 +0300 In-Reply-To: <74BC00E9-2509-47DA-9428-1523FF7F3B33@acm.org> ("Mattias =?iso-8859-1?Q?Engdeg=E5rd=22's?= message of "Wed, 18 Aug 2021 12:52:08 +0200") Message-ID: <87v942pvcj.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 50067 Cc: tkk@misasa.okayama-u.ac.jp, Tak Kunihiro , 50067@debbugs.gnu.org, Lars Ingebrigtsen , Alan Third X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > 1. Mac users expect C-mouse-1 to be equivalent to mouse-3 because Macs > traditionally only have one mouse button; this is especially true of laptop > users (probably the majority today). Simply speaking, control-mouse-1 is > expected to invoke the context menu; this is the platform convention and we > should try to find a way to make it so. > > We could add a mac-only setting that remaps control-mouse-1 to mouse-3 > (preserving all other modifiers like shift, alt and super). (I don't think > there already is such a translation but could be mistaken). I'm attaching > a tentative patch as a proof of concept. > > It is also possible to just do it in Lisp, but then we'd probably need > to do it specially for the context menu. (I tried using event > translation but that didn't work right.) The raison d'être for the special mode context-menu-mode is to rebind the default keys optionally. So it would make sense to bind context-menu-entry conditionally: 1. to [C-mouse-1] on macOS depending on ‘(featurep 'ns)’; 2. to [down-mouse-3] everywhere else. in the function body of context-menu-mode. > Currently, C-mouse-1 pops up the buffer menu but it's unclear if > that's used by a sizeable part of the population, and in any case Macs > have a Buffer menu easily accessible in the menu bar. Additionally, a Buffer menu is accessible from the context menu when context-menu-functions is customized to contain ‘context-menu-global’. > 2. The context menu contains the disabled entry "Context Menu" as some kind > of title – that is very alien on macOS where context menus never have > titles. I believe the same is true at least on Windows, and frankly, there > should be no need to explicitly tell the user that what he or she is > looking at is a context menu. I suggest we just drop the title on > all platforms. > > Replacing (purecopy "Context Menu") by "" in `context-menu-entry` makes it > go away, but then we get the new title "Select" from heavens knows where > (menu.c, from the look of it). Apparently the Emacs menu system just wants > a title; we should find a way to disable it in popup menus. After trying to remove it altogether, there is no title at all, but maybe it's platform-dependent (I tested on GTK): diff --git a/lisp/mouse.el b/lisp/mouse.el index 9b7d4c240f..5193994231 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -304,7 +304,7 @@ context-menu-filter-function (defun context-menu-map () "Return composite menu map." - (let ((menu (make-sparse-keymap "Context Menu"))) + (let ((menu (make-sparse-keymap))) (run-hook-wrapped 'context-menu-functions (lambda (fun) (setq menu (funcall fun menu)) > 3. Not Mac-specific (really about xref): in some modes, Find Definition > applies to point instead of where the click occurred. Apparently the xref > backend ignores the symbol discovered by xref-find-definition-at-mouse > because that tokenisation isn't appropriate for the language and it does > a more thorough job that is based on point instead. What we really should > do is to set point temporarily for the whole duration of the > xref-find-definitions call. Could you please provide a test case? Because I've thoroughly tested “Find Definition” to apply where the click occurred, and it works as expected. From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 18 13:47:00 2021 Received: (at 50067) by debbugs.gnu.org; 18 Aug 2021 17:47:00 +0000 Received: from localhost ([127.0.0.1]:57527 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGPeW-0003lH-J7 for submit@debbugs.gnu.org; Wed, 18 Aug 2021 13:47:00 -0400 Received: from mail1459c50.megamailservers.eu ([91.136.14.59]:40856 helo=mail267c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGPeS-0003kz-GO for 50067@debbugs.gnu.org; Wed, 18 Aug 2021 13:46:58 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1629308809; bh=OKfdWL5Bak6QYLWYs42tBorpbj6n2NcUL3tlJBZiDG8=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=okuTuG8QrVJWdWl2rBEBAPcqlAg6jW2x3/5mZFEQhwXBQoIL0r/SUzyB3p51VyrrF 4h91xhpXXy4x1spHCaf3kwJHkpWzvaZe4JhtsD3Zr4/vSDR1E2SsDdIBaPfA6rOhmV 4NVS4VofgnbNehqY3PDJ561H9UPH5VFgdWQsjnXw= Feedback-ID: mattiase@acm.or Received: from [192.168.0.4] (c188-150-171-71.bredband.tele2.se [188.150.171.71]) (authenticated bits=0) by mail267c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 17IHkj64022241; Wed, 18 Aug 2021 17:46:47 +0000 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.21\)) Subject: Re: bug#50067: Context menus From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: <87v942pvcj.fsf@mail.linkov.net> Date: Wed, 18 Aug 2021 19:46:45 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@acm.org> <87v942pvcj.fsf@mail.linkov.net> To: Juri Linkov X-Mailer: Apple Mail (2.3445.104.21) X-CTCH-RefID: str=0001.0A742F25.611D4789.0024, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=S9SnP7kP c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=IkcTkHD0fZMA:10 a=M51BFTxLslgA:10 a=ucMQw-l_AAAA:8 a=L4BmyjnkBGAdIlXQYDgA:9 a=QEXdDO2ut3YA:10 a=xkTruGkd22MpkFU079mG:22 X-Origin-Country: SE X-Spam-Score: 1.4 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.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 the administrator of that system for details. Content preview: 18 aug. 2021 kl. 18.42 skrev Juri Linkov : > The raison d'être for the special mode context-menu-mode is to > rebind the default keys optionally. So it would make sense to bind > context-menu-entry conditionally: > > 1. to [C-mouse-1] on macO [...] Content analysis details: (1.4 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.4 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-Debbugs-Envelope-To: 50067 Cc: tkk@misasa.okayama-u.ac.jp, Tak Kunihiro , 50067@debbugs.gnu.org, Lars Ingebrigtsen , Alan Third X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) 18 aug. 2021 kl. 18.42 skrev Juri Linkov : > The raison d'=C3=AAtre for the special mode context-menu-mode is to > rebind the default keys optionally. So it would make sense to bind > context-menu-entry conditionally: >=20 > 1. to [C-mouse-1] on macOS depending on =E2=80=98(featurep 'ns)=E2=80=99= ; > 2. to [down-mouse-3] everywhere else. >=20 > in the function body of context-menu-mode. We'd like both bindings to work on macOS (the user could have a mouse = with a right button) but that should be doable. > After trying to remove it altogether, there is no title at all, > but maybe it's platform-dependent (I tested on GTK): After your suggested change I still get the "Select" title; needs to be = investigated further. > Could you please provide a test case? Because I've thoroughly tested > =E2=80=9CFind Definition=E2=80=9D to apply where the click occurred, = and it works as expected. Yes it works for elisp, because its xref backend is simplistic enough to = just accept the symbol given as argument. An example of a package where = it doesn't work is merlin which is rather more sophisticated and wants = to find the exact context so that it can find the right definition, so = it ignores the argument. It would be useful to do this for elisp as well, so that it would work = for local variables etc. From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 18 13:47:11 2021 Received: (at 50067) by debbugs.gnu.org; 18 Aug 2021 17:47:11 +0000 Received: from localhost ([127.0.0.1]:57531 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGPec-0003m0-SX for submit@debbugs.gnu.org; Wed, 18 Aug 2021 13:47:10 -0400 Received: from eggs.gnu.org ([209.51.188.92]:49406) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGPeb-0003lI-Q7 for 50067@debbugs.gnu.org; Wed, 18 Aug 2021 13:47:06 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:59244) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mGPeQ-0001us-VZ; Wed, 18 Aug 2021 13:46:54 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1638 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 1mGPeQ-0008Er-IE; Wed, 18 Aug 2021 13:46:54 -0400 Date: Wed, 18 Aug 2021 20:46:53 +0300 Message-Id: <83zgte3asy.fsf@gnu.org> From: Eli Zaretskii To: Juri Linkov In-Reply-To: <87v942pvcj.fsf@mail.linkov.net> (message from Juri Linkov on Wed, 18 Aug 2021 19:42:12 +0300) Subject: Re: bug#50067: Context menus References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@acm.org> <87v942pvcj.fsf@mail.linkov.net> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 50067 Cc: alan@idiocy.org, mattiase@acm.org, homeros.misasa@gmail.com, tkk@misasa.okayama-u.ac.jp, larsi@gnus.org, 50067@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Juri Linkov > Date: Wed, 18 Aug 2021 19:42:12 +0300 > Cc: 50067@debbugs.gnu.org, Tak Kunihiro , > tkk@misasa.okayama-u.ac.jp, Lars Ingebrigtsen , > Alan Third > > > 2. The context menu contains the disabled entry "Context Menu" as some kind > > of title – that is very alien on macOS where context menus never have > > titles. I believe the same is true at least on Windows, and frankly, there > > should be no need to explicitly tell the user that what he or she is > > looking at is a context menu. I suggest we just drop the title on > > all platforms. > > > > Replacing (purecopy "Context Menu") by "" in `context-menu-entry` makes it > > go away, but then we get the new title "Select" from heavens knows where > > (menu.c, from the look of it). Apparently the Emacs menu system just wants > > a title; we should find a way to disable it in popup menus. > > After trying to remove it altogether, there is no title at all, > but maybe it's platform-dependent (I tested on GTK): > > diff --git a/lisp/mouse.el b/lisp/mouse.el > index 9b7d4c240f..5193994231 100644 > --- a/lisp/mouse.el > +++ b/lisp/mouse.el > @@ -304,7 +304,7 @@ context-menu-filter-function > (defun context-menu-map () > "Return composite menu map." > - (let ((menu (make-sparse-keymap "Context Menu"))) > + (let ((menu (make-sparse-keymap))) > (run-hook-wrapped 'context-menu-functions > (lambda (fun) > (setq menu (funcall fun menu)) I see you already pushed this, but it's a bad idea: it makes ugly context menus on TTYs (and AFAIU also on non-toolkit X builds): these _require_ the menu name because they display a caption which looks bad with an empty name. I don't really understand the original complaint: we have similar captions on the menu shown by C-mouse-3 in the default configuration: do macOS users want those to be removed as well? If not, what is the difference? From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 18 13:53:36 2021 Received: (at 50067) by debbugs.gnu.org; 18 Aug 2021 17:53:36 +0000 Received: from localhost ([127.0.0.1]:57547 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGPkq-0003vf-0X for submit@debbugs.gnu.org; Wed, 18 Aug 2021 13:53:36 -0400 Received: from eggs.gnu.org ([209.51.188.92]:52130) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGPkk-0003vI-AK for 50067@debbugs.gnu.org; Wed, 18 Aug 2021 13:53:30 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:59534) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mGPkb-0006kC-RS; Wed, 18 Aug 2021 13:53:17 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2026 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 1mGPkb-0000P6-Eg; Wed, 18 Aug 2021 13:53:17 -0400 Date: Wed, 18 Aug 2021 20:53:12 +0300 Message-Id: <83wnoi3aif.fsf@gnu.org> From: Eli Zaretskii To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= In-Reply-To: (message from Mattias =?utf-8?Q?Engdeg=C3=A5rd?= on Wed, 18 Aug 2021 19:46:45 +0200) Subject: Re: bug#50067: Context menus References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@acm.org> <87v942pvcj.fsf@mail.linkov.net> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 50067 Cc: alan@idiocy.org, juri@linkov.net, homeros.misasa@gmail.com, tkk@misasa.okayama-u.ac.jp, larsi@gnus.org, 50067@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Mattias Engdegård > Date: Wed, 18 Aug 2021 19:46:45 +0200 > Cc: 50067@debbugs.gnu.org, Tak Kunihiro , > tkk@misasa.okayama-u.ac.jp, Lars Ingebrigtsen , > Alan Third > > > After trying to remove it altogether, there is no title at all, > > but maybe it's platform-dependent (I tested on GTK): > > After your suggested change I still get the "Select" title; needs to be investigated further. That "Select" is probably macOS specific, I don't see it here. From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 18 14:01:51 2021 Received: (at 50067) by debbugs.gnu.org; 18 Aug 2021 18:01:51 +0000 Received: from localhost ([127.0.0.1]:57552 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGPss-0004A1-Ve for submit@debbugs.gnu.org; Wed, 18 Aug 2021 14:01:51 -0400 Received: from mail33c50.megamailservers.eu ([91.136.10.43]:49322) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGPsq-00049b-0T for 50067@debbugs.gnu.org; Wed, 18 Aug 2021 14:01:49 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1629309705; bh=KAjVAzrNBY+cIA0gk7/AMg/4e5OYhLyNbBUJRF5I07c=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=Ja0/ZkjkLcpn2zxf5vSunD834JcprV7a172bs4uBRa8+PGoAxJq0briYvs7yMzzId zgpYIm6tmJkfp3IPeH2GsIJWdSv4RAGaM2m758wsnKC5IRYA6Ku7Hfdi/HGJ2FRUFw pIqJiTak1cSogLfSLQzjFoHUClM/ecyGFUd8VABQ= Feedback-ID: mattiase@acm.or Received: from [192.168.0.4] (c188-150-171-71.bredband.tele2.se [188.150.171.71]) (authenticated bits=0) by mail33c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 17II1fgj004399; Wed, 18 Aug 2021 18:01:42 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.21\)) Subject: Re: bug#50067: Context menus From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: <83zgte3asy.fsf@gnu.org> Date: Wed, 18 Aug 2021 20:01:17 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <87E21203-7AF2-4FD6-80C2-4561CD0AA088@acm.org> References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@acm.org> <87v942pvcj.fsf@mail.linkov.net> <83zgte3asy.fsf@gnu.org> To: Eli Zaretskii X-Mailer: Apple Mail (2.3445.104.21) X-CTCH-RefID: str=0001.0A742F2A.611D4B09.0060, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=Rbbu9Glv c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=mDV3o1hIAAAA:8 a=ZHnRtNvBZrRZ8u_30o4A:9 a=CjuIK1q_8ugA:10 a=_FVE-zBwftR9WsbkzFJk:22 X-Origin-Country: SE X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 50067 Cc: alan@idiocy.org, Juri Linkov , homeros.misasa@gmail.com, tkk@misasa.okayama-u.ac.jp, larsi@gnus.org, 50067@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) 18 aug. 2021 kl. 19.46 skrev Eli Zaretskii : > I don't really understand the original complaint: we have similar > captions on the menu shown by C-mouse-3 in the default configuration: > do macOS users want those to be removed as well? We definitely do but few people use that (rather useless) menu so its = appearance doesn't matter much. If the goal here is to make a genuinely useful context menu that people = actually want to use, then it should look like one. I'm probably wrong, but Windows context menus haven't titles either as I = remember it and they would look quite out of place on that platform as = well. From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 18 14:06:46 2021 Received: (at 50067) by debbugs.gnu.org; 18 Aug 2021 18:06:46 +0000 Received: from localhost ([127.0.0.1]:57560 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGPxd-0004ID-R4 for submit@debbugs.gnu.org; Wed, 18 Aug 2021 14:06:46 -0400 Received: from relay11.mail.gandi.net ([217.70.178.231]:56383) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGPxc-0004Hz-D0 for 50067@debbugs.gnu.org; Wed, 18 Aug 2021 14:06:44 -0400 Received: (Authenticated sender: juri@linkov.net) by relay11.mail.gandi.net (Postfix) with ESMTPSA id 0EA6F100007; Wed, 18 Aug 2021 18:06:34 +0000 (UTC) From: Juri Linkov To: Eli Zaretskii Subject: Re: bug#50067: Context menus Organization: LINKOV.NET References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@acm.org> <87v942pvcj.fsf@mail.linkov.net> <83zgte3asy.fsf@gnu.org> Date: Wed, 18 Aug 2021 21:06:11 +0300 In-Reply-To: <83zgte3asy.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 18 Aug 2021 20:46:53 +0300") Message-ID: <87mtpepqzw.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 50067 Cc: alan@idiocy.org, mattiase@acm.org, homeros.misasa@gmail.com, tkk@misasa.okayama-u.ac.jp, larsi@gnus.org, 50067@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> diff --git a/lisp/mouse.el b/lisp/mouse.el >> index 9b7d4c240f..5193994231 100644 >> --- a/lisp/mouse.el >> +++ b/lisp/mouse.el >> @@ -304,7 +304,7 @@ context-menu-filter-function >> (defun context-menu-map () >> "Return composite menu map." >> - (let ((menu (make-sparse-keymap "Context Menu"))) >> + (let ((menu (make-sparse-keymap))) >> (run-hook-wrapped 'context-menu-functions >> (lambda (fun) >> (setq menu (funcall fun menu)) > > I see you already pushed this, but it's a bad idea: it makes ugly > context menus on TTYs (and AFAIU also on non-toolkit X builds): these > _require_ the menu name because they display a caption which looks bad > with an empty name. I guess the presence of the title should be platform-dependent. For example, without a title it looks great on the GTK build. From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 18 14:11:42 2021 Received: (at 50067) by debbugs.gnu.org; 18 Aug 2021 18:11:42 +0000 Received: from localhost ([127.0.0.1]:57568 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGQ2L-0004Pb-Jz for submit@debbugs.gnu.org; Wed, 18 Aug 2021 14:11:41 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57836) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGQ2F-0004PD-J0 for 50067@debbugs.gnu.org; Wed, 18 Aug 2021 14:11:35 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:60202) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mGQ25-0002sc-OZ; Wed, 18 Aug 2021 14:11:21 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3127 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 1mGQ25-0003dQ-Bn; Wed, 18 Aug 2021 14:11:21 -0400 Date: Wed, 18 Aug 2021 21:11:16 +0300 Message-Id: <83tujm39ob.fsf@gnu.org> From: Eli Zaretskii To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= In-Reply-To: <87E21203-7AF2-4FD6-80C2-4561CD0AA088@acm.org> (message from Mattias =?utf-8?Q?Engdeg=C3=A5rd?= on Wed, 18 Aug 2021 20:01:17 +0200) Subject: Re: bug#50067: Context menus References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@acm.org> <87v942pvcj.fsf@mail.linkov.net> <83zgte3asy.fsf@gnu.org> <87E21203-7AF2-4FD6-80C2-4561CD0AA088@acm.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 50067 Cc: alan@idiocy.org, juri@linkov.net, homeros.misasa@gmail.com, tkk@misasa.okayama-u.ac.jp, larsi@gnus.org, 50067@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Mattias Engdegård > Date: Wed, 18 Aug 2021 20:01:17 +0200 > Cc: Juri Linkov , 50067@debbugs.gnu.org, > homeros.misasa@gmail.com, tkk@misasa.okayama-u.ac.jp, larsi@gnus.org, > alan@idiocy.org > > 18 aug. 2021 kl. 19.46 skrev Eli Zaretskii : > > > I don't really understand the original complaint: we have similar > > captions on the menu shown by C-mouse-3 in the default configuration: > > do macOS users want those to be removed as well? > > We definitely do but few people use that (rather useless) menu so its appearance doesn't matter much. OK, so I guess this change should be done only on macOS (but not on TTY frames displayed on macOS). > I'm probably wrong, but Windows context menus haven't titles either as I remember it and they would look quite out of place on that platform as well. Well, C-mouse-3 shows the caption of a menu on MS-Windows, so I see no problem with showing "Context menu" there (or any other string, if we find a better one, actually). That serves as a small description of what this menu is about. From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 18 14:13:24 2021 Received: (at 50067) by debbugs.gnu.org; 18 Aug 2021 18:13:24 +0000 Received: from localhost ([127.0.0.1]:57587 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGQ3z-0004TJ-Mx for submit@debbugs.gnu.org; Wed, 18 Aug 2021 14:13:24 -0400 Received: from eggs.gnu.org ([209.51.188.92]:58612) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGQ3q-0004Sq-LS for 50067@debbugs.gnu.org; Wed, 18 Aug 2021 14:13:15 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:60410) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mGQ3i-00040a-QU; Wed, 18 Aug 2021 14:13:04 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3230 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 1mGQ3i-0003zD-C2; Wed, 18 Aug 2021 14:13:02 -0400 Date: Wed, 18 Aug 2021 21:12:58 +0300 Message-Id: <83sfz639lh.fsf@gnu.org> From: Eli Zaretskii To: Juri Linkov In-Reply-To: <87mtpepqzw.fsf@mail.linkov.net> (message from Juri Linkov on Wed, 18 Aug 2021 21:06:11 +0300) Subject: Re: bug#50067: Context menus References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@acm.org> <87v942pvcj.fsf@mail.linkov.net> <83zgte3asy.fsf@gnu.org> <87mtpepqzw.fsf@mail.linkov.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 50067 Cc: alan@idiocy.org, mattiase@acm.org, homeros.misasa@gmail.com, tkk@misasa.okayama-u.ac.jp, larsi@gnus.org, 50067@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Juri Linkov > Cc: mattiase@acm.org, 50067@debbugs.gnu.org, homeros.misasa@gmail.com, > tkk@misasa.okayama-u.ac.jp, larsi@gnus.org, alan@idiocy.org > Date: Wed, 18 Aug 2021 21:06:11 +0300 > > > I see you already pushed this, but it's a bad idea: it makes ugly > > context menus on TTYs (and AFAIU also on non-toolkit X builds): these > > _require_ the menu name because they display a caption which looks bad > > with an empty name. > > I guess the presence of the title should be platform-dependent. > For example, without a title it looks great on the GTK build. What happens if the GTK build displays a TTY frame? Isn't the menu definition global, and thus doesn't distinguish between frame types? From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 18 14:40:20 2021 Received: (at 50067) by debbugs.gnu.org; 18 Aug 2021 18:40:20 +0000 Received: from localhost ([127.0.0.1]:57627 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGQU4-0007I6-7J for submit@debbugs.gnu.org; Wed, 18 Aug 2021 14:40:20 -0400 Received: from eggs.gnu.org ([209.51.188.92]:34826) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGQU2-0007Hq-7A for 50067@debbugs.gnu.org; Wed, 18 Aug 2021 14:40:15 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:33244) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mGQTr-0005vk-Jm; Wed, 18 Aug 2021 14:40:03 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4871 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 1mGQTq-0007vN-5d; Wed, 18 Aug 2021 14:40:02 -0400 Date: Wed, 18 Aug 2021 21:39:55 +0300 Message-Id: <83pmua38ck.fsf@gnu.org> From: Eli Zaretskii To: juri@linkov.net, Stefan Monnier In-Reply-To: <83sfz639lh.fsf@gnu.org> (message from Eli Zaretskii on Wed, 18 Aug 2021 21:12:58 +0300) Subject: Re: bug#50067: Context menus References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@acm.org> <87v942pvcj.fsf@mail.linkov.net> <83zgte3asy.fsf@gnu.org> <87mtpepqzw.fsf@mail.linkov.net> <83sfz639lh.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 50067 Cc: alan@idiocy.org, mattiase@acm.org, homeros.misasa@gmail.com, tkk@misasa.okayama-u.ac.jp, larsi@gnus.org, 50067@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > Date: Wed, 18 Aug 2021 21:12:58 +0300 > From: Eli Zaretskii > Cc: alan@idiocy.org, mattiase@acm.org, homeros.misasa@gmail.com, > tkk@misasa.okayama-u.ac.jp, larsi@gnus.org, 50067@debbugs.gnu.org > > > > I see you already pushed this, but it's a bad idea: it makes ugly > > > context menus on TTYs (and AFAIU also on non-toolkit X builds): these > > > _require_ the menu name because they display a caption which looks bad > > > with an empty name. > > > > I guess the presence of the title should be platform-dependent. > > For example, without a title it looks great on the GTK build. > > What happens if the GTK build displays a TTY frame? Isn't the menu > definition global, and thus doesn't distinguish between frame types? Come to think about it: aren't menu keymaps _required_ to have this string? The ELisp manual says: -- Function: make-sparse-keymap &optional prompt This function creates and returns a new sparse keymap with no entries. (A sparse keymap is the kind of keymap you usually want.) The new keymap does not contain a char-table, unlike ‘make-keymap’, and does not bind any events. (make-sparse-keymap) ⇒ (keymap) If you specify PROMPT, that becomes the overall prompt string for the keymap. You should specify this only for menu keymaps (*note Defining Menus::). A keymap with an overall prompt string will always present a mouse menu or a keyboard menu if it is active for looking up the next input event. Stefan, did we remove this requirement at some point, or is it still a requirement? If this is still needed (and it seems to be, at least on some frame types), I guess it's the code which produces native menus that wants not to have this caption (e.g., on macOS and GTK) -- that code should ignore this string and not stuff it into the native menu widget. But internally the menu name should still be present in the Lisp data structure. From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 18 14:45:31 2021 Received: (at 50067) by debbugs.gnu.org; 18 Aug 2021 18:45:31 +0000 Received: from localhost ([127.0.0.1]:57637 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGQZ9-0007QC-AX for submit@debbugs.gnu.org; Wed, 18 Aug 2021 14:45:31 -0400 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:55181) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGQZ7-0007Px-AC for 50067@debbugs.gnu.org; Wed, 18 Aug 2021 14:45:29 -0400 Received: (Authenticated sender: juri@linkov.net) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id CF1E760005; Wed, 18 Aug 2021 18:45:19 +0000 (UTC) From: Juri Linkov To: Eli Zaretskii Subject: Re: bug#50067: Context menus Organization: LINKOV.NET References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@acm.org> <87v942pvcj.fsf@mail.linkov.net> <83zgte3asy.fsf@gnu.org> <87mtpepqzw.fsf@mail.linkov.net> <83sfz639lh.fsf@gnu.org> Date: Wed, 18 Aug 2021 21:40:19 +0300 In-Reply-To: <83sfz639lh.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 18 Aug 2021 21:12:58 +0300") Message-ID: <8735r6ppf0.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 50067 Cc: alan@idiocy.org, mattiase@acm.org, homeros.misasa@gmail.com, tkk@misasa.okayama-u.ac.jp, larsi@gnus.org, 50067@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> I guess the presence of the title should be platform-dependent. >> For example, without a title it looks great on the GTK build. > > What happens if the GTK build displays a TTY frame? Isn't the menu > definition global, and thus doesn't distinguish between frame types? The menu definition is constructed dynamically, so it possible to set the title when (framep (selected-frame)) returns t on tty. From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 18 14:59:39 2021 Received: (at 50067) by debbugs.gnu.org; 18 Aug 2021 18:59:39 +0000 Received: from localhost ([127.0.0.1]:57658 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGQmk-0007lJ-1z for submit@debbugs.gnu.org; Wed, 18 Aug 2021 14:59:39 -0400 Received: from eggs.gnu.org ([209.51.188.92]:37708) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGQme-0007l1-2R for 50067@debbugs.gnu.org; Wed, 18 Aug 2021 14:59:32 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:33942) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mGQmU-0002bx-Ff; Wed, 18 Aug 2021 14:59:18 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2216 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 1mGQmU-0007to-1h; Wed, 18 Aug 2021 14:59:18 -0400 Date: Wed, 18 Aug 2021 21:59:10 +0300 Message-Id: <83o89u37gh.fsf@gnu.org> From: Eli Zaretskii To: Juri Linkov In-Reply-To: <8735r6ppf0.fsf@mail.linkov.net> (message from Juri Linkov on Wed, 18 Aug 2021 21:40:19 +0300) Subject: Re: bug#50067: Context menus References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@acm.org> <87v942pvcj.fsf@mail.linkov.net> <83zgte3asy.fsf@gnu.org> <87mtpepqzw.fsf@mail.linkov.net> <83sfz639lh.fsf@gnu.org> <8735r6ppf0.fsf@mail.linkov.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 50067 Cc: alan@idiocy.org, mattiase@acm.org, homeros.misasa@gmail.com, tkk@misasa.okayama-u.ac.jp, larsi@gnus.org, 50067@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > From: Juri Linkov > Cc: mattiase@acm.org, 50067@debbugs.gnu.org, homeros.misasa@gmail.com, > tkk@misasa.okayama-u.ac.jp, larsi@gnus.org, alan@idiocy.org > Date: Wed, 18 Aug 2021 21:40:19 +0300 > > >> I guess the presence of the title should be platform-dependent. > >> For example, without a title it looks great on the GTK build. > > > > What happens if the GTK build displays a TTY frame? Isn't the menu > > definition global, and thus doesn't distinguish between frame types? > > The menu definition is constructed dynamically, so it possible > to set the title when (framep (selected-frame)) returns t on tty. OK, but as I wrote elsewhere, I think the string should always be present, and if some GUI toolkit wants to ignore it, it should avoid putting it into the native menu structure when it creates the menu widget(s). The Lisp data should remain the same, IMO. From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 18 21:31:55 2021 Received: (at 50067) by debbugs.gnu.org; 19 Aug 2021 01:31:55 +0000 Received: from localhost ([127.0.0.1]:57803 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGWuN-00071D-P9 for submit@debbugs.gnu.org; Wed, 18 Aug 2021 21:31:55 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:42434) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGWuI-00070x-EI for 50067@debbugs.gnu.org; Wed, 18 Aug 2021 21:31:50 -0400 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 87876807F5; Wed, 18 Aug 2021 21:31:40 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id D0FCF806C6; Wed, 18 Aug 2021 21:31:38 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1629336698; bh=JYlEyumcCO75WntavfeOrAY714fzN9CsPERTX7u5dmk=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=SBOXBVj1VH83TRsPRi184z1FYVcHoEDVQFOFA3eHcqFKatLLNtaC2uJe3CB9j2/Uo NlMXMDWr96lQnh36KoPZJw5p2GLRDSYQBT6m/aAngS87Y2GA8ET0ErsnShZRfZicLF qbbZVn2Mc8ZE6RFU66dKrn/Oz96/dr9NCc4Gic4vXnlLqQhGrghDldMo4igosO73FO eBMNYy8TLwj9ihy86vearKjYwaWwhvDSehQKyDOM4RQPQ9IxJ51O4hytAVNXiPSdzy eS/h817e74RxpE3mw0pEzBcmoxnKYpkvQjoRGjxz4whSVYMfYQ41WSNsICHsxHwDuy +macgUUM9aOPA== Received: from alfajor (unknown [104.247.244.135]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 75A10120208; Wed, 18 Aug 2021 21:31:38 -0400 (EDT) From: Stefan Monnier To: Eli Zaretskii Subject: Re: bug#50067: Context menus Message-ID: References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@acm.org> <87v942pvcj.fsf@mail.linkov.net> <83zgte3asy.fsf@gnu.org> <87mtpepqzw.fsf@mail.linkov.net> <83sfz639lh.fsf@gnu.org> <83pmua38ck.fsf@gnu.org> Date: Wed, 18 Aug 2021 21:31:37 -0400 In-Reply-To: <83pmua38ck.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 18 Aug 2021 21:39:55 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL 0.081 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 50067 Cc: alan@idiocy.org, mattiase@acm.org, juri@linkov.net, homeros.misasa@gmail.com, tkk@misasa.okayama-u.ac.jp, larsi@gnus.org, 50067@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Stefan, did we remove this requirement at some point, or is it still a > requirement? If memory serves it's used (as the title) for the non-toolkit menus and it's not used for the toolkit menus, but the reality is probably less clear cut than that. Stefan From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 19 02:45:41 2021 Received: (at 50067) by debbugs.gnu.org; 19 Aug 2021 06:45:41 +0000 Received: from localhost ([127.0.0.1]:58213 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGbny-0000II-Se for submit@debbugs.gnu.org; Thu, 19 Aug 2021 02:45:41 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54278) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGbnt-0000I2-6B for 50067@debbugs.gnu.org; Thu, 19 Aug 2021 02:45:33 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:34852) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mGbnh-0003F8-If; Thu, 19 Aug 2021 02:45:17 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1494 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 1mGbna-0005de-H4; Thu, 19 Aug 2021 02:45:17 -0400 Date: Thu, 19 Aug 2021 09:44:48 +0300 Message-Id: <83eeaq2asf.fsf@gnu.org> From: Eli Zaretskii To: Stefan Monnier In-Reply-To: (message from Stefan Monnier on Wed, 18 Aug 2021 21:31:37 -0400) Subject: Re: bug#50067: Context menus References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@acm.org> <87v942pvcj.fsf@mail.linkov.net> <83zgte3asy.fsf@gnu.org> <87mtpepqzw.fsf@mail.linkov.net> <83sfz639lh.fsf@gnu.org> <83pmua38ck.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 50067 Cc: alan@idiocy.org, mattiase@acm.org, juri@linkov.net, homeros.misasa@gmail.com, tkk@misasa.okayama-u.ac.jp, larsi@gnus.org, 50067@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > From: Stefan Monnier > Cc: juri@linkov.net, alan@idiocy.org, mattiase@acm.org, > homeros.misasa@gmail.com, tkk@misasa.okayama-u.ac.jp, larsi@gnus.org, > 50067@debbugs.gnu.org > Date: Wed, 18 Aug 2021 21:31:37 -0400 > > > Stefan, did we remove this requirement at some point, or is it still a > > requirement? > > If memory serves it's used (as the title) for the non-toolkit menus and > it's not used for the toolkit menus, but the reality is probably less > clear cut than that. That's also my recollection. In particular TTY menus actually _expect_ to find a meaningful string there. So I think we need to reinstate the name in the context menus (though perhaps we could come up with a better name than "Context menu"), and if some toolkit wants to ignore it, they should do it when they create the menu widgets to show the menu on the screen. From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 19 03:22:09 2021 Received: (at 50067) by debbugs.gnu.org; 19 Aug 2021 07:22:09 +0000 Received: from localhost ([127.0.0.1]:58262 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGcNN-0001D4-J2 for submit@debbugs.gnu.org; Thu, 19 Aug 2021 03:22:09 -0400 Received: from relay2-d.mail.gandi.net ([217.70.183.194]:51517) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGcNL-0001CV-3G for 50067@debbugs.gnu.org; Thu, 19 Aug 2021 03:22:08 -0400 Received: (Authenticated sender: juri@linkov.net) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 0389940003; Thu, 19 Aug 2021 07:21:57 +0000 (UTC) From: Juri Linkov To: Eli Zaretskii Subject: Re: bug#50067: Context menus Organization: LINKOV.NET References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@acm.org> <87v942pvcj.fsf@mail.linkov.net> <83zgte3asy.fsf@gnu.org> <87mtpepqzw.fsf@mail.linkov.net> <83sfz639lh.fsf@gnu.org> <8735r6ppf0.fsf@mail.linkov.net> <83o89u37gh.fsf@gnu.org> Date: Thu, 19 Aug 2021 10:12:54 +0300 In-Reply-To: <83o89u37gh.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 18 Aug 2021 21:59:10 +0300") Message-ID: <87wnohx5zd.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 50067 Cc: alan@idiocy.org, mattiase@acm.org, homeros.misasa@gmail.com, tkk@misasa.okayama-u.ac.jp, larsi@gnus.org, 50067@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> >> I guess the presence of the title should be platform-dependent. >> >> For example, without a title it looks great on the GTK build. >> > >> > What happens if the GTK build displays a TTY frame? Isn't the menu >> > definition global, and thus doesn't distinguish between frame types? >> >> The menu definition is constructed dynamically, so it possible >> to set the title when (framep (selected-frame)) returns t on tty. > > OK, but as I wrote elsewhere, I think the string should always be > present, and if some GUI toolkit wants to ignore it, it should avoid > putting it into the native menu structure when it creates the menu > widget(s). The Lisp data should remain the same, IMO. GUI toolkits can't ignore titles for all menus. Some menus should be displayed with a title for all toolkits. The context menu is special. Nowadays everyone is accustomed to down-mouse-3 popping up a context menu without title. But other Emacs-specific menus that are not familiar to users such as mouse-buffer-menu bound C- should display a title for all toolkits to explain to the user what choice the menu presents. From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 19 03:58:19 2021 Received: (at 50067) by debbugs.gnu.org; 19 Aug 2021 07:58:19 +0000 Received: from localhost ([127.0.0.1]:58366 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGcwH-0002Ds-RC for submit@debbugs.gnu.org; Thu, 19 Aug 2021 03:58:19 -0400 Received: from eggs.gnu.org ([209.51.188.92]:42402) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGcwG-0002De-5L for 50067@debbugs.gnu.org; Thu, 19 Aug 2021 03:58:12 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:36588) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mGcw5-0000ic-9T; Thu, 19 Aug 2021 03:58:01 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2016 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 1mGcw4-0002KV-TA; Thu, 19 Aug 2021 03:58:01 -0400 Date: Thu, 19 Aug 2021 10:57:43 +0300 Message-Id: <831r6p3lzc.fsf@gnu.org> From: Eli Zaretskii To: Juri Linkov In-Reply-To: <87wnohx5zd.fsf@mail.linkov.net> (message from Juri Linkov on Thu, 19 Aug 2021 10:12:54 +0300) Subject: Re: bug#50067: Context menus References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@acm.org> <87v942pvcj.fsf@mail.linkov.net> <83zgte3asy.fsf@gnu.org> <87mtpepqzw.fsf@mail.linkov.net> <83sfz639lh.fsf@gnu.org> <8735r6ppf0.fsf@mail.linkov.net> <83o89u37gh.fsf@gnu.org> <87wnohx5zd.fsf@mail.linkov.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 50067 Cc: alan@idiocy.org, mattiase@acm.org, homeros.misasa@gmail.com, tkk@misasa.okayama-u.ac.jp, larsi@gnus.org, 50067@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Juri Linkov > Cc: mattiase@acm.org, 50067@debbugs.gnu.org, homeros.misasa@gmail.com, > tkk@misasa.okayama-u.ac.jp, larsi@gnus.org, alan@idiocy.org > Date: Thu, 19 Aug 2021 10:12:54 +0300 > > > OK, but as I wrote elsewhere, I think the string should always be > > present, and if some GUI toolkit wants to ignore it, it should avoid > > putting it into the native menu structure when it creates the menu > > widget(s). The Lisp data should remain the same, IMO. > > GUI toolkits can't ignore titles for all menus. Some menus should be > displayed with a title for all toolkits. Which popup menus have titles that cannot be ignored, and why? > The context menu is special. Nowadays everyone is accustomed to > down-mouse-3 popping up a context menu without title. But other > Emacs-specific menus that are not familiar to users such as > mouse-buffer-menu bound C- should display a title for > all toolkits to explain to the user what choice the menu presents. If we want some titles to behave in special ways, we could put a text property on the title string to mark those titles that should get special treatment. That is better than removing the title, and certainly better than removing it based on the frame type, because then Lisp code which handles the menu keymaps will need to be prepared to handle both kinds of menu keymaps, the ones with a title and ones without it. It is also against the documented practice. So let's please reinstate the title, and use properties or some other mechanism to mark the title strings that need special handling in some circumstances. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 19 10:22:53 2021 Received: (at 50067) by debbugs.gnu.org; 19 Aug 2021 14:22:53 +0000 Received: from localhost ([127.0.0.1]:60508 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGiwX-0006AQ-KB for submit@debbugs.gnu.org; Thu, 19 Aug 2021 10:22:53 -0400 Received: from mail1439c50.megamailservers.eu ([91.136.14.39]:52206 helo=mail264c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGiwU-0006A4-JH for 50067@debbugs.gnu.org; Thu, 19 Aug 2021 10:22:52 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1629382963; bh=oDaCIt7CA1G6hfhyu7b4PPkG140/D36pgeq+bFRLPGI=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=R22c8O++YFLuBvS/1Xo74ym52x93r/hqTV6kjQiUVcA93Fd2aqjdJekv7IjMMOgUk Wmtercbk6Sm8LW7WVxCzizL56TYTNesOen11aJkmLMS0CXPdDsx1iIylGB+n5KAFiF gOmRoyjo62smK/V2/CFLBlPpnM2XXBVuTyKdg2O8= Feedback-ID: mattiase@acm.or Received: from [192.168.0.4] (c188-150-171-71.bredband.tele2.se [188.150.171.71]) (authenticated bits=0) by mail264c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 17JEMdwT009289; Thu, 19 Aug 2021 14:22:41 +0000 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.21\)) Subject: Re: bug#50067: Context menus From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: Date: Thu, 19 Aug 2021 16:22:39 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <004A628A-99CC-4C62-8AE2-921C4C38D42A@acm.org> References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@acm.org> <87v942pvcj.fsf@mail.linkov.net> To: Juri Linkov X-Mailer: Apple Mail (2.3445.104.21) X-CTCH-RefID: str=0001.0A742F1A.611E6933.0070, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=Xdb3M7x5 c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=IkcTkHD0fZMA:10 a=M51BFTxLslgA:10 a=N54-gffFAAAA:8 a=8Qn-sy085hmXBpBc-0AA:9 a=QEXdDO2ut3YA:10 a=6l0D2HzqY3Epnrm8mE3f:22 X-Origin-Country: SE X-Spam-Score: 1.4 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.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 the administrator of that system for details. Content preview: 18 aug. 2021 kl. 19.46 skrev Mattias Engdegård : > Yes it works for elisp, because its xref backend is simplistic enough to just accept the symbol given as argument. An example of a package where it doesn't work is merlin which is rather more sophis [...] Content analysis details: (1.4 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.4 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-Debbugs-Envelope-To: 50067 Cc: tkk@misasa.okayama-u.ac.jp, Tak Kunihiro , 50067@debbugs.gnu.org, Lars Ingebrigtsen , Alan Third X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) 18 aug. 2021 kl. 19.46 skrev Mattias Engdeg=C3=A5rd : > Yes it works for elisp, because its xref backend is simplistic enough = to just accept the symbol given as argument. An example of a package = where it doesn't work is merlin which is rather more sophisticated and = wants to find the exact context so that it can find the right = definition, so it ignores the argument. Having actually read the doc strings I see that xref backends are = supposed to define `xref-backend-identifier-at-point` which can stuff = any information it needs in a property of the string it returns, as sort = of a semi-covert channel to `xref-backend-definitions` etc. Sorry about = the unfounded complaint. Would adding `xref-find-references-at-mouse` be handy for use in the = context menu? From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 20 03:33:02 2021 Received: (at 50067) by debbugs.gnu.org; 20 Aug 2021 07:33:02 +0000 Received: from localhost ([127.0.0.1]:32896 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGz1R-0004YW-L4 for submit@debbugs.gnu.org; Fri, 20 Aug 2021 03:33:02 -0400 Received: from relay7-d.mail.gandi.net ([217.70.183.200]:54545) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGz1K-0004Y5-C3 for 50067@debbugs.gnu.org; Fri, 20 Aug 2021 03:33:00 -0400 Received: (Authenticated sender: juri@linkov.net) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id 17EC020005; Fri, 20 Aug 2021 07:32:43 +0000 (UTC) From: Juri Linkov To: Eli Zaretskii Subject: Re: bug#50067: Context menus Organization: LINKOV.NET References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@acm.org> <87v942pvcj.fsf@mail.linkov.net> <83zgte3asy.fsf@gnu.org> <87mtpepqzw.fsf@mail.linkov.net> <83sfz639lh.fsf@gnu.org> <8735r6ppf0.fsf@mail.linkov.net> <83o89u37gh.fsf@gnu.org> <87wnohx5zd.fsf@mail.linkov.net> <831r6p3lzc.fsf@gnu.org> Date: Fri, 20 Aug 2021 10:29:47 +0300 In-Reply-To: <831r6p3lzc.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 19 Aug 2021 10:57:43 +0300") Message-ID: <87o89sh96g.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 50067 Cc: alan@idiocy.org, mattiase@acm.org, homeros.misasa@gmail.com, tkk@misasa.okayama-u.ac.jp, larsi@gnus.org, 50067@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> GUI toolkits can't ignore titles for all menus. Some menus should be >> displayed with a title for all toolkits. > > Which popup menus have titles that cannot be ignored, and why? An example of such menu is mouse-buffer-menu bound to C- where the user might wonder what do these menu items with mode names mean? >> The context menu is special. Nowadays everyone is accustomed to >> down-mouse-3 popping up a context menu without title. But other >> Emacs-specific menus that are not familiar to users such as >> mouse-buffer-menu bound C- should display a title for >> all toolkits to explain to the user what choice the menu presents. > > If we want some titles to behave in special ways, we could put a text > property on the title string to mark those titles that should get > special treatment. That is better than removing the title, and > certainly better than removing it based on the frame type, because > then Lisp code which handles the menu keymaps will need to be prepared > to handle both kinds of menu keymaps, the ones with a title and ones > without it. It is also against the documented practice. Using a text property would be a good solution. Should then the NS-specific "Select" title be removed in menu.c when the title has a special text property? From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 20 03:33:05 2021 Received: (at 50067) by debbugs.gnu.org; 20 Aug 2021 07:33:05 +0000 Received: from localhost ([127.0.0.1]:32904 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGz1V-0004Za-3h for submit@debbugs.gnu.org; Fri, 20 Aug 2021 03:33:05 -0400 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:36461) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGz1S-0004YF-Hm for 50067@debbugs.gnu.org; Fri, 20 Aug 2021 03:33:03 -0400 Received: (Authenticated sender: juri@linkov.net) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 3F920C0008; Fri, 20 Aug 2021 07:32:50 +0000 (UTC) From: Juri Linkov To: Mattias =?iso-8859-1?Q?Engdeg=E5rd?= Subject: Re: bug#50067: Context menus Organization: LINKOV.NET References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@acm.org> <87v942pvcj.fsf@mail.linkov.net> <004A628A-99CC-4C62-8AE2-921C4C38D42A@acm.org> Date: Fri, 20 Aug 2021 10:31:07 +0300 In-Reply-To: <004A628A-99CC-4C62-8AE2-921C4C38D42A@acm.org> ("Mattias =?iso-8859-1?Q?Engdeg=E5rd=22's?= message of "Thu, 19 Aug 2021 16:22:39 +0200") Message-ID: <87h7fkh8z8.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 50067 Cc: tkk@misasa.okayama-u.ac.jp, Tak Kunihiro , 50067@debbugs.gnu.org, Lars Ingebrigtsen , Alan Third X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> Yes it works for elisp, because its xref backend is simplistic enough to >> just accept the symbol given as argument. An example of a package where >> it doesn't work is merlin which is rather more sophisticated and wants to >> find the exact context so that it can find the right definition, so it >> ignores the argument. > > Having actually read the doc strings I see that xref backends are supposed > to define `xref-backend-identifier-at-point` which can stuff any > information it needs in a property of the string it returns, as sort of > a semi-covert channel to `xref-backend-definitions` etc. Sorry about the > unfounded complaint. > > Would adding `xref-find-references-at-mouse` be handy for use in the context menu? If the existing `xref-backend-identifier-at-point` can't be reused by adding a new optional arg `click`, then a cleaner solution would be to add `xref-backend-identifier-at-mouse` indeed. From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 20 06:30:03 2021 Received: (at 50067) by debbugs.gnu.org; 20 Aug 2021 10:30:03 +0000 Received: from localhost ([127.0.0.1]:33001 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mH1mk-00034r-9X for submit@debbugs.gnu.org; Fri, 20 Aug 2021 06:30:02 -0400 Received: from mail1479c50.megamailservers.eu ([91.136.14.79]:42794 helo=mail118c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mH1mh-00034H-2a for 50067@debbugs.gnu.org; Fri, 20 Aug 2021 06:30:00 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1629455390; bh=xoa7oIRfmjXASWdFyylXfAv5lnqgYhFSycES2cquNg0=; h=From:Subject:Date:In-Reply-To:Cc:To:References:From; b=PIJ3M/2vdEqZnzmLBsMtyhT5kLD1bMDOr5bXIeb0RkYuZBCw4Cijym2AGNAf2eze+ R4ZKwAS2XRyZ/P2P2lWOiFXDR7UP6MHv/LgLdwQw0BBfhymG6P6sCPoOriQvZRvPdT jf+yCycCklzEPAJ6P+nZnesJF8T9PMMRj2sNsB/k= Feedback-ID: mattiase@acm.or Received: from [192.168.0.4] (c188-150-171-71.bredband.tele2.se [188.150.171.71]) (authenticated bits=0) by mail118c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 17KATkFW015080; Fri, 20 Aug 2021 10:29:48 +0000 From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= Message-Id: <054BA74B-AACE-483F-994E-5E8E49E093E5@acm.org> Content-Type: multipart/mixed; boundary="Apple-Mail=_B5FCEA10-E0DC-424D-9857-A27F1972A5F9" Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.21\)) Subject: Re: bug#50067: Context menus Date: Fri, 20 Aug 2021 12:29:46 +0200 In-Reply-To: <87o89sh96g.fsf@mail.linkov.net> To: Juri Linkov References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@acm.org> <87v942pvcj.fsf@mail.linkov.net> <83zgte3asy.fsf@gnu.org> <87mtpepqzw.fsf@mail.linkov.net> <83sfz639lh.fsf@gnu.org> <8735r6ppf0.fsf@mail.linkov.net> <83o89u37gh.fsf@gnu.org> <87wnohx5zd.fsf@mail.linkov.net> <831r6p3lzc.fsf@gnu.org> <87o89sh96g.fsf@mail.linkov.net> X-Mailer: Apple Mail (2.3445.104.21) X-CTCH-RefID: str=0001.0A742F24.611F841E.0031, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=Ro+70xuK c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=M51BFTxLslgA:10 a=ucMQw-l_AAAA:8 a=fadQNI1QHYaLwKwGDA4A:9 a=CjuIK1q_8ugA:10 a=QB8CW2OmG7bqRjDTZ6EA:9 a=B2y7HmGcmWMA:10 a=tclcd6dtLQvEqt9_mmAA:9 a=xkTruGkd22MpkFU079mG:22 X-Origin-Country: SE X-Spam-Score: 1.4 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.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 the administrator of that system for details. Content preview: 20 aug. 2021 kl. 09.29 skrev Juri Linkov : > An example of such menu is mouse-buffer-menu bound to C- > where the user might wonder what do these menu items with mode names mean? Content analysis details: (1.4 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.4 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-Debbugs-Envelope-To: 50067 Cc: alan@idiocy.org, homeros.misasa@gmail.com, tkk@misasa.okayama-u.ac.jp, larsi@gnus.org, 50067@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --Apple-Mail=_B5FCEA10-E0DC-424D-9857-A27F1972A5F9 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii 20 aug. 2021 kl. 09.29 skrev Juri Linkov : > An example of such menu is mouse-buffer-menu bound to C- > where the user might wonder what do these menu items with mode names = mean? That's moot for macOS since C-mouse-1 will be used for the context menu. = (Proposed patch attached.) In macOS/NS, "titles" as disabled menu entries simply do not exist in = the GUI vocabulary and look alien, amateurish, confusing or wrong. The = menu is expected to be understood in its context of activation. Where menus have titles, it's the corresponding entry in the parent menu = (or menu bar). They are never named "something Menu" because that would = be silly; typically it's a verb, or a noun setting a context for the = entries in the sub-menu. For a menu of buffers to switch to, the title = (if any) might be "Switch to buffer", "Buffer", "Switch to" or similar. --Apple-Mail=_B5FCEA10-E0DC-424D-9857-A27F1972A5F9 Content-Disposition: attachment; filename=0001-Use-C-mouse-1-for-context-menu-on-NS.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-Use-C-mouse-1-for-context-menu-on-NS.patch" Content-Transfer-Encoding: quoted-printable =46rom=20e505aa17a1ac679fee55220c594f0cfd53342739=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20=3D?UTF-8?q?Mattias=3D20Engdeg=3DC3=3DA5rd?=3D=20= =0ADate:=20Fri,=2020=20Aug=202021=2012:03:20=20+0200=0A= Subject:=20[PATCH]=20Use=20C-mouse-1=20for=20context=20menu=20on=20NS=0A=0A= The=20Mac=20platform=20convention=20is=20to=20use=20control-left-click=20= for=20context=0Amenus=20(as=20a=20synonym=20to=20right-click).=0A=0A*=20= lisp/mouse.el=20(context-menu--old-bindings):=20Remove.=0A= (context-menu--saved-bindings)=0A(context-menu--bind-mouse,=20= context-menu--reset-bindings):=20New.=0A(context-menu-mode):=20Use=20new=20= functions,=20with=20C-mouse-1=20as=20extra=0Abinding=20on=20NS.=0A---=0A=20= lisp/mouse.el=20|=2045=20+++++++++++++++++++++++++++++----------------=0A= =201=20file=20changed,=2029=20insertions(+),=2016=20deletions(-)=0A=0A= diff=20--git=20a/lisp/mouse.el=20b/lisp/mouse.el=0Aindex=20= 4c4a7d35a8..8af5509afc=20100644=0A---=20a/lisp/mouse.el=0A+++=20= b/lisp/mouse.el=0A@@=20-440,8=20+440,28=20@@=20context-menu-entry=0A=20=20= =20`(menu-item=20,(purecopy=20"Context=20Menu")=20ignore=0A=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20:filter=20(lambda=20(_)=20= (context-menu-map))))=0A=20=0A-(defvar=20context-menu--old-down-mouse-3=20= nil)=0A-(defvar=20context-menu--old-mouse-3=20nil)=0A+(defvar=20= context-menu--saved-bindings=20nil=0A+=20=20"Alist=20of=20bindings=20to=20= restore=20when=20`context-menu-mode'=20is=20disabled.")=0A+=0A+(defun=20= context-menu--bind-mouse=20(click-sym=20down-sym)=0A+=20=20"Enable=20= `context-menu-mode'=20mouse=20bindings.=0A+CLICK-SYM=20and=20DOWN-SYM=20= are=20the=20mouse=20click=20and=20down=20key=20symbols=20to=20use."=0A+=20= =20(let=20((click=20(vector=20click-sym))=0A+=20=20=20=20=20=20=20=20= (down=20(vector=20down-sym)))=0A+=20=20=20=20(push=20(cons=20click-sym=20= (global-key-binding=20click))=0A+=20=20=20=20=20=20=20=20=20=20= context-menu--saved-bindings)=0A+=20=20=20=20(global-unset-key=20click)=0A= +=20=20=20=20(push=20(cons=20down-sym=20(global-key-binding=20down))=0A+=20= =20=20=20=20=20=20=20=20=20context-menu--saved-bindings)=0A+=20=20=20=20= (global-set-key=20down=20context-menu-entry)))=0A+=0A+(defun=20= context-menu--reset-bindings=20()=0A+=20=20"Restore=20saved=20= `context-menu-mode'=20bindings."=0A+=20=20(pcase-dolist=20(`(sym=20.=20= binding)=20context-menu--saved-bindings)=0A+=20=20=20=20(let=20((key=20= (vector=20sym)))=0A+=20=20=20=20=20=20(if=20binding=0A+=20=20=20=20=20=20= =20=20=20=20(global-set-key=20key=20binding)=0A+=20=20=20=20=20=20=20=20= (global-unset-key=20key)))))=0A=20=0A=20(define-minor-mode=20= context-menu-mode=0A=20=20=20"Toggle=20Context=20Menu=20mode.=0A@@=20= -449,20=20+469,13=20@@=20context-menu-mode=0A=20When=20Context=20Menu=20= mode=20is=20enabled,=20clicking=20the=20mouse=20button=20down-mouse-3=0A=20= activates=20the=20menu=20whose=20contents=20depends=20on=20its=20= surrounding=20context."=0A=20=20=20:global=20t=20:group=20'mouse=0A-=20=20= (cond=0A-=20=20=20(context-menu-mode=0A-=20=20=20=20(setq=20= context-menu--old-mouse-3=20(global-key-binding=20[mouse-3]))=0A-=20=20=20= =20(global-unset-key=20[mouse-3])=0A-=20=20=20=20(setq=20= context-menu--old-down-mouse-3=20(global-key-binding=20[down-mouse-3]))=0A= -=20=20=20=20(global-set-key=20[down-mouse-3]=20context-menu-entry))=0A-=20= =20=20(t=0A-=20=20=20=20(if=20(not=20context-menu--old-down-mouse-3)=0A-=20= =20=20=20=20=20=20=20(global-unset-key=20[down-mouse-3])=0A-=20=20=20=20=20= =20(global-set-key=20[down-mouse-3]=20context-menu--old-down-mouse-3)=0A= -=20=20=20=20=20=20(setq=20context-menu--old-down-mouse-3=20nil))=0A-=20=20= =20=20(when=20context-menu--old-mouse-3=0A-=20=20=20=20=20=20= (global-set-key=20[mouse-3]=20context-menu--old-mouse-3)=0A-=20=20=20=20=20= =20(setq=20context-menu--old-mouse-3=20nil)))))=0A+=20=20(if=20= context-menu-mode=0A+=20=20=20=20=20=20(progn=0A+=20=20=20=20=20=20=20=20= (setq=20context-menu--saved-bindings=20nil)=0A+=20=20=20=20=20=20=20=20= (context-menu--bind-mouse=20'mouse-3=20'down-mouse-3)=0A+=20=20=20=20=20=20= =20=20(when=20(featurep=20'ns)=0A+=20=20=20=20=20=20=20=20=20=20= (context-menu--bind-mouse=20'C-mouse-1=20'C-down-mouse-1)))=0A+=20=20=20=20= (context-menu--restore-bindings)))=0A=20=0A=20=0C=0A=20;;=20Commands=20= that=20operate=20on=20windows.=0A--=20=0A2.21.1=20(Apple=20Git-122.3)=0A=0A= --Apple-Mail=_B5FCEA10-E0DC-424D-9857-A27F1972A5F9 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii --Apple-Mail=_B5FCEA10-E0DC-424D-9857-A27F1972A5F9-- From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 20 06:54:11 2021 Received: (at 50067) by debbugs.gnu.org; 20 Aug 2021 10:54:11 +0000 Received: from localhost ([127.0.0.1]:33026 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mH2A2-0005q6-Qr for submit@debbugs.gnu.org; Fri, 20 Aug 2021 06:54:11 -0400 Received: from eggs.gnu.org ([209.51.188.92]:34636) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mH2A1-0005pb-HB for 50067@debbugs.gnu.org; Fri, 20 Aug 2021 06:54:06 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:39476) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mH29r-0000V4-DD; Fri, 20 Aug 2021 06:53:55 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1785 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 1mH29n-0002Wu-Sk; Fri, 20 Aug 2021 06:53:55 -0400 Date: Fri, 20 Aug 2021 13:53:33 +0300 Message-Id: <83bl5s1j6a.fsf@gnu.org> From: Eli Zaretskii To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= In-Reply-To: <054BA74B-AACE-483F-994E-5E8E49E093E5@acm.org> (message from Mattias =?utf-8?Q?Engdeg=C3=A5rd?= on Fri, 20 Aug 2021 12:29:46 +0200) Subject: Re: bug#50067: Context menus References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@acm.org> <87v942pvcj.fsf@mail.linkov.net> <83zgte3asy.fsf@gnu.org> <87mtpepqzw.fsf@mail.linkov.net> <83sfz639lh.fsf@gnu.org> <8735r6ppf0.fsf@mail.linkov.net> <83o89u37gh.fsf@gnu.org> <87wnohx5zd.fsf@mail.linkov.net> <831r6p3lzc.fsf@gnu.org> <87o89sh96g.fsf@mail.linkov.net> <054BA74B-AACE-483F-994E-5E8E49E093E5@acm.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 50067 Cc: alan@idiocy.org, juri@linkov.net, homeros.misasa@gmail.com, tkk@misasa.okayama-u.ac.jp, larsi@gnus.org, 50067@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > From: Mattias Engdegård > Date: Fri, 20 Aug 2021 12:29:46 +0200 > Cc: Eli Zaretskii , 50067@debbugs.gnu.org, > homeros.misasa@gmail.com, tkk@misasa.okayama-u.ac.jp, larsi@gnus.org, > alan@idiocy.org > > In macOS/NS, "titles" as disabled menu entries simply do not exist in the GUI vocabulary and look alien, amateurish, confusing or wrong. The menu is expected to be understood in its context of activation. Then please propose macOS-specific changes that ignore the menu names instead of displaying them. Platform-specific conventions should not leak into general Lisp data structures. From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 20 07:32:53 2021 Received: (at 50067) by debbugs.gnu.org; 20 Aug 2021 11:32:53 +0000 Received: from localhost ([127.0.0.1]:33048 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mH2lV-0000RR-01 for submit@debbugs.gnu.org; Fri, 20 Aug 2021 07:32:53 -0400 Received: from mail1458c50.megamailservers.eu ([91.136.14.58]:59656 helo=mail267c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mH2lP-0000Nq-1G for 50067@debbugs.gnu.org; Fri, 20 Aug 2021 07:32:47 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1629459154; bh=a2XdxiJxiv5TfuBMQgh8Cq9g3lkzBn6AKXRUZvMeaQM=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=HUzTJup8oGl4Y7Ds9WkFqiS2q9DTANMSkqLQJxue0eZJi6b6YBWq+DStu+M0gOMaF JveaEn1auXp/QDNBO1YskRubTBGD+Gkm4tJ/D1CYFAhEac7BF3u86jbOHdLhDfXx/g wRZyI+WUMnpcoDR8JdHDFe7QvALbhUdiLoht4tz8= Feedback-ID: mattiase@acm.or Received: from [192.168.0.4] (c188-150-171-71.bredband.tele2.se [188.150.171.71]) (authenticated bits=0) by mail267c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 17KBWTGg010954; Fri, 20 Aug 2021 11:32:30 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.21\)) Subject: Re: bug#50067: Context menus From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: <83bl5s1j6a.fsf@gnu.org> Date: Fri, 20 Aug 2021 13:32:28 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <4D90962D-4FB3-45AB-BC3C-6E947FE297D0@acm.org> References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@acm.org> <87v942pvcj.fsf@mail.linkov.net> <83zgte3asy.fsf@gnu.org> <87mtpepqzw.fsf@mail.linkov.net> <83sfz639lh.fsf@gnu.org> <8735r6ppf0.fsf@mail.linkov.net> <83o89u37gh.fsf@gnu.org> <87wnohx5zd.fsf@mail.linkov.net> <831r6p3lzc.fsf@gnu.org> <87o89sh96g.fsf@mail.linkov.net> <054BA74B-AACE-483F-994E-5E8E49E093E5@acm.org> <83bl5s1j6a.fsf@gnu.org> To: Eli Zaretskii X-Mailer: Apple Mail (2.3445.104.21) X-CTCH-RefID: str=0001.0A742F20.611F92D2.000B, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=S9SnP7kP c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=mDV3o1hIAAAA:8 a=gwcYGGNXkXFP349NZ4oA:9 a=CjuIK1q_8ugA:10 a=_FVE-zBwftR9WsbkzFJk:22 X-Origin-Country: SE X-Spam-Score: 1.4 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.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 the administrator of that system for details. Content preview: 20 aug. 2021 kl. 12.53 skrev Eli Zaretskii : > Then please propose macOS-specific changes that ignore the menu names > instead of displaying them. Platform-specific conventions should not > leak into general Lisp data structures. Content analysis details: (1.4 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.4 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-Debbugs-Envelope-To: 50067 Cc: alan@idiocy.org, juri@linkov.net, homeros.misasa@gmail.com, tkk@misasa.okayama-u.ac.jp, larsi@gnus.org, 50067@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) 20 aug. 2021 kl. 12.53 skrev Eli Zaretskii : > Then please propose macOS-specific changes that ignore the menu names > instead of displaying them. Platform-specific conventions should not > leak into general Lisp data structures. I fully agree. I'll see what I can do. Meanwhile I'm pushing the C-mouse-1 change since it seems to be in line = with the intent of context-menu-mode. From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 20 07:33:04 2021 Received: (at 50067) by debbugs.gnu.org; 20 Aug 2021 11:33:04 +0000 Received: from localhost ([127.0.0.1]:33051 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mH2lg-0000Rp-5F for submit@debbugs.gnu.org; Fri, 20 Aug 2021 07:33:04 -0400 Received: from eggs.gnu.org ([209.51.188.92]:42864) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mH2la-0000RU-LT for 50067@debbugs.gnu.org; Fri, 20 Aug 2021 07:32:59 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:44694) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mH2lQ-000113-Jk; Fri, 20 Aug 2021 07:32:44 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4150 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 1mH2lP-0007T6-5R; Fri, 20 Aug 2021 07:32:44 -0400 Date: Fri, 20 Aug 2021 14:32:27 +0300 Message-Id: <837dgg1hdg.fsf@gnu.org> From: Eli Zaretskii To: Juri Linkov In-Reply-To: <87o89sh96g.fsf@mail.linkov.net> (message from Juri Linkov on Fri, 20 Aug 2021 10:29:47 +0300) Subject: Re: bug#50067: Context menus References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@acm.org> <87v942pvcj.fsf@mail.linkov.net> <83zgte3asy.fsf@gnu.org> <87mtpepqzw.fsf@mail.linkov.net> <83sfz639lh.fsf@gnu.org> <8735r6ppf0.fsf@mail.linkov.net> <83o89u37gh.fsf@gnu.org> <87wnohx5zd.fsf@mail.linkov.net> <831r6p3lzc.fsf@gnu.org> <87o89sh96g.fsf@mail.linkov.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 50067 Cc: alan@idiocy.org, mattiase@acm.org, homeros.misasa@gmail.com, tkk@misasa.okayama-u.ac.jp, larsi@gnus.org, 50067@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Juri Linkov > Cc: mattiase@acm.org, 50067@debbugs.gnu.org, homeros.misasa@gmail.com, > tkk@misasa.okayama-u.ac.jp, larsi@gnus.org, alan@idiocy.org > Date: Fri, 20 Aug 2021 10:29:47 +0300 > > >> GUI toolkits can't ignore titles for all menus. Some menus should be > >> displayed with a title for all toolkits. > > > > Which popup menus have titles that cannot be ignored, and why? > > An example of such menu is mouse-buffer-menu bound to C- > where the user might wonder what do these menu items with mode names mean? OK, but I still don't think I fully understand how context menus are different. Are we sure the user will immediately understand the purpose of the context menus, but not of a buffer-menu? > > If we want some titles to behave in special ways, we could put a text > > property on the title string to mark those titles that should get > > special treatment. That is better than removing the title, and > > certainly better than removing it based on the frame type, because > > then Lisp code which handles the menu keymaps will need to be prepared > > to handle both kinds of menu keymaps, the ones with a title and ones > > without it. It is also against the documented practice. > > Using a text property would be a good solution. Should then > the NS-specific "Select" title be removed in menu.c > when the title has a special text property? I'm not sure I understand what is the NS-specific "Select" title. Can you point me to the relevant code? From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 20 12:52:17 2021 Received: (at 50067) by debbugs.gnu.org; 20 Aug 2021 16:52:17 +0000 Received: from localhost ([127.0.0.1]:35446 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mH7kY-0001AH-79 for submit@debbugs.gnu.org; Fri, 20 Aug 2021 12:52:17 -0400 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:11087) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mH7kW-0001A1-Qv for 50067@debbugs.gnu.org; Fri, 20 Aug 2021 12:52:09 -0400 Received: (Authenticated sender: juri@linkov.net) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id A4B3D240006; Fri, 20 Aug 2021 16:51:58 +0000 (UTC) From: Juri Linkov To: Eli Zaretskii Subject: Re: bug#50067: Context menus Organization: LINKOV.NET References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@acm.org> <87v942pvcj.fsf@mail.linkov.net> <83zgte3asy.fsf@gnu.org> <87mtpepqzw.fsf@mail.linkov.net> <83sfz639lh.fsf@gnu.org> <8735r6ppf0.fsf@mail.linkov.net> <83o89u37gh.fsf@gnu.org> <87wnohx5zd.fsf@mail.linkov.net> <831r6p3lzc.fsf@gnu.org> <87o89sh96g.fsf@mail.linkov.net> <837dgg1hdg.fsf@gnu.org> Date: Fri, 20 Aug 2021 19:36:58 +0300 In-Reply-To: <837dgg1hdg.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 20 Aug 2021 14:32:27 +0300") Message-ID: <87mtpcf79p.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 50067 Cc: alan@idiocy.org, mattiase@acm.org, homeros.misasa@gmail.com, tkk@misasa.okayama-u.ac.jp, larsi@gnus.org, 50067@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain >> An example of such menu is mouse-buffer-menu bound to C- >> where the user might wonder what do these menu items with mode names mean? > > OK, but I still don't think I fully understand how context menus are > different. Are we sure the user will immediately understand the > purpose of the context menus, but not of a buffer-menu? Context menus displayed up by down-mouse-3 are ubiquitous nowadays, they are everywhere, and the users expect them without a title, unlike Emacs-specific menus unfamiliar to most users. >> Using a text property would be a good solution. Should then >> the NS-specific "Select" title be removed in menu.c >> when the title has a special text property? > > I'm not sure I understand what is the NS-specific "Select" title. Can > you point me to the relevant code? I meant such patch: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=context-menu-title.patch diff --git a/lisp/mouse.el b/lisp/mouse.el index d2a5200d8d..f9355b4f73 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -304,7 +304,7 @@ context-menu-filter-function (defun context-menu-map () "Return composite menu map." - (let ((menu (make-sparse-keymap))) + (let ((menu (make-sparse-keymap (propertize "Context Menu" 'hide t)))) (run-hook-wrapped 'context-menu-functions (lambda (fun) (setq menu (funcall fun menu)) diff --git a/src/menu.c b/src/menu.c index 3b1d740257..6654c47c93 100644 --- a/src/menu.c +++ b/src/menu.c @@ -1284,6 +1284,14 @@ x_popup_menu_1 (Lisp_Object position, Lisp_Object menu) /* Search for a string appearing directly as an element of the keymap. That string is the title of the menu. */ prompt = Fkeymap_prompt (keymap); + +#if defined (USE_GTK) || defined (HAVE_NS) + if (STRINGP (prompt) + && SCHARS (prompt) > 0 + && !NILP (Fget_text_property (make_fixnum (0), Qhide, prompt))) + title = Qnil; + else +#endif if (!NILP (prompt)) title = prompt; #ifdef HAVE_NS /* Is that needed and NS-specific? --Stef */ --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 20 12:52:32 2021 Received: (at 50067) by debbugs.gnu.org; 20 Aug 2021 16:52:32 +0000 Received: from localhost ([127.0.0.1]:35454 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mH7ku-0001B8-DO for submit@debbugs.gnu.org; Fri, 20 Aug 2021 12:52:32 -0400 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:39089) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mH7kp-0001Ag-BE for 50067@debbugs.gnu.org; Fri, 20 Aug 2021 12:52:27 -0400 Received: (Authenticated sender: juri@linkov.net) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 0E49C1C0004; Fri, 20 Aug 2021 16:52:15 +0000 (UTC) From: Juri Linkov To: Mattias =?iso-8859-1?Q?Engdeg=E5rd?= Subject: Re: bug#50067: Context menus Organization: LINKOV.NET References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@acm.org> <87v942pvcj.fsf@mail.linkov.net> <83zgte3asy.fsf@gnu.org> <87mtpepqzw.fsf@mail.linkov.net> <83sfz639lh.fsf@gnu.org> <8735r6ppf0.fsf@mail.linkov.net> <83o89u37gh.fsf@gnu.org> <87wnohx5zd.fsf@mail.linkov.net> <831r6p3lzc.fsf@gnu.org> <87o89sh96g.fsf@mail.linkov.net> <054BA74B-AACE-483F-994E-5E8E49E093E5@acm.org> <83bl5s1j6a.fsf@gnu.org> <4D90962D-4FB3-45AB-BC3C-6E947FE297D0@acm.org> Date: Fri, 20 Aug 2021 19:50:36 +0300 In-Reply-To: <4D90962D-4FB3-45AB-BC3C-6E947FE297D0@acm.org> ("Mattias =?iso-8859-1?Q?Engdeg=E5rd=22's?= message of "Fri, 20 Aug 2021 13:32:28 +0200") Message-ID: <87sfz4cb6r.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 50067 Cc: alan@idiocy.org, homeros.misasa@gmail.com, tkk@misasa.okayama-u.ac.jp, larsi@gnus.org, 50067@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > Meanwhile I'm pushing the C-mouse-1 change since it seems to be > in line with the intent of context-menu-mode. On emacs-devel Ergus proposed to add such bindings to a new context-menu-mode-map. Do you think this is feasible? From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 20 13:06:36 2021 Received: (at 50067) by debbugs.gnu.org; 20 Aug 2021 17:06:36 +0000 Received: from localhost ([127.0.0.1]:35467 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mH7yV-0001Ya-Tz for submit@debbugs.gnu.org; Fri, 20 Aug 2021 13:06:36 -0400 Received: from mail1453c50.megamailservers.eu ([91.136.14.53]:54042 helo=mail266c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mH7yS-0001YH-MU for 50067@debbugs.gnu.org; Fri, 20 Aug 2021 13:06:34 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1629479185; bh=wE53CSVU2M6T+n7mKvqwVSzSA1Z4X2uIRj6hvqvA8co=; h=From:Subject:Date:In-Reply-To:Cc:To:References:From; b=O1MjRJsO8rdxvC9bk+AZJvWVLYzOGQKSu/RHjKZ4zqFqdFCFjtaXXNWlzAIdbB7x0 OdEj/d6rMdWEags9XuFCGjZb/5Y/Whh+JXpUNMYpj7duTlcEzvwzfAtvYz7/4EpDFr wlajV3WGfm/MZlah/dfjNQ9PwqReKY3ZS/vxIVss= Feedback-ID: mattiase@acm.or Received: from [192.168.0.4] (c188-150-171-71.bredband.tele2.se [188.150.171.71]) (authenticated bits=0) by mail266c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 17KH6Li0023014; Fri, 20 Aug 2021 17:06:22 +0000 From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= Message-Id: <254C8F2C-423D-4DBE-9836-A92BD63827D7@acm.org> Content-Type: multipart/mixed; boundary="Apple-Mail=_C25ECE58-4080-4F19-9312-BF36DA51730B" Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.21\)) Subject: Re: bug#50067: Context menus Date: Fri, 20 Aug 2021 19:06:20 +0200 In-Reply-To: <87h7fkh8z8.fsf@mail.linkov.net> To: Juri Linkov References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@acm.org> <87v942pvcj.fsf@mail.linkov.net> <004A628A-99CC-4C62-8AE2-921C4C38D42A@acm.org> <87h7fkh8z8.fsf@mail.linkov.net> X-Mailer: Apple Mail (2.3445.104.21) X-CTCH-RefID: str=0001.0A742F1D.611FE111.006C, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=UeYvt5aN c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=M51BFTxLslgA:10 a=ucMQw-l_AAAA:8 a=TzWVU1kqNxKw69pBDi0A:9 a=CjuIK1q_8ugA:10 a=Fq6NDgnhy04kry1FW4EA:9 a=B2y7HmGcmWMA:10 a=xkTruGkd22MpkFU079mG:22 X-Origin-Country: SE X-Spam-Score: 1.4 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.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 the administrator of that system for details. Content preview: 20 aug. 2021 kl. 09.31 skrev Juri Linkov : > If the existing `xref-backend-identifier-at-point` can't be reused > by adding a new optional arg `click`, then a cleaner solution > would be to add `xref-backend-identifier-at-mouse` indeed. Content analysis details: (1.4 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.4 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-Debbugs-Envelope-To: 50067 Cc: Alan Third , Tak Kunihiro , tkk@misasa.okayama-u.ac.jp, Dmitry Gutov , Lars Ingebrigtsen , 50067@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --Apple-Mail=_C25ECE58-4080-4F19-9312-BF36DA51730B Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii 20 aug. 2021 kl. 09.31 skrev Juri Linkov : > If the existing `xref-backend-identifier-at-point` can't be reused > by adding a new optional arg `click`, then a cleaner solution > would be to add `xref-backend-identifier-at-mouse` indeed. `xref-backend-identifier-at-point` is a generic function implemented by = each backend; a new function appears cleaner. Suggested patch attached! More discoveries and questions: * If I start emacs -Q and enable context-menu-mode, right-clicking on an = identifier in an elisp buffer still doesn't produce the Find Definition = entry, presumably because xref hasn't been loaded. Shouldn't it be = arranged to be autoloaded somehow, which is how xref works when invoked = by keystrokes? * `xref-make-match` requires (contrary to its doc string) its LOCATION = argument to be of type `xref-file-location`, but some backends may only = be able to make an `xref-buffer-location`. Would anyone object to = changing the :location slot of `xref-match-item` to have type = `xref-location`? I don't see how it could hurt. --Apple-Mail=_C25ECE58-4080-4F19-9312-BF36DA51730B Content-Disposition: attachment; filename=0001-Add-Find-References-to-context-menu.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-Add-Find-References-to-context-menu.patch" Content-Transfer-Encoding: quoted-printable =46rom=208001c94088d1ee8418001e7fc1875f9cb2ec84f9=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20=3D?UTF-8?q?Mattias=3D20Engdeg=3DC3=3DA5rd?=3D=20= =0ADate:=20Fri,=2020=20Aug=202021=2018:19:43=20+0200=0A= Subject:=20[PATCH]=20Add=20"Find=20References"=20to=20context=20menu=0A=0A= The=20new=20entry=20appears=20next=20to=20"Find=20Definition"=20and=20= like=20it=20only=0Aappears=20when=20the=20context=20menu=20was=20invoked=20= on=20an=20identifier.=0A=0A*=20lisp/progmodes/prog-mode.el=20= (prog-context-menu):=20New=20menu=20entry.=0A*=20lisp/progmodes/xref.el=20= (xref-find-references-at-mouse):=20New=0Afunction,=20analogous=20to=20= `xref-find-definitions-at-mouse`.=0A---=0A=20lisp/progmodes/prog-mode.el=20= |=2015=20++++++++++++---=0A=20lisp/progmodes/xref.el=20=20=20=20=20=20|=20= 14=20++++++++++++++=0A=202=20files=20changed,=2026=20insertions(+),=203=20= deletions(-)=0A=0Adiff=20--git=20a/lisp/progmodes/prog-mode.el=20= b/lisp/progmodes/prog-mode.el=0Aindex=20a8b608b018..89e2eb54d6=20100644=0A= ---=20a/lisp/progmodes/prog-mode.el=0A+++=20= b/lisp/progmodes/prog-mode.el=0A@@=20-51,14=20+51,23=20@@=20= prog-context-menu=0A=20=20=20=20=20=20=20'(menu-item=20"Find=20= Definition"=20xref-find-definitions-at-mouse=0A=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20:visible=20(save-excursion=0A=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (mouse-set-point=20last-input-event)=0A-=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (xref-backend-identifier-at-point=20(xref-find-backend)))=0A-=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20:help=20"Find=20definition=20= of=20function=20or=20variable")=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (xref-backend-identifier-at-point=0A+=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (xref-find-backend)))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20:help=20"Find=20definition=20of=20identifier")=0A=20=20=20=20=20=20= =20'prog-separator)=0A+=20=20=20=20(define-key-after=20menu=20= [xref-find-ref]=0A+=20=20=20=20=20=20'(menu-item=20"Find=20References"=20= xref-find-references-at-mouse=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20:visible=20(save-excursion=0A+=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(mouse-set-point=20= last-input-event)=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20(xref-backend-identifier-at-point=0A+=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20(xref-find-backend)))=0A+=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20:help=20"Find=20references=20to=20identifier")=0A+=20=20= =20=20=20=20'xref-find-def)=0A=20=20=20=20=20(define-key-after=20menu=20= [xref-pop]=0A=20=20=20=20=20=20=20'(menu-item=20"Back=20Definition"=20= xref-pop-marker-stack=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20:visible=20(not=20(xref-marker-stack-empty-p))=0A=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20:help=20"Back=20to=20the=20= position=20of=20the=20last=20search")=0A-=20=20=20=20=20=20= 'xref-find-def))=0A+=20=20=20=20=20=20'xref-find-ref))=0A=20=20=20menu)=0A= =20=0A=20(defvar=20prog-mode-map=0Adiff=20--git=20= a/lisp/progmodes/xref.el=20b/lisp/progmodes/xref.el=0Aindex=20= b6ad485407..254d00e722=20100644=0A---=20a/lisp/progmodes/xref.el=0A+++=20= b/lisp/progmodes/xref.el=0A@@=20-1349,6=20+1349,20=20@@=20= xref-find-definitions-at-mouse=0A=20=20=20=20=20=20=20=20=20= (xref-find-definitions=20identifier)=0A=20=20=20=20=20=20=20(user-error=20= "No=20identifier=20here"))))=0A=20=0A+;;;###autoload=0A+(defun=20= xref-find-references-at-mouse=20(event)=0A+=20=20"Find=20references=20to=20= the=20identifier=20at=20or=20around=20mouse=20click.=0A+This=20command=20= is=20intended=20to=20be=20bound=20to=20a=20mouse=20event."=0A+=20=20= (interactive=20"e")=0A+=20=20(let=20((identifier=0A+=20=20=20=20=20=20=20= =20=20(save-excursion=0A+=20=20=20=20=20=20=20=20=20=20=20= (mouse-set-point=20event)=0A+=20=20=20=20=20=20=20=20=20=20=20= (xref-backend-identifier-at-point=20(xref-find-backend)))))=0A+=20=20=20=20= (if=20identifier=0A+=20=20=20=20=20=20=20=20(let=20= ((xref-prompt-for-identifier=20nil))=0A+=20=20=20=20=20=20=20=20=20=20= (xref-find-references=20identifier))=0A+=20=20=20=20=20=20(user-error=20= "No=20identifier=20here"))))=0A+=0A=20(declare-function=20= apropos-parse-pattern=20"apropos"=20(pattern))=0A=20=0A=20;;;###autoload=0A= --=20=0A2.21.1=20(Apple=20Git-122.3)=0A=0A= --Apple-Mail=_C25ECE58-4080-4F19-9312-BF36DA51730B-- From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 20 13:12:05 2021 Received: (at 50067) by debbugs.gnu.org; 20 Aug 2021 17:12:05 +0000 Received: from localhost ([127.0.0.1]:35475 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mH83o-0001gT-Ro for submit@debbugs.gnu.org; Fri, 20 Aug 2021 13:12:05 -0400 Received: from mail1460c50.megamailservers.eu ([91.136.14.60]:42910 helo=mail267c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mH83m-0001fr-Cx for 50067@debbugs.gnu.org; Fri, 20 Aug 2021 13:12:03 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1629479515; bh=7/KOiem9Ln6PfRKtaGLB+jbfibUqInZB2ZdI8Cl/djU=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=hCyHXaTVtgVpMhVm8BeTWL2sgdnQPB2kVyPmweSHR7evUOW2EA6J1t+hejgFUhwhU J/cnMfu2OH9/c9hjP58I3nDvC++j+FKahjI5XJvb2LzLLgBTHHDgDNtkDaLemNp0P0 0h64EdD5IfvpHJh/JLRHck1DzKT/19Bzl2DcOlkU= Feedback-ID: mattiase@acm.or Received: from [192.168.0.4] (c188-150-171-71.bredband.tele2.se [188.150.171.71]) (authenticated bits=0) by mail267c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 17KHBoCR011028; Fri, 20 Aug 2021 17:11:52 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.21\)) Subject: Re: bug#50067: Context menus From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: <87sfz4cb6r.fsf@mail.linkov.net> Date: Fri, 20 Aug 2021 19:11:50 +0200 Content-Transfer-Encoding: 7bit Message-Id: References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@acm.org> <87v942pvcj.fsf@mail.linkov.net> <83zgte3asy.fsf@gnu.org> <87mtpepqzw.fsf@mail.linkov.net> <83sfz639lh.fsf@gnu.org> <8735r6ppf0.fsf@mail.linkov.net> <83o89u37gh.fsf@gnu.org> <87wnohx5zd.fsf@mail.linkov.net> <831r6p3lzc.fsf@gnu.org> <87o89sh96g.fsf@mail.linkov.net> <054BA74B-AACE-483F-994E-5E8E49E093E5@acm.org> <83bl5s1j6a.fsf@gnu.org> <4D90962D-4FB3-45AB-BC3C-6E947FE297D0@acm.org> <87sfz4cb6r.fsf@mail.linkov.net> To: Juri Linkov X-Mailer: Apple Mail (2.3445.104.21) X-CTCH-RefID: str=0001.0A742F21.611FE25B.0030, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=S9SnP7kP c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=ucMQw-l_AAAA:8 a=x6cgACKAFSKzhOxs98EA:9 a=CjuIK1q_8ugA:10 a=L42WZ21l2ekA:10 a=xkTruGkd22MpkFU079mG:22 X-Origin-Country: SE X-Spam-Score: 1.4 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.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 the administrator of that system for details. Content preview: 20 aug. 2021 kl. 18.50 skrev Juri Linkov : > On emacs-devel Ergus proposed to add such bindings to a new > context-menu-mode-map. Do you think this is feasible? Quite possibly, but the proof is in the pudding. Content analysis details: (1.4 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.4 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-Debbugs-Envelope-To: 50067 Cc: alan@idiocy.org, homeros.misasa@gmail.com, tkk@misasa.okayama-u.ac.jp, larsi@gnus.org, 50067@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) 20 aug. 2021 kl. 18.50 skrev Juri Linkov : > On emacs-devel Ergus proposed to add such bindings to a new > context-menu-mode-map. Do you think this is feasible? Quite possibly, but the proof is in the pudding. From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 20 14:00:38 2021 Received: (at 50067) by debbugs.gnu.org; 20 Aug 2021 18:00:38 +0000 Received: from localhost ([127.0.0.1]:35519 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mH8oj-0002qj-1M for submit@debbugs.gnu.org; Fri, 20 Aug 2021 14:00:38 -0400 Received: from eggs.gnu.org ([209.51.188.92]:36546) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mH8og-0002qV-J6 for 50067@debbugs.gnu.org; Fri, 20 Aug 2021 14:00:31 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:39600) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mH8oU-00077f-Sw; Fri, 20 Aug 2021 14:00:20 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3964 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 1mH8oH-0000R5-Lk; Fri, 20 Aug 2021 14:00:16 -0400 Date: Fri, 20 Aug 2021 20:59:47 +0300 Message-Id: <83zgtcyp2k.fsf@gnu.org> From: Eli Zaretskii To: Juri Linkov In-Reply-To: <87mtpcf79p.fsf@mail.linkov.net> (message from Juri Linkov on Fri, 20 Aug 2021 19:36:58 +0300) Subject: Re: bug#50067: Context menus References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@acm.org> <87v942pvcj.fsf@mail.linkov.net> <83zgte3asy.fsf@gnu.org> <87mtpepqzw.fsf@mail.linkov.net> <83sfz639lh.fsf@gnu.org> <8735r6ppf0.fsf@mail.linkov.net> <83o89u37gh.fsf@gnu.org> <87wnohx5zd.fsf@mail.linkov.net> <831r6p3lzc.fsf@gnu.org> <87o89sh96g.fsf@mail.linkov.net> <837dgg1hdg.fsf@gnu.org> <87mtpcf79p.fsf@mail.linkov.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 50067 Cc: alan@idiocy.org, mattiase@acm.org, homeros.misasa@gmail.com, tkk@misasa.okayama-u.ac.jp, larsi@gnus.org, 50067@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Juri Linkov > Cc: mattiase@acm.org, 50067@debbugs.gnu.org, homeros.misasa@gmail.com, > tkk@misasa.okayama-u.ac.jp, larsi@gnus.org, alan@idiocy.org > Date: Fri, 20 Aug 2021 19:36:58 +0300 > > > OK, but I still don't think I fully understand how context menus are > > different. Are we sure the user will immediately understand the > > purpose of the context menus, but not of a buffer-menu? > > Context menus displayed up by down-mouse-3 are ubiquitous nowadays, > they are everywhere, and the users expect them without a title, > unlike Emacs-specific menus unfamiliar to most users. So if some menu is popped up by mouse-3, it is automatically considered ubiquitous and expected? I really doubt that, but I won't argue any further. > >> Using a text property would be a good solution. Should then > >> the NS-specific "Select" title be removed in menu.c > >> when the title has a special text property? > > > > I'm not sure I understand what is the NS-specific "Select" title. Can > > you point me to the relevant code? > > I meant such patch: OK, but where in that patch is the NS-specific "Select" title that should be removed? From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 20 15:30:04 2021 Received: (at 50067) by debbugs.gnu.org; 20 Aug 2021 19:30:04 +0000 Received: from localhost ([127.0.0.1]:35564 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mHADL-00077C-R3 for submit@debbugs.gnu.org; Fri, 20 Aug 2021 15:30:04 -0400 Received: from mail1454c50.megamailservers.eu ([91.136.14.54]:50054 helo=mail266c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mHADI-00076E-QK for 50067@debbugs.gnu.org; Fri, 20 Aug 2021 15:30:02 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1629487794; bh=H+HL4DoRe1T+1qx4VYWb4kwn+C778D3Tx+JfzDfkPhU=; h=From:Subject:Date:In-Reply-To:Cc:To:References:From; b=iQUJxmv1gMU3VeZhA3IZZKEU70y5CkZUWCOL5osOnNkNpAIDncJbZLHZOo5Dv2EI+ PEVk5iBc8NS0AgLB9RFZgxK1dTROMOY7dgJHkarOfv1RyaFoYToabgRkLNMQmdEeIz qmVrsmghOJ64LX/oleUaAN34VtczGIKCHEEmZkFM= Feedback-ID: mattiase@acm.or Received: from [192.168.0.4] (c188-150-171-71.bredband.tele2.se [188.150.171.71]) (authenticated bits=0) by mail266c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 17KJTmae030582; Fri, 20 Aug 2021 19:29:50 +0000 From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= Message-Id: Content-Type: multipart/mixed; boundary="Apple-Mail=_F4AA7B89-ECDE-4EBC-A0E0-C79E2F75AAED" Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.21\)) Subject: Re: bug#50067: Context menus Date: Fri, 20 Aug 2021 21:29:47 +0200 In-Reply-To: <83zgtcyp2k.fsf@gnu.org> To: Eli Zaretskii References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@acm.org> <87v942pvcj.fsf@mail.linkov.net> <83zgte3asy.fsf@gnu.org> <87mtpepqzw.fsf@mail.linkov.net> <83sfz639lh.fsf@gnu.org> <8735r6ppf0.fsf@mail.linkov.net> <83o89u37gh.fsf@gnu.org> <87wnohx5zd.fsf@mail.linkov.net> <831r6p3lzc.fsf@gnu.org> <87o89sh96g.fsf@mail.linkov.net> <837dgg1hdg.fsf@gnu.org> <87mtpcf79p.fsf@mail.linkov.net> <83zgtcyp2k.fsf@gnu.org> X-Mailer: Apple Mail (2.3445.104.21) X-CTCH-RefID: str=0001.0A742F26.612002B2.0006, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=UeYvt5aN c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=M51BFTxLslgA:10 a=mDV3o1hIAAAA:8 a=aTpjW4tw5_cClw_LVMkA:9 a=CjuIK1q_8ugA:10 a=JUOl0zTICBLu7D2qXPMA:9 a=B2y7HmGcmWMA:10 a=tclcd6dtLQvEqt9_mmAA:9 a=_FVE-zBwftR9WsbkzFJk:22 X-Origin-Country: SE X-Spam-Score: 1.4 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.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 the administrator of that system for details. Content preview: 20 aug. 2021 kl. 19.59 skrev Eli Zaretskii : > OK, but where in that patch is the NS-specific "Select" title that > should be removed? I'm not Juri, but the following patch removes the default "Select" title used by the NS port. Not sure why it was ever added -- perhaps something Gnustep-specific? Works well with Cocoa in any case. Content analysis details: (1.4 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.4 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-Debbugs-Envelope-To: 50067 Cc: alan@idiocy.org, Juri Linkov , homeros.misasa@gmail.com, tkk@misasa.okayama-u.ac.jp, larsi@gnus.org, 50067@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --Apple-Mail=_F4AA7B89-ECDE-4EBC-A0E0-C79E2F75AAED Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii 20 aug. 2021 kl. 19.59 skrev Eli Zaretskii : > OK, but where in that patch is the NS-specific "Select" title that > should be removed? I'm not Juri, but the following patch removes the default "Select" title = used by the NS port. Not sure why it was ever added -- perhaps something = Gnustep-specific? Works well with Cocoa in any case. --Apple-Mail=_F4AA7B89-ECDE-4EBC-A0E0-C79E2F75AAED Content-Disposition: attachment; filename=0001-Remove-default-Select-title-from-NS-popup-menus.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-Remove-default-Select-title-from-NS-popup-menus.patch" Content-Transfer-Encoding: quoted-printable =46rom=20d08bba26704cbe2cd8c655279d95cfed88ff29ba=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20=3D?UTF-8?q?Mattias=3D20Engdeg=3DC3=3DA5rd?=3D=20= =0ADate:=20Fri,=2020=20Aug=202021=2021:21:05=20+0200=0A= Subject:=20[PATCH]=20Remove=20default=20"Select"=20title=20from=20NS=20= popup=20menus=0A=0A*=20src/menu.c=20(x_popup_menu_1):=20Remove=20default=20= "Select"=20title.=0A*=20src/nsmenu.m=20(ns_menu_show):=20Allow=20title=20= to=20be=20absent.=0A---=0A=20src/menu.c=20=20=20|=204=20----=0A=20= src/nsmenu.m=20|=202=20+-=0A=202=20files=20changed,=201=20insertion(+),=20= 5=20deletions(-)=0A=0Adiff=20--git=20a/src/menu.c=20b/src/menu.c=0Aindex=20= 3b1d740257..e441d22ea0=20100644=0A---=20a/src/menu.c=0A+++=20= b/src/menu.c=0A@@=20-1286,10=20+1286,6=20@@=20x_popup_menu_1=20= (Lisp_Object=20position,=20Lisp_Object=20menu)=0A=20=20=20=20=20=20=20= prompt=20=3D=20Fkeymap_prompt=20(keymap);=0A=20=20=20=20=20=20=20if=20= (!NILP=20(prompt))=0A=20=09title=20=3D=20prompt;=0A-#ifdef=20HAVE_NS=09=09= /*=20Is=20that=20needed=20and=20NS-specific?=20=20--Stef=20=20*/=0A-=20=20= =20=20=20=20else=0A-=09title=20=3D=20build_string=20("Select");=0A= -#endif=0A=20=0A=20=20=20=20=20=20=20/*=20Make=20that=20be=20the=20pane=20= title=20of=20the=20first=20pane.=20=20*/=0A=20=20=20=20=20=20=20if=20= (!NILP=20(prompt)=20&&=20menu_items_n_panes=20>=3D=200)=0Adiff=20--git=20= a/src/nsmenu.m=20b/src/nsmenu.m=0Aindex=20bb0dd2634d..fe4f825832=20= 100644=0A---=20a/src/nsmenu.m=0A+++=20b/src/nsmenu.m=0A@@=20-959,7=20= +959,7=20@@=20-=20(void)menu:(NSMenu=20*)menu=20= willHighlightItem:(NSMenuItem=20*)item=0A=20=20=20=20=20}=0A=20=0A=20=20=20= pmenu=20=3D=20[[EmacsMenu=20alloc]=20initWithTitle:=0A-=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= [NSString=20stringWithLispString:=20title]];=0A+=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20NILP=20(title)=20?=20@""=20:=20[NSString=20= stringWithLispString:=20title]];=0A=20=20=20[pmenu=20= fillWithWidgetValue:=20first_wv->contents];=0A=20=20=20= free_menubar_widget_value_tree=20(first_wv);=0A=20=20=20unbind_to=20= (specpdl_count,=20Qnil);=0A--=20=0A2.21.1=20(Apple=20Git-122.3)=0A=0A= --Apple-Mail=_F4AA7B89-ECDE-4EBC-A0E0-C79E2F75AAED Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii --Apple-Mail=_F4AA7B89-ECDE-4EBC-A0E0-C79E2F75AAED-- From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 20 19:32:03 2021 Received: (at 50067) by debbugs.gnu.org; 20 Aug 2021 23:32:04 +0000 Received: from localhost ([127.0.0.1]:35677 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mHDzX-0004Lb-Kr for submit@debbugs.gnu.org; Fri, 20 Aug 2021 19:32:03 -0400 Received: from mail-wr1-f49.google.com ([209.85.221.49]:39426) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mHDzV-0004L5-JQ for 50067@debbugs.gnu.org; Fri, 20 Aug 2021 19:32:01 -0400 Received: by mail-wr1-f49.google.com with SMTP id z4so720843wrr.6 for <50067@debbugs.gnu.org>; Fri, 20 Aug 2021 16:32:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=UuL3tu3a6N8bd2HxF4WDFLutH7iLCB0Ub5gE08wcsuI=; b=Hcd5fD5pwJ6MTs4xW8nE4aED1hEgp9nINhlyJWXS+2S1sTHdhYwSrckuvABTjDR04e L7gIZ8A6reItomv/nhXYzkPhiATLutqEU56u+diHnIMrSDerCcuUeqVwaX7xVNAgb7wI Yjhdvmxg+GJMyt+pvQUy1vDtOJ1qXYqjsprEvloVD2hfozwwHTu3w/O9Ya7noLLZ/J15 GxvSemTUV3mVJZdJkzJTlzoWvcObO4dfMVk9k5mJ4k8s9EEcshWwJbvkq1hsRa+MGiDd /J7gKHSrBfVoibpev4lXQ9CdsN8N2IkLCeU8COfNaFcnfh88KVrtlUfA2CzQDNRxAw/O +HWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=UuL3tu3a6N8bd2HxF4WDFLutH7iLCB0Ub5gE08wcsuI=; b=RKrdLjt7Ji1pcI0dIoHibsoXQ0X80GlSUGfipv+AtQicXZAGxaQClNHF/k/zfHcB4R 3WBOjNagP3jnf7bNVVM20bOfDsMoGtFKm56AkQ0IoTrDgfy8BOF/couKwi050IOI7wLP E+QC76xs+yUdTzx2GfEsrEBc5ZjZYfxYEPNjVdZo+7xMKtwzhgJ8q0v6XEhMAjlRqruL t73iUK6TyInqwfppAKj8nwjdcjvZDgDmBYfeNATi23qjAQIvgComP6DmJ+vkTeURKz5M yHp+t2djX04lO4duASwbiDdKxKpmEOO2tNPrcryyk3P4z4UrWF5rKjJHL7exmXgDe7aH E9bw== X-Gm-Message-State: AOAM53023i0Z1XBpb9ezWMcQrtN8UFhBDt195EZ85YfAU3tEnl31Pa+W koJ6fpg8mGrtSBWCD+bwESg= X-Google-Smtp-Source: ABdhPJwz+tm4hP7ZMMKAeshFvFEX3qlumiMLo2mVMntO9KAKOu1XARGk06aFVYUFbvi9nHiCrM8SEg== X-Received: by 2002:a5d:4a8d:: with SMTP id o13mr1200075wrq.156.1629502315807; Fri, 20 Aug 2021 16:31:55 -0700 (PDT) Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id h126sm11947783wmh.1.2021.08.20.16.31.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 20 Aug 2021 16:31:55 -0700 (PDT) Subject: Re: bug#50067: Context menus To: =?UTF-8?Q?Mattias_Engdeg=c3=a5rd?= , Juri Linkov References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@acm.org> <87v942pvcj.fsf@mail.linkov.net> <004A628A-99CC-4C62-8AE2-921C4C38D42A@acm.org> <87h7fkh8z8.fsf@mail.linkov.net> <254C8F2C-423D-4DBE-9836-A92BD63827D7@acm.org> From: Dmitry Gutov Message-ID: <970df21b-c9ab-94fb-bfed-ab8df1fb82e6@yandex.ru> Date: Sat, 21 Aug 2021 02:31:53 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <254C8F2C-423D-4DBE-9836-A92BD63827D7@acm.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: 50067 Cc: tkk@misasa.okayama-u.ac.jp, Tak Kunihiro , 50067@debbugs.gnu.org, Lars Ingebrigtsen , Alan Third X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.6 (/) Hi Mattias! On 20.08.2021 20:06, Mattias Engdegrd wrote: > * If I start emacs -Q and enable context-menu-mode, right-clicking on an identifier in an elisp buffer still doesn't produce the Find Definition entry, presumably because xref hasn't been loaded. Shouldn't it be arranged to be autoloaded somehow, which is how xref works when invoked by keystrokes? I wonder what could be the reason for that. It would seem the menu should handle autoloaded commands fine. Even the visibility predicate should work: xref-find-backend is autoloaded as well. Try rewriting it with a let, to ensure that xref-find-backend is called first: (let ((backend (xref-find-backend))) (xref-backend-identifier-at-point backend)) > * `xref-make-match` requires (contrary to its doc string) its LOCATION argument to be of type `xref-file-location`, but some backends may only be able to make an `xref-buffer-location`. Would anyone object to changing the :location slot of `xref-match-item` to have type `xref-location`? I don't see how it could hurt. Makes sense to me, seems like an accident. I've done this change locally, no obvious bugs fell out. From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 21 00:44:15 2021 Received: (at 50067) by debbugs.gnu.org; 21 Aug 2021 04:44:15 +0000 Received: from localhost ([127.0.0.1]:35727 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mHIre-00037l-Nl for submit@debbugs.gnu.org; Sat, 21 Aug 2021 00:44:14 -0400 Received: from mx0b-00602c01.pphosted.com ([205.220.174.65]:15694) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mHIrc-00037b-H6 for 50067@debbugs.gnu.org; Sat, 21 Aug 2021 00:44:13 -0400 Received: from pps.filterd (m0238152.ppops.net [127.0.0.1]) by mx0a-00602c01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 17L0SvHf003467; Sat, 21 Aug 2021 13:44:00 +0900 Received: from mlsec.cc.okayama-u.ac.jp (mlsec.cc.okayama-u.ac.jp [150.46.12.254]) by mx0a-00602c01.pphosted.com with ESMTP id 3ajfv18fbp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 21 Aug 2021 13:43:59 +0900 Received: from jlsv301.okayama-u.ac.jp (unknown [150.46.12.5]) by mlsec.cc.okayama-u.ac.jp with smtp id 0969_24e9_8457054b_472a_4eba_959e_a0cc623c7693; Sat, 21 Aug 2021 13:43:53 +0900 Received: from smtpclient.apple (unknown [172.24.1.212]) by jlsv301.okayama-u.ac.jp (Postfix) with ESMTPSA id 6B32E7604A1; Sat, 21 Aug 2021 13:43:53 +0900 (JST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Subject: Re: bug#50067: Context menus From: Tak Kunihiro In-Reply-To: <87h7fkh8z8.fsf@mail.linkov.net> Date: Sat, 21 Aug 2021 13:43:53 +0900 Content-Transfer-Encoding: quoted-printable Message-Id: <060413B6-E0EF-491D-986F-3988C255729F@misasa.okayama-u.ac.jp> References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@acm.org> <87v942pvcj.fsf@mail.linkov.net> <004A628A-99CC-4C62-8AE2-921C4C38D42A@acm.org> <87h7fkh8z8.fsf@mail.linkov.net> To: Juri Linkov X-Mailer: Apple Mail (2.3654.120.0.1.13) X-NAI-Spam-Flag: NO X-NAI-Spam-Level: X-NAI-Spam-Threshold: 11 X-NAI-Spam-Score: 0.1 X-NAI-Spam-Rules: 5 Rules triggered GME_TWTRE=0.1, EDT_SA_AU_PASS=0, EDT_SA_DN_PASS=0, EDT_SA_TS_PASS=0, RV6962=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6962> : inlines <7226> : streams <1899423> : uri <3309156> X-Proofpoint-GUID: nzuWp7V7D5spGkr30uYOM5e9sOg9cO-0 X-Proofpoint-ORIG-GUID: nzuWp7V7D5spGkr30uYOM5e9sOg9cO-0 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10082 signatures=668682 X-Proofpoint-Spam-Details: rule=outbound_spam_notspam policy=outbound_spam score=0 bulkscore=0 phishscore=0 mlxscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxlogscore=999 impostorscore=0 suspectscore=0 malwarescore=0 adultscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2107140000 definitions=main-2108210026 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 50067 Cc: Alan Third , =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= , Tak Kunihiro , =?utf-8?B?5Zu95bqD5Y2T5Lmf?= , Lars Ingebrigtsen , 50067@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) I=E2=80=99m new to 28 and it will take a while to adopt to it. I=E2=80=99m sending comments so far. * Binding I suggest to assign [drag-mouse-3] as well, as shown below. (define-key map [mouse-3] context-menu-entry) (define-key map [drag-mouse-3] context-menu-entry) =20 On Mac, I suggest to assign [C-double-mouse-1] as well as shown below. (define-key map [C-down-mouse-1] #'ignore) (define-key map [C-mouse-1] context-menu-entry) (define-key map [C-double-mouse-1] context-menu-entry) (define-key map [C-triple-mouse-1] context-menu-entry) (define-key map [C-drag-mouse-1] context-menu-entry) * Error detection system It is good if the context-menu system is ready for an error that occurs on one of context-menu-functions. For now, when there is error, Emacs only tells ` is undefined'. * Long click system It=E2=80=99s time to discuss long-left-click also as trigger to show context menu. https://lists.gnu.org/archive/html/emacs-devel/2017-11/msg00267.html https://lists.gnu.org/archive/html/emacs-devel/2020-09/msg01277.html * Open by other frame File would be opened by this window. Sometimes I want to open it by other frame. It is good if which window to open, is selectable after showing context-menu. I do not know how to do so. * Details It is handy to have buffer menu when right click mode bar. (define-key map [remap buffer-menu-open] context-menu-entry) Also it is handy to have frame menu when right click title bar. I do not know how to do so. Also it is nice to show word candidates by ispell when click a word. From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 21 02:33:48 2021 Received: (at 50067) by debbugs.gnu.org; 21 Aug 2021 06:33:48 +0000 Received: from localhost ([127.0.0.1]:35771 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mHKZg-0005sa-IM for submit@debbugs.gnu.org; Sat, 21 Aug 2021 02:33:48 -0400 Received: from mail-pf1-f174.google.com ([209.85.210.174]:46617) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mHKZf-0005sN-2W for 50067@debbugs.gnu.org; Sat, 21 Aug 2021 02:33:47 -0400 Received: by mail-pf1-f174.google.com with SMTP id y11so10546091pfl.13 for <50067@debbugs.gnu.org>; Fri, 20 Aug 2021 23:33:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=pVmYReLNIYVnRYPWyFdzGrW2WcwGz5dylzRsQ6eAJ1E=; b=p/LS4PgdY2ZbmBgJml40q3Cgrw8RUcIsvLXBc475dSkZgQtWyXAsEZfEaurmmCoNGd /OoVnolSLzl+w4azs2D53CVxPGa+xiTZesKAmMU77UlVZq/sO+Z4bFPji4+/yNe4QmQt xaHytfxsKm+A27mTT3QwiKP+gCltroNz4WFJP2ghnmCd647NJEFA3dDUHmOilvvBlb0j at6bMLOzmSYPQoz3xSJXiIYvEF6cuzFpldv5ysSVK/0mzPIPq579rKeoESfbh9w7noFX AlwzFDcK7bL2C952ImbE/YzUfwpPGoPO7hGF2yp46uiV2GAyg94XhhXxJywBxmrKaWYP IOYQ== 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:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=pVmYReLNIYVnRYPWyFdzGrW2WcwGz5dylzRsQ6eAJ1E=; b=HYjhG04xxIvWjCfn2qJCxqok8Z7xZ5E2kwdSYBAE5403ENFCoLKrnqHMzKEx5oV0im kvI5I+Vn7ri2vY6kphK04VspCj0HTU7mb+CU2XJBED02O4xLOEuEd6kTkOPVlwMFjMwB 89Rm+wus0/P/SN2qFyg3KXItpBnAm4wWhBP5Fas0PCdASD1GDBkPddEH+vZmjh8xsGo8 oKK/Ecp5S8LwGD9F4tQdBrhAgPDbtOxYrCy/DbJ/DXxFlx8IF4KuF4TBcwGCVTFOeDRB a/+xFJGtYUxjphaox6XGKqRY1ar4f/z5UeGWqMMptFTW40/f/47kEgUrw94oms9/2Bfy DCnw== X-Gm-Message-State: AOAM531/ZjzZ8bWPcjPCssAJZ2JWIIlU+ScInEANGafTUGpcswV9Vpr8 6R9OPkTf//R2/1Br7yY/v+U= X-Google-Smtp-Source: ABdhPJzwa/krkZ5XIsk1LW3FFNQarMCsXEnR9FkqC6mO1Snsk2b/MnCjDxG+uPr+64ocqKhDwog1YA== X-Received: by 2002:a63:db4a:: with SMTP id x10mr8402320pgi.30.1629527621220; Fri, 20 Aug 2021 23:33:41 -0700 (PDT) Received: from thinkless2017 (vesta.misasa.okayama-u.ac.jp. [150.46.48.154]) by smtp.gmail.com with ESMTPSA id j13sm10203161pgp.29.2021.08.20.23.33.38 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 20 Aug 2021 23:33:40 -0700 (PDT) From: Tak Kunihiro X-Google-Original-From: Tak Kunihiro To: Juri Linkov Subject: Re: bug#50067: Context menus References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@acm.org> <87v942pvcj.fsf@mail.linkov.net> <004A628A-99CC-4C62-8AE2-921C4C38D42A@acm.org> <87h7fkh8z8.fsf@mail.linkov.net> <060413B6-E0EF-491D-986F-3988C255729F@misasa.okayama-u.ac.jp> Date: Sat, 21 Aug 2021 15:33:36 +0900 In-Reply-To: <060413B6-E0EF-491D-986F-3988C255729F@misasa.okayama-u.ac.jp> (Tak Kunihiro's message of "Sat, 21 Aug 2021 13:43:53 +0900") Message-ID: <86eeane27z.fsf@misasa.okayama-u.ac.jp> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (windows-nt) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 50067 Cc: Alan Third , Mattias =?utf-8?Q?Engdeg=C3=A5rd?= , Tak Kunihiro , tkk@misasa.okayama-u.ac.jp, Lars Ingebrigtsen , 50067@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) ** context-menu-region All commands belong to `Edit' in menu bar. I think `context-menu-edit' sounds better. Isn't it better to use `menu-bar-edit-menu' as a source rather than create a menu from scratch? On paste when there is a region and delete-selection-mode is t, the region should be replaced by the text. ** no multiple horizontal lines Sometimes I see double lines on the context menu. I think that there is no useful case to have double lines. To allow only one horizontal line would look cool. ** reuse existing menu I cannot figure out how to include pre-existing menu such for (mouse-buffer-menu-map). To lean how to manipulate menu is not easy. It's nice to have an example something like below (does not work). (defun context-menu-buffer (menu) "Add a buffer menu entry to MENU." (let ((map (mouse-buffer-menu-map))) (define-key-after menu [buffer] map)) menu) From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 21 05:43:04 2021 Received: (at 50067) by debbugs.gnu.org; 21 Aug 2021 09:43:04 +0000 Received: from localhost ([127.0.0.1]:35857 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mHNWm-0001ze-IL for submit@debbugs.gnu.org; Sat, 21 Aug 2021 05:43:04 -0400 Received: from outbound.soverin.net ([116.202.126.228]:38211) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mHNWh-0001z1-Ck for 50067@debbugs.gnu.org; Sat, 21 Aug 2021 05:42:59 -0400 Received: from smtp.soverin.net (unknown [10.10.3.24]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by outbound.soverin.net (Postfix) with ESMTPS id 55BD1272; Sat, 21 Aug 2021 09:42:49 +0000 (UTC) Received: from smtp.soverin.net (smtp.soverin.net [159.69.232.138]) by soverin.net DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=idiocy.org; s=soverin; t=1629538967; bh=INnfDYhuFbnA9ra1r+ayc+E+CTuA6HiGbSuEj7lvsug=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=hpOp4UrNK47jIfewCBtF1vJ4ra5K0uQzRe/f71sjJMn+fjQTRbVB6w2dNtr4EbmVj U68KEZ3o2KkIR3nMs66vV9hsbYz1wfETh37DJvngrpBgqJdVD2/JSqraxVdnosZO9m oez0pFEiuc/gImY9XfA4iWHRUeU2hm4VnTRjpjLVyVhVMtYQ8+XnOVOxaWPFAPiMcv N/SK+89ZQKHEH9U5RjQPJW0pZS1BjS6PkdIjakp5yfKGOk72+m+GOm7QclF1CS9Twa MYxYRaGxPlyciHSmqyqRSIBFKovMdt/LiB3Tg0QL5IQ/CQZ4nTNay6suRcOoxYieo6 +zZgQtS5PWQsg== Received: from alan by faroe.holly.idiocy.org with local (Exim 4.94.2) (envelope-from ) id 1mHNWW-000hDe-7z; Sat, 21 Aug 2021 10:42:44 +0100 Date: Sat, 21 Aug 2021 10:42:44 +0100 From: Alan Third To: Mattias =?iso-8859-1?Q?Engdeg=E5rd?= Subject: Re: bug#50067: Context menus Message-ID: Mail-Followup-To: Alan Third , Mattias =?iso-8859-1?Q?Engdeg=E5rd?= , Eli Zaretskii , Juri Linkov , 50067@debbugs.gnu.org, homeros.misasa@gmail.com, tkk@misasa.okayama-u.ac.jp, larsi@gnus.org References: <83sfz639lh.fsf@gnu.org> <8735r6ppf0.fsf@mail.linkov.net> <83o89u37gh.fsf@gnu.org> <87wnohx5zd.fsf@mail.linkov.net> <831r6p3lzc.fsf@gnu.org> <87o89sh96g.fsf@mail.linkov.net> <837dgg1hdg.fsf@gnu.org> <87mtpcf79p.fsf@mail.linkov.net> <83zgtcyp2k.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 50067 Cc: Juri Linkov , homeros.misasa@gmail.com, tkk@misasa.okayama-u.ac.jp, larsi@gnus.org, 50067@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On Fri, Aug 20, 2021 at 09:29:47PM +0200, Mattias Engdegrd wrote: > 20 aug. 2021 kl. 19.59 skrev Eli Zaretskii : > > > OK, but where in that patch is the NS-specific "Select" title that > > should be removed? > > I'm not Juri, but the following patch removes the default "Select" > title used by the NS port. Not sure why it was ever added -- perhaps > something Gnustep-specific? Works well with Cocoa in any case. GNUstep, and I believe NEXTstep and old school macOS, allows you to "tear off" menus and leave them on screen as sort of custom toolbars. Hence the title on each menu. Emacs doesn't support this with the main menus (it was the source of a crash, so I removed it), but I don't know if it's something we should support. I suspect not because once Emacs updates the menus it probably can't handle clicks on old ones. -- Alan Third From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 21 06:57:41 2021 Received: (at 50067) by debbugs.gnu.org; 21 Aug 2021 10:57:42 +0000 Received: from localhost ([127.0.0.1]:35901 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mHOgz-0003um-NW for submit@debbugs.gnu.org; Sat, 21 Aug 2021 06:57:41 -0400 Received: from mail202c50.megamailservers.eu ([91.136.10.212]:49814 helo=mail193c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mHOgt-0003uY-2a for 50067@debbugs.gnu.org; Sat, 21 Aug 2021 06:57:35 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1629543448; bh=Sx5FHpeyjrTmCR6Kp3RamaYgo6GPZ2UIvE1Owlv6hB0=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=MbWWLbQGnEJeA9KRq76VwXHqvu9B4iSKo70kMcoavIsxTcVwqjZOURLdexz8IqB0E 9Rfz83g54mcZ0BEgx52wWwsQtrGzeaZVzRuX9eV9Z8XjcJCy1lMLOTEjxla/4tW9yb cougcajLJxyZ+pNMU3yrX4B/2zJc+BP5Z7ZEiLkU= Feedback-ID: mattiase@acm.or Received: from [192.168.0.4] (c188-150-171-71.bredband.tele2.se [188.150.171.71]) (authenticated bits=0) by mail193c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 17LAvNZA026257; Sat, 21 Aug 2021 10:57:25 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.21\)) Subject: Re: bug#50067: Context menus From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: Date: Sat, 21 Aug 2021 12:57:23 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <56454B2B-0250-4BC6-BC26-E1C5579ACF49@acm.org> References: <83sfz639lh.fsf@gnu.org> <8735r6ppf0.fsf@mail.linkov.net> <83o89u37gh.fsf@gnu.org> <87wnohx5zd.fsf@mail.linkov.net> <831r6p3lzc.fsf@gnu.org> <87o89sh96g.fsf@mail.linkov.net> <837dgg1hdg.fsf@gnu.org> <87mtpcf79p.fsf@mail.linkov.net> <83zgtcyp2k.fsf@gnu.org> To: Alan Third X-Mailer: Apple Mail (2.3445.104.21) X-CTCH-RefID: str=0001.0A742F1B.6120DC18.001E, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=GJV27dFK c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=hIj89exaAAAA:8 a=vaJtXVxTAAAA:8 a=SlV3f15FWa3tu2RXqD0A:9 a=CjuIK1q_8ugA:10 a=lS9wXHQM5UdnNJ4u63Ry:22 X-Origin-Country: SE X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 50067 Cc: Juri Linkov , Tak Kunihiro , tkk@misasa.okayama-u.ac.jp, Lars Ingebrigtsen , 50067@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) (Reply to multiple messages) 21 aug. 2021 kl. 11.42 skrev Alan Third : > GNUstep, and I believe NEXTstep and old school macOS, allows you to > "tear off" menus and leave them on screen as sort of custom toolbars. > Hence the title on each menu. >=20 > Emacs doesn't support this with the main menus (it was the source of a > crash, so I removed it), but I don't know if it's something we should > support. I suspect not because once Emacs updates the menus it > probably can't handle clicks on old ones. Thank you, I pushed the removal of the default "Select" title: titles = will still be there if given explicitly. If this causes trouble for = Gnustep, then we'll reinsert the default title for that platform only. 21 aug. 2021 kl. 01.31 skrev Dmitry Gutov : >> * If I start emacs -Q and enable context-menu-mode, right-clicking on = an identifier in an elisp buffer still doesn't produce the Find = Definition entry, presumably because xref hasn't been loaded. Shouldn't = it be arranged to be autoloaded somehow, which is how xref works when = invoked by keystrokes? >=20 > I wonder what could be the reason for that. It would seem the menu = should handle autoloaded commands fine. Even the visibility predicate = should work: xref-find-backend is autoloaded as well. It was just a (featurep 'xref) test which didn't seem to be needed; as = you say, all the functions involved are autoloaded and I have verified = that xref will indeed be loaded when the menu is used the first time. = Pushed to master. >> * `xref-make-match` requires (contrary to its doc string) its = LOCATION argument to be of type `xref-file-location`, but some backends = may only be able to make an `xref-buffer-location`. Would anyone object = to changing the :location slot of `xref-match-item` to have type = `xref-location`? I don't see how it could hurt. >=20 > Makes sense to me, seems like an accident. I've done this change = locally, no obvious bugs fell out. Thank you, fixed on master. Also pushed: * Previous patch that adds "Find References" to the menu; it seemed to = be the right thing to do. * A fringe arrow is now used to indicate the current position in the = *xref* buffer * Messages added to assuage the boredom of users while searching for = references. Could be moved, rephrased, made optional or removed = altogether, but it did look a lot better than freezing for a long time. From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 21 07:17:39 2021 Received: (at 50067) by debbugs.gnu.org; 21 Aug 2021 11:17:39 +0000 Received: from localhost ([127.0.0.1]:35924 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mHP0I-0004Qe-UO for submit@debbugs.gnu.org; Sat, 21 Aug 2021 07:17:39 -0400 Received: from eggs.gnu.org ([209.51.188.92]:58170) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mHP0H-0004QR-AS for 50067@debbugs.gnu.org; Sat, 21 Aug 2021 07:17:34 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:42632) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mHP06-0002pB-1L; Sat, 21 Aug 2021 07:17:22 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4207 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 1mHP05-0005E7-KM; Sat, 21 Aug 2021 07:17:21 -0400 Date: Sat, 21 Aug 2021 14:17:06 +0300 Message-Id: <83eeanyrm5.fsf@gnu.org> From: Eli Zaretskii To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= In-Reply-To: <56454B2B-0250-4BC6-BC26-E1C5579ACF49@acm.org> (message from Mattias =?utf-8?Q?Engdeg=C3=A5rd?= on Sat, 21 Aug 2021 12:57:23 +0200) Subject: Re: bug#50067: Context menus References: <83sfz639lh.fsf@gnu.org> <8735r6ppf0.fsf@mail.linkov.net> <83o89u37gh.fsf@gnu.org> <87wnohx5zd.fsf@mail.linkov.net> <831r6p3lzc.fsf@gnu.org> <87o89sh96g.fsf@mail.linkov.net> <837dgg1hdg.fsf@gnu.org> <87mtpcf79p.fsf@mail.linkov.net> <83zgtcyp2k.fsf@gnu.org> <56454B2B-0250-4BC6-BC26-E1C5579ACF49@acm.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 50067 Cc: alan@idiocy.org, juri@linkov.net, homeros.misasa@gmail.com, tkk@misasa.okayama-u.ac.jp, larsi@gnus.org, 50067@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > From: Mattias Engdegård > Date: Sat, 21 Aug 2021 12:57:23 +0200 > Cc: Eli Zaretskii , Juri Linkov , > 50067@debbugs.gnu.org, Tak Kunihiro , > tkk@misasa.okayama-u.ac.jp, Lars Ingebrigtsen > > (Reply to multiple messages) > > * A fringe arrow is now used to indicate the current position in the *xref* buffer I think it may be confusing that the arrow doesn't appear immediately after M-., only when you switch from the XREF buffer. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 21 07:45:30 2021 Received: (at 50067) by debbugs.gnu.org; 21 Aug 2021 11:45:30 +0000 Received: from localhost ([127.0.0.1]:35934 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mHPRG-0007JX-4W for submit@debbugs.gnu.org; Sat, 21 Aug 2021 07:45:30 -0400 Received: from mail1449c50.megamailservers.eu ([91.136.14.49]:59080 helo=mail265c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mHPRA-0007J8-MO for 50067@debbugs.gnu.org; Sat, 21 Aug 2021 07:45:25 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1629546313; bh=Tnc8mjbekW2VF75yVpeMiQ3OUqUSNtwUDv8DUZ4nvMc=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=l7mtNWzQZ+IvZJMTofAayrSDSY8cfo7dJyXp3S/sKuW4vw7h7kdQ5PR4mWh/NF5zT zZkh7GHFppVW01rbRHdvwQn8C1GlRhDx+w9ch4UzYJUNWUTffeFKHmT7aOuhXjH9s5 jA3O0hSvo+KDJxNVja9U1MPmmIwGiW7asJ5ogvtg= Feedback-ID: mattiase@acm.or Received: from [192.168.0.4] (c188-150-171-71.bredband.tele2.se [188.150.171.71]) (authenticated bits=0) by mail265c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 17LBj8xd031513; Sat, 21 Aug 2021 11:45:10 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.21\)) Subject: Re: bug#50067: Context menus From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: <83eeanyrm5.fsf@gnu.org> Date: Sat, 21 Aug 2021 13:45:08 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <4BC1074D-DE75-4303-8385-B70BAACFCDA0@acm.org> References: <83sfz639lh.fsf@gnu.org> <8735r6ppf0.fsf@mail.linkov.net> <83o89u37gh.fsf@gnu.org> <87wnohx5zd.fsf@mail.linkov.net> <831r6p3lzc.fsf@gnu.org> <87o89sh96g.fsf@mail.linkov.net> <837dgg1hdg.fsf@gnu.org> <87mtpcf79p.fsf@mail.linkov.net> <83zgtcyp2k.fsf@gnu.org> <56454B2B-0250-4BC6-BC26-E1C5579ACF49@acm.org> <83eeanyrm5.fsf@gnu.org> To: Eli Zaretskii X-Mailer: Apple Mail (2.3445.104.21) X-CTCH-RefID: str=0001.0A742F24.6120E749.0009, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=K5pc4BeI c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=mDV3o1hIAAAA:8 a=_IId-rHdyO6W3HKXrF8A:9 a=CjuIK1q_8ugA:10 a=_FVE-zBwftR9WsbkzFJk:22 X-Origin-Country: SE X-Spam-Score: 1.4 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.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 the administrator of that system for details. Content preview: 21 aug. 2021 kl. 13.17 skrev Eli Zaretskii : > I think it may be confusing that the arrow doesn't appear immediately > after M-., only when you switch from the XREF buffer. I don't quite follow -- M-. typically doesn't create an *xref* buffer at all; when it does, it does not follow any of the matches found therein. Content analysis details: (1.4 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.4 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-Debbugs-Envelope-To: 50067 Cc: alan@idiocy.org, juri@linkov.net, homeros.misasa@gmail.com, tkk@misasa.okayama-u.ac.jp, larsi@gnus.org, 50067@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) 21 aug. 2021 kl. 13.17 skrev Eli Zaretskii : > I think it may be confusing that the arrow doesn't appear immediately > after M-., only when you switch from the XREF buffer. I don't quite follow -- M-. typically doesn't create an *xref* buffer at = all; when it does, it does not follow any of the matches found therein. The arrow indicates the latest match reference that has been followed to = its target, in the same way as in compile, grep and occur buffers. In = neither of these buffers the arrow appears immediately. From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 21 08:17:37 2021 Received: (at 50067) by debbugs.gnu.org; 21 Aug 2021 12:17:37 +0000 Received: from localhost ([127.0.0.1]:35966 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mHPwK-0008As-0K for submit@debbugs.gnu.org; Sat, 21 Aug 2021 08:17:37 -0400 Received: from eggs.gnu.org ([209.51.188.92]:36292) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mHPwE-0008Ab-U3 for 50067@debbugs.gnu.org; Sat, 21 Aug 2021 08:17:30 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:43648) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mHPw3-0001bf-Bt; Sat, 21 Aug 2021 08:17:15 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3914 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 1mHPw2-0005qe-R3; Sat, 21 Aug 2021 08:17:15 -0400 Date: Sat, 21 Aug 2021 15:16:59 +0300 Message-Id: <83czq7youc.fsf@gnu.org> From: Eli Zaretskii To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= In-Reply-To: <4BC1074D-DE75-4303-8385-B70BAACFCDA0@acm.org> (message from Mattias =?utf-8?Q?Engdeg=C3=A5rd?= on Sat, 21 Aug 2021 13:45:08 +0200) Subject: Re: bug#50067: Context menus References: <83sfz639lh.fsf@gnu.org> <8735r6ppf0.fsf@mail.linkov.net> <83o89u37gh.fsf@gnu.org> <87wnohx5zd.fsf@mail.linkov.net> <831r6p3lzc.fsf@gnu.org> <87o89sh96g.fsf@mail.linkov.net> <837dgg1hdg.fsf@gnu.org> <87mtpcf79p.fsf@mail.linkov.net> <83zgtcyp2k.fsf@gnu.org> <56454B2B-0250-4BC6-BC26-E1C5579ACF49@acm.org> <83eeanyrm5.fsf@gnu.org> <4BC1074D-DE75-4303-8385-B70BAACFCDA0@acm.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 50067 Cc: alan@idiocy.org, juri@linkov.net, homeros.misasa@gmail.com, tkk@misasa.okayama-u.ac.jp, larsi@gnus.org, 50067@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > From: Mattias Engdegård > Date: Sat, 21 Aug 2021 13:45:08 +0200 > Cc: alan@idiocy.org, juri@linkov.net, 50067@debbugs.gnu.org, > homeros.misasa@gmail.com, tkk@misasa.okayama-u.ac.jp, larsi@gnus.org > > 21 aug. 2021 kl. 13.17 skrev Eli Zaretskii : > > > I think it may be confusing that the arrow doesn't appear immediately > > after M-., only when you switch from the XREF buffer. > > I don't quite follow -- M-. typically doesn't create an *xref* buffer at all; when it does, it does not follow any of the matches found therein. Oh, so it's only appearing when the tag is shown? Confusing... but I guess we will have to live with that. > The arrow indicates the latest match reference that has been followed to its target, in the same way as in compile, grep and occur buffers. In neither of these buffers the arrow appears immediately. Got it. From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 22 04:39:38 2021 Received: (at 50067) by debbugs.gnu.org; 22 Aug 2021 08:39:38 +0000 Received: from localhost ([127.0.0.1]:38160 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mHj10-0000Pf-5f for submit@debbugs.gnu.org; Sun, 22 Aug 2021 04:39:38 -0400 Received: from relay9-d.mail.gandi.net ([217.70.183.199]:60219) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mHj0y-0000PS-FH for 50067@debbugs.gnu.org; Sun, 22 Aug 2021 04:39:37 -0400 Received: (Authenticated sender: juri@linkov.net) by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id 586BEFF804; Sun, 22 Aug 2021 08:39:25 +0000 (UTC) From: Juri Linkov To: Tak Kunihiro Subject: Re: bug#50067: Context menus Organization: LINKOV.NET References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@acm.org> <87v942pvcj.fsf@mail.linkov.net> <004A628A-99CC-4C62-8AE2-921C4C38D42A@acm.org> <87h7fkh8z8.fsf@mail.linkov.net> <060413B6-E0EF-491D-986F-3988C255729F@misasa.okayama-u.ac.jp> Date: Sun, 22 Aug 2021 11:28:02 +0300 In-Reply-To: <060413B6-E0EF-491D-986F-3988C255729F@misasa.okayama-u.ac.jp> (Tak Kunihiro's message of "Sat, 21 Aug 2021 13:43:53 +0900") Message-ID: <87lf4tews5.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 50067 Cc: Mattias =?iso-8859-1?Q?Engdeg=E5rd?= , Tak Kunihiro , 50067@debbugs.gnu.org, Lars Ingebrigtsen , Alan Third X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > I’m new to 28 and it will take a while to adopt to it. > I’m sending comments so far. Thanks for the comments. > * Binding > > I suggest to assign [drag-mouse-3] as well, as shown below. > > (define-key map [mouse-3] context-menu-entry) > (define-key map [drag-mouse-3] context-menu-entry) There is no need to bind [drag-mouse-3] because [down-mouse-3] is bound. > On Mac, I suggest to assign [C-double-mouse-1] as well as shown below. > > (define-key map [C-down-mouse-1] #'ignore) > (define-key map [C-mouse-1] context-menu-entry) > (define-key map [C-double-mouse-1] context-menu-entry) > (define-key map [C-triple-mouse-1] context-menu-entry) > (define-key map [C-drag-mouse-1] context-menu-entry) I leave this for the users of Mac to decide what would be better on Mac. > * Error detection system > > It is good if the context-menu system is ready for > an error that occurs on one of context-menu-functions. > For now, when there is error, Emacs only tells > ` is undefined'. I agree, a better error reporting would be nice. Patches welcome. > * Long click system > > It’s time to discuss long-left-click also as trigger to > show context menu. > > https://lists.gnu.org/archive/html/emacs-devel/2017-11/msg00267.html > https://lists.gnu.org/archive/html/emacs-devel/2020-09/msg01277.html I tried to implement this, but soon found that long-left-click is unusable, because such artificial delay is a hassle - no one would have patience to wait even half a second until the menu finally appears. But this could be implemented anyway when users will demand this. > * Open by other frame > > File would be opened by this window. Sometimes I want to open it by > other frame. It is good if which window to open, is selectable after > showing context-menu. I do not know how to do so. Sorry, I don't understand what menu do you mean, maybe in Dired mode? > * Details > > It is handy to have buffer menu when right click mode bar. I don't see where buffer-menu-open currently is used on the mode-line. > (define-key map [remap buffer-menu-open] context-menu-entry) This gives the error "void-variable map". > Also it is handy to have frame menu when right click title bar. I think this is a good idea. > I do not know how to do so. I do not know how to do this for the frame title bar. But currently I'm doing this for the tab bar. > Also it is nice to show word candidates by ispell when click a word. Maybe like flyspell-mode? > ** context-menu-region > > All commands belong to `Edit' in menu bar. > I think `context-menu-edit' sounds better. I already tried to use your idea to name it `context-menu-edit'. But the problem is that other functions like context-menu-undo are also related to editing. OTOH, some items in context-menu-region don't do editing such as "Select All" is not editing, "Copy" is not editing, etc. > Isn't it better to use `menu-bar-edit-menu' as a source rather than > create a menu from scratch? I already tried this idea but this menu is already available in the global menu that already can be enabled by adding context-menu-global to context-menu-functions. But maybe `context-menu-edit' could be added as well from `menu-bar-edit-menu'. > On paste when there is a region and delete-selection-mode is t, the > region should be replaced by the text. Please explain how the region should be replaced by the text, when mouse-yank-at-click or mouse-yank-primary is used to paste where the mouse is clicked. Should it delete the region and paste where mouse is clicked on another part of the buffer? What if the mouse is clicked in another window? > ** no multiple horizontal lines > > Sometimes I see double lines on the context menu. I think that there is > no useful case to have double lines. To allow only one horizontal line > would look cool. Right, double separators should be removed. > ** reuse existing menu > > I cannot figure out how to include pre-existing menu such for > (mouse-buffer-menu-map). To lean how to manipulate menu is not easy. > It's nice to have an example something like below (does not work). > > (defun context-menu-buffer (menu) > "Add a buffer menu entry to MENU." > (let ((map (mouse-buffer-menu-map))) > (define-key-after menu [buffer] map)) > menu) Adding the existing menu is not easy. There are some examples in context-menu-global, context-menu-local, context-menu-minor. From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 22 04:47:23 2021 Received: (at 50067) by debbugs.gnu.org; 22 Aug 2021 08:47:23 +0000 Received: from localhost ([127.0.0.1]:38167 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mHj8V-0000ba-4n for submit@debbugs.gnu.org; Sun, 22 Aug 2021 04:47:23 -0400 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:52165) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mHj8T-0000bM-PX for 50067@debbugs.gnu.org; Sun, 22 Aug 2021 04:47:22 -0400 Received: (Authenticated sender: juri@linkov.net) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 6FBA11C0003; Sun, 22 Aug 2021 08:47:11 +0000 (UTC) From: Juri Linkov To: Eli Zaretskii Subject: Re: bug#50067: Context menus Organization: LINKOV.NET References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@acm.org> <87v942pvcj.fsf@mail.linkov.net> <83zgte3asy.fsf@gnu.org> <87mtpepqzw.fsf@mail.linkov.net> <83sfz639lh.fsf@gnu.org> <8735r6ppf0.fsf@mail.linkov.net> <83o89u37gh.fsf@gnu.org> <87wnohx5zd.fsf@mail.linkov.net> <831r6p3lzc.fsf@gnu.org> <87o89sh96g.fsf@mail.linkov.net> <837dgg1hdg.fsf@gnu.org> <87mtpcf79p.fsf@mail.linkov.net> <83zgtcyp2k.fsf@gnu.org> Date: Sun, 22 Aug 2021 11:46:53 +0300 In-Reply-To: <83zgtcyp2k.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 20 Aug 2021 20:59:47 +0300") Message-ID: <87h7fhdfya.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 50067 Cc: alan@idiocy.org, mattiase@acm.org, homeros.misasa@gmail.com, tkk@misasa.okayama-u.ac.jp, larsi@gnus.org, 50067@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> >> Using a text property would be a good solution. Should then >> >> the NS-specific "Select" title be removed in menu.c >> >> when the title has a special text property? >> > >> > I'm not sure I understand what is the NS-specific "Select" title. Can >> > you point me to the relevant code? >> >> I meant such patch: > > OK, but where in that patch is the NS-specific "Select" title that > should be removed? Mattias pushed the NS-specific patch, and I pushed the text property handling. From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 22 15:11:14 2021 Received: (at 50067) by debbugs.gnu.org; 22 Aug 2021 19:11:15 +0000 Received: from localhost ([127.0.0.1]:39800 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mHssE-0007vi-PD for submit@debbugs.gnu.org; Sun, 22 Aug 2021 15:11:14 -0400 Received: from mail-wr1-f49.google.com ([209.85.221.49]:33560) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mHssB-0007vS-MT for 50067@debbugs.gnu.org; Sun, 22 Aug 2021 15:11:13 -0400 Received: by mail-wr1-f49.google.com with SMTP id d26so2482755wrc.0 for <50067@debbugs.gnu.org>; Sun, 22 Aug 2021 12:11:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=qM5N0606yNOU6FzeVmdNBWSxJCwFZHY2qrtr6vki24c=; b=MJyzY4o4Qxba57QKA1uSY+f23+h1ExoQNIksCjNotTsP7LvvmPVAG01i9cqsCXHWnB z9q29gXmHrhRut0sxNXVBJBZu77pJkFxU6Ylr9TzfmE+igHiSh2ZT4L7FlCuejtW+h2p esoOdcenzqNPtRSazN/NrXSZXcHPdQIm/Xb4X3N7vfiQ9ybcKmNeYorY0WssPjA0d3Uz 5IhLPFvjVu7VeLDSeDM0ehJRc0PLJhrr+tAdOvrGWOxPJVf4yAam571Du0VV0XBTCX+z qvZGahLnxghIKREYAyFwwjy5EWJPHIFwMs2H7oi1TGQoE254PyaXY55cxLGCbHVP4ZTN qgFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=qM5N0606yNOU6FzeVmdNBWSxJCwFZHY2qrtr6vki24c=; b=uP3AnfqPPB8yoFiQoGVTpYtx/Hccg848NjPzkdJNyaHJvtkShnxF5TgnaCY6OTnnrk ygpmdZoAlXVJFNYn+Fkq1lMzYjuWEaKXs9jau//f2+gqQuaVsT4DlCVZQWXWbUYj5Cx2 Ur2XGkqSPvpOtRVRe0O8W9b36lIojkkaz5npTZuSH1tMV5hwX+w7KUWJbbIQC5Zsry+b np9H0jS6edDix8PaM1Wv2FR+a8WuVMe2UzdbSm9oi/hAILVh+1qigblgqR4C+OUjWFid Kmy4p0k6YGYbrMCx8FIxarpNPJZYP5XK6JBFaSAiImX2uvlFVEmQ4ClkooOh1gsl4vRi Dqnw== X-Gm-Message-State: AOAM530trfhnRqZNd8i/MZUzaWbZzXH4J5+/sF9FmzTFFSA3iDxp7xH4 XlftHYu6oaIavG3NFq4VEyecwh6cpck= X-Google-Smtp-Source: ABdhPJwg84X+bxrw15RjhjQ2w5Z5uxjCRXFtrMNecdlz5vaJcWqnN4SBYxgchfpsRNneCKts3F7uOA== X-Received: by 2002:a05:6000:186:: with SMTP id p6mr2002010wrx.210.1629659465815; Sun, 22 Aug 2021 12:11:05 -0700 (PDT) Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id e11sm12718972wrm.80.2021.08.22.12.11.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 22 Aug 2021 12:11:05 -0700 (PDT) Subject: Re: bug#50067: Context menus To: Eli Zaretskii , =?UTF-8?Q?Mattias_Engdeg=c3=a5rd?= References: <83sfz639lh.fsf@gnu.org> <8735r6ppf0.fsf@mail.linkov.net> <83o89u37gh.fsf@gnu.org> <87wnohx5zd.fsf@mail.linkov.net> <831r6p3lzc.fsf@gnu.org> <87o89sh96g.fsf@mail.linkov.net> <837dgg1hdg.fsf@gnu.org> <87mtpcf79p.fsf@mail.linkov.net> <83zgtcyp2k.fsf@gnu.org> <56454B2B-0250-4BC6-BC26-E1C5579ACF49@acm.org> <83eeanyrm5.fsf@gnu.org> <4BC1074D-DE75-4303-8385-B70BAACFCDA0@acm.org> <83czq7youc.fsf@gnu.org> From: Dmitry Gutov Message-ID: <32ef6b91-107c-d7e5-b103-0ff062bf8ebd@yandex.ru> Date: Sun, 22 Aug 2021 22:11:03 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <83czq7youc.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: 50067 Cc: alan@idiocy.org, juri@linkov.net, homeros.misasa@gmail.com, tkk@misasa.okayama-u.ac.jp, larsi@gnus.org, 50067@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.6 (/) On 21.08.2021 15:16, Eli Zaretskii wrote: >>> I think it may be confusing that the arrow doesn't appear immediately >>> after M-., only when you switch from the XREF buffer. >> I don't quite follow -- M-. typically doesn't create an*xref* buffer at all; when it does, it does not follow any of the matches found therein. > Oh, so it's only appearing when the tag is shown? Confusing... but I > guess we will have to live with that. > What is confusing? We do the same in Grep and Compilation. From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 22 15:22:37 2021 Received: (at 50067) by debbugs.gnu.org; 22 Aug 2021 19:22:37 +0000 Received: from localhost ([127.0.0.1]:39813 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mHt3A-0008C9-FC for submit@debbugs.gnu.org; Sun, 22 Aug 2021 15:22:37 -0400 Received: from eggs.gnu.org ([209.51.188.92]:50192) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mHt35-0008Bu-96 for 50067@debbugs.gnu.org; Sun, 22 Aug 2021 15:22:31 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:54334) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mHt2v-00047u-AH; Sun, 22 Aug 2021 15:22:17 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4273 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 1mHt2u-0000y3-PA; Sun, 22 Aug 2021 15:22:17 -0400 Date: Sun, 22 Aug 2021 22:22:01 +0300 Message-Id: <83y28twahy.fsf@gnu.org> From: Eli Zaretskii To: Dmitry Gutov In-Reply-To: <32ef6b91-107c-d7e5-b103-0ff062bf8ebd@yandex.ru> (message from Dmitry Gutov on Sun, 22 Aug 2021 22:11:03 +0300) Subject: Re: bug#50067: Context menus References: <83sfz639lh.fsf@gnu.org> <8735r6ppf0.fsf@mail.linkov.net> <83o89u37gh.fsf@gnu.org> <87wnohx5zd.fsf@mail.linkov.net> <831r6p3lzc.fsf@gnu.org> <87o89sh96g.fsf@mail.linkov.net> <837dgg1hdg.fsf@gnu.org> <87mtpcf79p.fsf@mail.linkov.net> <83zgtcyp2k.fsf@gnu.org> <56454B2B-0250-4BC6-BC26-E1C5579ACF49@acm.org> <83eeanyrm5.fsf@gnu.org> <4BC1074D-DE75-4303-8385-B70BAACFCDA0@acm.org> <83czq7youc.fsf@gnu.org> <32ef6b91-107c-d7e5-b103-0ff062bf8ebd@yandex.ru> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 50067 Cc: alan@idiocy.org, mattiase@acm.org, juri@linkov.net, homeros.misasa@gmail.com, tkk@misasa.okayama-u.ac.jp, larsi@gnus.org, 50067@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > Cc: alan@idiocy.org, juri@linkov.net, homeros.misasa@gmail.com, > tkk@misasa.okayama-u.ac.jp, larsi@gnus.org, 50067@debbugs.gnu.org > From: Dmitry Gutov > Date: Sun, 22 Aug 2021 22:11:03 +0300 > > On 21.08.2021 15:16, Eli Zaretskii wrote: > >>> I think it may be confusing that the arrow doesn't appear immediately > >>> after M-., only when you switch from the XREF buffer. > >> I don't quite follow -- M-. typically doesn't create an*xref* buffer at all; when it does, it does not follow any of the matches found therein. > > Oh, so it's only appearing when the tag is shown? Confusing... but I > > guess we will have to live with that. > > > > What is confusing? What I described. > We do the same in Grep and Compilation. That's not exactly the same, because with M-. I already asked to show me a definition. Anyway, not worth an argument. From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 22 15:55:10 2021 Received: (at 50067) by debbugs.gnu.org; 22 Aug 2021 19:55:11 +0000 Received: from localhost ([127.0.0.1]:39823 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mHtYk-0000Uv-PR for submit@debbugs.gnu.org; Sun, 22 Aug 2021 15:55:10 -0400 Received: from mail-wr1-f46.google.com ([209.85.221.46]:39931) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mHtYg-0000UF-9F for 50067@debbugs.gnu.org; Sun, 22 Aug 2021 15:55:09 -0400 Received: by mail-wr1-f46.google.com with SMTP id z4so7316185wrr.6 for <50067@debbugs.gnu.org>; Sun, 22 Aug 2021 12:55:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=D/9ILPSpyWhxqUnyH0NH5E+FmmWSqX9K4KBgaBdtZU4=; b=qNU3+670jvBsX03t/zQequaUsWxnSh4AWAlaPb/C1ZN0nUOmh6FGZKOkwv1adjEfQM 0pPoXhB8ss0MC/2dqrCBEmFB6NvvkLbo6GzaizRAzxZdzGPc4h7UnfDxQd/ntMpCtWQf txf5wyJYLs+mAaUizfSxnceJNwstvvTiSiVoqfrw+TF9Td/CcLSKrd70ml25w0xahj4t 1nez5tvEHngYqll2GeBrecs2VOiXLG0b73ZzHVBBGlbsc66ywpIcdJfCeoVWDkf42b2o YY6b+wvi0sMFhPwoIonkGpWIPyAfpWfaD7ExPkTpla7h/wJULDXu1uaH8eYpsqTt6BbP Xi1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=D/9ILPSpyWhxqUnyH0NH5E+FmmWSqX9K4KBgaBdtZU4=; b=Dx9XWpgHqHNiUAHWSfqgQT6g1Z5IqgycpC/HA/equgl+Gnc5HPMOtf5luDBDlGqZoh J6I+s8HKt87ZJBXaXA/aE9ucPjil1sS7wf6VVYZ53lLbwhh+WYS/RsI4YJXiVlAZ4HRH dUMF+qZ0oex+tp01QNwtVfK1rJjiPGBLeF+Rz+vn0eh9wFtP7D0L6o9m4Iy6Svr/eluN 7n0B+IfDqKt3ihU2CDo+xd4Y2wn1txF3IDz99DqJIx/bkYHe7IIbEcWD3UWdUrBp3ZOF pAntXu2jqO/OskLCH87rPgFJEhFlpNGWWQAwf9wR6eC7R5XrfTndvAj1REls82d42GUR Ra4w== X-Gm-Message-State: AOAM533RPgeozZ4inbgjxmVy09Lk4I6xQWuvtFkl0hHf1z6JiqTwRwgd XM1s32/ccmgnJ7mz8aeaHJnKZNBt/S0= X-Google-Smtp-Source: ABdhPJz7OSg8T/4sHJyd0+TdvrNdFIwnmRmzM21timfqeuRUJT33SPXgt3NeeI2SUwq7178d6Ud1Dg== X-Received: by 2002:a5d:6052:: with SMTP id j18mr10088823wrt.348.1629662100273; Sun, 22 Aug 2021 12:55:00 -0700 (PDT) Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id 11sm7386828wmi.15.2021.08.22.12.54.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 22 Aug 2021 12:54:59 -0700 (PDT) Subject: Re: bug#50067: Context menus To: Eli Zaretskii References: <83sfz639lh.fsf@gnu.org> <8735r6ppf0.fsf@mail.linkov.net> <83o89u37gh.fsf@gnu.org> <87wnohx5zd.fsf@mail.linkov.net> <831r6p3lzc.fsf@gnu.org> <87o89sh96g.fsf@mail.linkov.net> <837dgg1hdg.fsf@gnu.org> <87mtpcf79p.fsf@mail.linkov.net> <83zgtcyp2k.fsf@gnu.org> <56454B2B-0250-4BC6-BC26-E1C5579ACF49@acm.org> <83eeanyrm5.fsf@gnu.org> <4BC1074D-DE75-4303-8385-B70BAACFCDA0@acm.org> <83czq7youc.fsf@gnu.org> <32ef6b91-107c-d7e5-b103-0ff062bf8ebd@yandex.ru> <83y28twahy.fsf@gnu.org> From: Dmitry Gutov Message-ID: <7af845e0-1f19-61fc-65e0-b23fac3927aa@yandex.ru> Date: Sun, 22 Aug 2021 22:54:57 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <83y28twahy.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: 50067 Cc: alan@idiocy.org, mattiase@acm.org, juri@linkov.net, homeros.misasa@gmail.com, tkk@misasa.okayama-u.ac.jp, larsi@gnus.org, 50067@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.6 (/) On 22.08.2021 22:22, Eli Zaretskii wrote: > That's not exactly the same, because with M-. I already asked to show > me a definition. Anyway, not worth an argument. Perhaps your complaint is instead about no definition being shown, even though you feel like you already asked Emacs to show one (which the fileloop UI does). From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 22 22:21:38 2021 Received: (at 50067) by debbugs.gnu.org; 23 Aug 2021 02:21:38 +0000 Received: from localhost ([127.0.0.1]:40149 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mHzad-0003nf-WB for submit@debbugs.gnu.org; Sun, 22 Aug 2021 22:21:38 -0400 Received: from eggs.gnu.org ([209.51.188.92]:42856) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mHzaa-0003nQ-VE for 50067@debbugs.gnu.org; Sun, 22 Aug 2021 22:21:30 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:34468) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mHzaO-0005o5-MD; Sun, 22 Aug 2021 22:21:16 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1999 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 1mHzaO-0006dA-9A; Sun, 22 Aug 2021 22:21:16 -0400 Date: Mon, 23 Aug 2021 05:21:05 +0300 Message-Id: <83v93wx5ny.fsf@gnu.org> From: Eli Zaretskii To: Dmitry Gutov In-Reply-To: <7af845e0-1f19-61fc-65e0-b23fac3927aa@yandex.ru> (message from Dmitry Gutov on Sun, 22 Aug 2021 22:54:57 +0300) Subject: Re: bug#50067: Context menus References: <83sfz639lh.fsf@gnu.org> <8735r6ppf0.fsf@mail.linkov.net> <83o89u37gh.fsf@gnu.org> <87wnohx5zd.fsf@mail.linkov.net> <831r6p3lzc.fsf@gnu.org> <87o89sh96g.fsf@mail.linkov.net> <837dgg1hdg.fsf@gnu.org> <87mtpcf79p.fsf@mail.linkov.net> <83zgtcyp2k.fsf@gnu.org> <56454B2B-0250-4BC6-BC26-E1C5579ACF49@acm.org> <83eeanyrm5.fsf@gnu.org> <4BC1074D-DE75-4303-8385-B70BAACFCDA0@acm.org> <83czq7youc.fsf@gnu.org> <32ef6b91-107c-d7e5-b103-0ff062bf8ebd@yandex.ru> <83y28twahy.fsf@gnu.org> <7af845e0-1f19-61fc-65e0-b23fac3927aa@yandex.ru> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 50067 Cc: alan@idiocy.org, mattiase@acm.org, juri@linkov.net, homeros.misasa@gmail.com, tkk@misasa.okayama-u.ac.jp, larsi@gnus.org, 50067@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: alan@idiocy.org, mattiase@acm.org, juri@linkov.net, > homeros.misasa@gmail.com, tkk@misasa.okayama-u.ac.jp, larsi@gnus.org, > 50067@debbugs.gnu.org > From: Dmitry Gutov > Date: Sun, 22 Aug 2021 22:54:57 +0300 > > On 22.08.2021 22:22, Eli Zaretskii wrote: > > That's not exactly the same, because with M-. I already asked to show > > me a definition. Anyway, not worth an argument. > > Perhaps your complaint is instead about no definition being shown, even > though you feel like you already asked Emacs to show one (which the > fileloop UI does). Yes. But that ship has sailed long ago. From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 22 23:11:52 2021 Received: (at 50067) by debbugs.gnu.org; 23 Aug 2021 03:11:53 +0000 Received: from localhost ([127.0.0.1]:40175 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mI0NL-00051B-Uz for submit@debbugs.gnu.org; Sun, 22 Aug 2021 23:11:52 -0400 Received: from mx0a-00602c01.pphosted.com ([205.220.162.67]:49530) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mI0NG-000510-Mr for 50067@debbugs.gnu.org; Sun, 22 Aug 2021 23:11:50 -0400 Received: from pps.filterd (m0238149.ppops.net [127.0.0.1]) by mx0a-00602c01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 17MKvumJ021966; Mon, 23 Aug 2021 12:11:34 +0900 Received: from mlsec.cc.okayama-u.ac.jp (mlsec.cc.okayama-u.ac.jp [150.46.12.254]) by mx0a-00602c01.pphosted.com with ESMTP id 3akkp20mur-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 23 Aug 2021 12:11:34 +0900 Received: from jlsv301.okayama-u.ac.jp (unknown [150.46.12.5]) by mlsec.cc.okayama-u.ac.jp with smtp id 6d8c_1d53_0132e028_2b18_487c_a8e1_a91c7295b669; Mon, 23 Aug 2021 12:11:27 +0900 Received: from smtpclient.apple (unknown [172.24.1.212]) by jlsv301.okayama-u.ac.jp (Postfix) with ESMTPSA id 341F4760414; Mon, 23 Aug 2021 12:11:28 +0900 (JST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Subject: Re: bug#50067: Context menus From: Tak Kunihiro In-Reply-To: <87lf4tews5.fsf@mail.linkov.net> Date: Mon, 23 Aug 2021 12:11:27 +0900 Content-Transfer-Encoding: quoted-printable Message-Id: <00A9BE5A-D661-42AF-A65B-3B80C7428121@misasa.okayama-u.ac.jp> References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@acm.org> <87v942pvcj.fsf@mail.linkov.net> <004A628A-99CC-4C62-8AE2-921C4C38D42A@acm.org> <87h7fkh8z8.fsf@mail.linkov.net> <060413B6-E0EF-491D-986F-3988C255729F@misasa.okayama-u.ac.jp> <87lf4tews5.fsf@mail.linkov.net> To: Juri Linkov X-Mailer: Apple Mail (2.3654.120.0.1.13) X-NAI-Spam-Flag: NO X-NAI-Spam-Level: X-NAI-Spam-Threshold: 11 X-NAI-Spam-Score: 0.1 X-NAI-Spam-Rules: 5 Rules triggered GME_TWTRE=0.1, EDT_SA_AU_PASS=0, EDT_SA_DN_PASS=0, EDT_SA_TS_PASS=0, RV6962=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6962> : inlines <7226> : streams <1899591> : uri <3309952> X-Proofpoint-GUID: Xvj9abkIVU0StjrvE0yGINzMI2AZzIUw X-Proofpoint-ORIG-GUID: Xvj9abkIVU0StjrvE0yGINzMI2AZzIUw X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10084 signatures=668682 X-Proofpoint-Spam-Details: rule=outbound_spam_notspam policy=outbound_spam score=0 spamscore=0 clxscore=1015 bulkscore=0 suspectscore=0 phishscore=0 impostorscore=0 adultscore=0 priorityscore=1501 malwarescore=0 lowpriorityscore=0 mlxlogscore=999 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2107140000 definitions=main-2108230018 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 50067 Cc: Alan Third , =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= , =?utf-8?B?5Zu95bqD5Y2T5Lmf?= , Lars Ingebrigtsen , 50067@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> I suggest to assign [drag-mouse-3] as well, as shown below. >>=20 >> (define-key map [mouse-3] context-menu-entry) >> (define-key map [drag-mouse-3] context-menu-entry) >=20 > There is no need to bind [drag-mouse-3] because [down-mouse-3] is = bound. I confirmed. I took the suggestion back. >> On Mac, I suggest to assign [C-double-mouse-1] as well as shown = below. >>=20 >> (define-key map [C-down-mouse-1] #'ignore) >> (define-key map [C-mouse-1] context-menu-entry) >> (define-key map [C-double-mouse-1] context-menu-entry) >> (define-key map [C-triple-mouse-1] context-menu-entry) >> (define-key map [C-drag-mouse-1] context-menu-entry) >=20 > I leave this for the users of Mac to decide what would be better on = Mac. I agree. User can bind it later too. >> * Error detection system >>=20 >> It is good if the context-menu system is ready for >> an error that occurs on one of context-menu-functions. >> For now, when there is error, Emacs only tells >> ` is undefined'. >=20 > I agree, a better error reporting would be nice. Patches welcome. This is something I wanted to have for a long time. I do not have idea where to start. I hope someone works on this using this = opportunity. >> * Long click system >>=20 >> It=E2=80=99s time to discuss long-left-click also as trigger to >> show context menu. >>=20 >> https://lists.gnu.org/archive/html/emacs-devel/2017-11/msg00267.html >> https://lists.gnu.org/archive/html/emacs-devel/2020-09/msg01277.html >=20 > I tried to implement this, but soon found that long-left-click is = unusable, > because such artificial delay is a hassle - no one would have > patience to wait even half a second until the menu finally appears. > But this could be implemented anyway when users will demand this. I think this is useful especially on laptop computer with Mac. As inferred on other posts laptop computer with Mac does not have mouse-3. However, it is possible that I=E2=80=99m the only one. >> * Open by other frame >>=20 >> File would be opened by this window. Sometimes I want to open it by >> other frame. It is good if which window to open, is selectable after >> showing context-menu. I do not know how to do so. >=20 > Sorry, I don't understand what menu do you mean, maybe in Dired mode? `ffap-at-mouse=E2=80=99 will open a file under pointer on `this = window=E2=80=99. Randomly I want to open it by `other frame=E2=80=99. It=E2=80=99s good if I can choose open the file on `this window=E2=80=99 = or `other frame=E2=80=99. Is there a way to detect meta key pressed when select one of menu items? >> * Details >>=20 >> It is handy to have buffer menu when right click mode bar. >=20 > I don't see where buffer-menu-open currently is used on the mode-line. >> (define-key map [remap buffer-menu-open] context-menu-entry) >=20 > This gives the error "void-variable map". This suggestion may be unrelated to context-menu. On mode bar, both mouse-1 and mouse-3 switches buffer.=20 I think mouse-3 should show something like (mouse-buffer-menu-map). >> Also it is handy to have frame menu when right click title bar. >=20 > I think this is a good idea. >=20 >> I do not know how to do so. >=20 > I do not know how to do this for the frame title bar. > But currently I'm doing this for the tab bar. OK. >> Also it is nice to show word candidates by ispell when click a word. >=20 > Maybe like flyspell-mode? I have an idea. Possibly, send patch in the future. >> ** context-menu-region >>=20 >> All commands belong to `Edit' in menu bar. >> I think `context-menu-edit' sounds better. >=20 > I already tried to use your idea to name it `context-menu-edit'. > But the problem is that other functions like context-menu-undo are = also > related to editing. OTOH, some items in context-menu-region don't do > editing such as "Select All" is not editing, "Copy" is not editing, = etc. >=20 >> Isn't it better to use `menu-bar-edit-menu' as a source rather than >> create a menu from scratch? >=20 > I already tried this idea but this menu is already available > in the global menu that already can be enabled by adding > context-menu-global to context-menu-functions. > But maybe `context-menu-edit' could be added as well > from `menu-bar-edit-menu'. OK. I only wanted to suggest reducing maintenance cost. >=20 >> On paste when there is a region and delete-selection-mode is t, the >> region should be replaced by the text. >=20 > Please explain how the region should be replaced by the text, > when mouse-yank-at-click or mouse-yank-primary is used > to paste where the mouse is clicked. Should it delete the region > and paste where mouse is clicked on another part of the buffer? > What if the mouse is clicked in another window? When there is a region and yank text by `C-y=E2=80=99, the text would be replaced. I think when there is a region and point in on region, region should be replaced by text. No? >> ** no multiple horizontal lines >>=20 >> Sometimes I see double lines on the context menu. I think that there = is >> no useful case to have double lines. To allow only one horizontal = line >> would look cool. >=20 > Right, double separators should be removed. OK. >> ** reuse existing menu >>=20 >> I cannot figure out how to include pre-existing menu such for >> (mouse-buffer-menu-map). To lean how to manipulate menu is not easy. >> It's nice to have an example something like below (does not work). >>=20 >> (defun context-menu-buffer (menu) >> "Add a buffer menu entry to MENU." >> (let ((map (mouse-buffer-menu-map))) >> (define-key-after menu [buffer] map)) >> menu) >=20 > Adding the existing menu is not easy. There are some examples in > context-menu-global, context-menu-local, context-menu-minor. OK. I did not know it is not easy. I cannot find guid line how the menu should be created. Do you know where to look? From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 23 03:38:08 2021 Received: (at 50067) by debbugs.gnu.org; 23 Aug 2021 07:38:08 +0000 Received: from localhost ([127.0.0.1]:40440 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mI4X2-0003To-3s for submit@debbugs.gnu.org; Mon, 23 Aug 2021 03:38:08 -0400 Received: from relay10.mail.gandi.net ([217.70.178.230]:42127) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mI4Wz-0003T7-A4 for 50067@debbugs.gnu.org; Mon, 23 Aug 2021 03:38:05 -0400 Received: (Authenticated sender: juri@linkov.net) by relay10.mail.gandi.net (Postfix) with ESMTPSA id EB561240012; Mon, 23 Aug 2021 07:37:56 +0000 (UTC) From: Juri Linkov To: Tak Kunihiro Subject: Re: bug#50067: Context menus Organization: LINKOV.NET References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@acm.org> <87v942pvcj.fsf@mail.linkov.net> <004A628A-99CC-4C62-8AE2-921C4C38D42A@acm.org> <87h7fkh8z8.fsf@mail.linkov.net> <060413B6-E0EF-491D-986F-3988C255729F@misasa.okayama-u.ac.jp> <87lf4tews5.fsf@mail.linkov.net> <00A9BE5A-D661-42AF-A65B-3B80C7428121@misasa.okayama-u.ac.jp> Date: Mon, 23 Aug 2021 10:24:22 +0300 In-Reply-To: <00A9BE5A-D661-42AF-A65B-3B80C7428121@misasa.okayama-u.ac.jp> (Tak Kunihiro's message of "Mon, 23 Aug 2021 12:11:27 +0900") Message-ID: <87wnociu41.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 50067 Cc: Mattias =?iso-8859-1?Q?Engdeg=E5rd?= , Alan Third , 50067@debbugs.gnu.org, Lars Ingebrigtsen X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> I tried to implement this, but soon found that long-left-click is unusable, >> because such artificial delay is a hassle - no one would have >> patience to wait even half a second until the menu finally appears. >> But this could be implemented anyway when users will demand this. > > I think this is useful especially on laptop computer with Mac. > As inferred on other posts laptop computer with Mac does not have > mouse-3. However, it is possible that I’m the only one. Recently Mattias bound C-mouse-1 to use instead of mouse-3 on Mac. > `ffap-at-mouse’ will open a file under pointer on `this window’. > Randomly I want to open it by `other frame’. > It’s good if I can choose open the file on `this window’ or `other frame’. > Is there a way to detect meta key pressed when select one of menu items? There is no way to detect meta key. But you can create a new command to open in a new frame, and add this command to the menu. Or use the existing `ffap-other-frame'. >>> It is handy to have buffer menu when right click mode bar. > > This suggestion may be unrelated to context-menu. > On mode bar, both mouse-1 and mouse-3 switches buffer. > I think mouse-3 should show something like (mouse-buffer-menu-map). Yes, this would be useful. >>> On paste when there is a region and delete-selection-mode is t, the >>> region should be replaced by the text. >> >> Please explain how the region should be replaced by the text, >> when mouse-yank-at-click or mouse-yank-primary is used >> to paste where the mouse is clicked. Should it delete the region >> and paste where mouse is clicked on another part of the buffer? >> What if the mouse is clicked in another window? > > When there is a region and yank text by `C-y’, the text would > be replaced. > > I think when there is a region and point in on region, region > should be replaced by text. No? mouse-yank-at-click is intended to paste where you click. So when there is a region, and you click mouse-3 at some other position where you want to paste, and select "Paste" from the context-menu, it's unclear what to do with the region. It makes no sense to delete the region, when you paste at the clicked position outside of the region, but not on the region. Please see more in mouse-yank-at-click and mouse-yank-primary that contain such comment about the need to deactivate the region: ;; Without this, confusing things happen upon e.g. inserting into ;; the middle of an active region. (when select-active-regions (let (select-active-regions) (deactivate-mark))) >>> I cannot figure out how to include pre-existing menu such for >>> (mouse-buffer-menu-map). Actually, the right function to use is (mouse-buffer-menu-keymap) instead of (mouse-buffer-menu-map). > I cannot find guid line how the menu should be created. > Do you know where to look? Good documentation is in (info "(elisp) Defining Menus"). From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 23 07:19:15 2021 Received: (at 50067) by debbugs.gnu.org; 23 Aug 2021 11:19:15 +0000 Received: from localhost ([127.0.0.1]:40619 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mI7yw-0002jF-Vh for submit@debbugs.gnu.org; Mon, 23 Aug 2021 07:19:15 -0400 Received: from mail-wm1-f52.google.com ([209.85.128.52]:45905) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mI7yr-0002ih-2c for 50067@debbugs.gnu.org; Mon, 23 Aug 2021 07:19:09 -0400 Received: by mail-wm1-f52.google.com with SMTP id j17-20020a05600c1c1100b002e754875260so653627wms.4 for <50067@debbugs.gnu.org>; Mon, 23 Aug 2021 04:19:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=IglXhXuzNBprvyoji8+6xzkb4XA9zEVWwxAwkr8+PKs=; b=EWxWMhdUkgA0SPOLZwxv2PF0bYXeaJhWhV9ewDSDyxh6leZZ2FIecBTj8r77yNp44H fFM/GrFDjySX4QpEMq+WAL/AV6dzusbWeFeFUxf5VpaNNNWU6hFzzIf7HGvJfKe0rOwq gfJT3LtCN2jsg2KV7YgEvf5Rmzev68cXWTzWSrvizrIrNliQ8Z8llod4E5TIbvAi8j/M 52jy+1Vw/gxQ9Y0ZZmT++HXW5c/fNaLZ5mBuCl8Wuu+wzEQKCXk8J/rwZMWl+X1l7q0L 16VT6JMTZ7UT6Qqy1FuuoJ2DGO52/Nm+zoJIQtEElnfc3wL+g/8zOZOs1dOF1d0sxpwr aTsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=IglXhXuzNBprvyoji8+6xzkb4XA9zEVWwxAwkr8+PKs=; b=b6VJBxwt24P10eSzQdyRwY21ckn144GuNz1QKvJtaR0UqoWQkm/WGx/tZeIxT50BV0 b6kF+41yOWQ1lh/QDFwv2IB2rfiI87QLWgExbcdF2T/Ee+9/jXChmdyYuh/jPdhRXCVg H/FLiVDImHjB8rOKOq5Ff/BfZWeMLBFvhxWdNsiRh0ayjpQVjU9bo3VWN9GY31zZOoqF MtSci4cHq3pN8FGGOntfOjM83khFXyTCwZbUU/OncXVMdOJR057KOqGjQ/Ra1xwwn5xZ 48OeFTc2mVHmtMiGjwdyZ8jlR2tyAYve/DGoHbZ8VTKhDYpfLXn1QMJcRRFB7WIIOESa jTSA== X-Gm-Message-State: AOAM5313L2MRrm8wFmWHUOHzF2uj8IMCsAxe6zEaXlwx4b1wLo1FEqwq L9MkdJeCOg6MyX6XAq+fLn+tYV74bkY= X-Google-Smtp-Source: ABdhPJz3Se4nrDZWER4K8ALKCp4Acg3hJ0Iyf6P9j0O022mvdl7D3CH5zYjYa15ZTPZMRUXFv2rdTA== X-Received: by 2002:a05:600c:350b:: with SMTP id h11mr15810705wmq.123.1629717539228; Mon, 23 Aug 2021 04:18:59 -0700 (PDT) Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id k1sm15387310wrz.61.2021.08.23.04.18.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 23 Aug 2021 04:18:58 -0700 (PDT) Subject: Re: bug#50067: Context menus To: Eli Zaretskii References: <83sfz639lh.fsf@gnu.org> <8735r6ppf0.fsf@mail.linkov.net> <83o89u37gh.fsf@gnu.org> <87wnohx5zd.fsf@mail.linkov.net> <831r6p3lzc.fsf@gnu.org> <87o89sh96g.fsf@mail.linkov.net> <837dgg1hdg.fsf@gnu.org> <87mtpcf79p.fsf@mail.linkov.net> <83zgtcyp2k.fsf@gnu.org> <56454B2B-0250-4BC6-BC26-E1C5579ACF49@acm.org> <83eeanyrm5.fsf@gnu.org> <4BC1074D-DE75-4303-8385-B70BAACFCDA0@acm.org> <83czq7youc.fsf@gnu.org> <32ef6b91-107c-d7e5-b103-0ff062bf8ebd@yandex.ru> <83y28twahy.fsf@gnu.org> <7af845e0-1f19-61fc-65e0-b23fac3927aa@yandex.ru> <83v93wx5ny.fsf@gnu.org> From: Dmitry Gutov Message-ID: Date: Mon, 23 Aug 2021 14:18:56 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <83v93wx5ny.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: 50067 Cc: alan@idiocy.org, mattiase@acm.org, juri@linkov.net, homeros.misasa@gmail.com, tkk@misasa.okayama-u.ac.jp, larsi@gnus.org, 50067@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.6 (/) On 23.08.2021 05:21, Eli Zaretskii wrote: > Yes. But that ship has sailed long ago. Only if the chief maintainer thinks that the UI must be frozen in time. We could add an option, at the very least. From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 23 07:41:10 2021 Received: (at 50067) by debbugs.gnu.org; 23 Aug 2021 11:41:11 +0000 Received: from localhost ([127.0.0.1]:40625 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mI8K8-0005Nd-W3 for submit@debbugs.gnu.org; Mon, 23 Aug 2021 07:41:10 -0400 Received: from eggs.gnu.org ([209.51.188.92]:46996) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mI8K2-0005My-Vc for 50067@debbugs.gnu.org; Mon, 23 Aug 2021 07:41:03 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:45840) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mI8Jr-0006LB-Gb; Mon, 23 Aug 2021 07:40:47 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4293 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 1mI8Jq-0002Qj-W8; Mon, 23 Aug 2021 07:40:47 -0400 Date: Mon, 23 Aug 2021 14:40:38 +0300 Message-Id: <83r1ekwfrd.fsf@gnu.org> From: Eli Zaretskii To: Dmitry Gutov In-Reply-To: (message from Dmitry Gutov on Mon, 23 Aug 2021 14:18:56 +0300) Subject: Re: bug#50067: Context menus References: <83sfz639lh.fsf@gnu.org> <8735r6ppf0.fsf@mail.linkov.net> <83o89u37gh.fsf@gnu.org> <87wnohx5zd.fsf@mail.linkov.net> <831r6p3lzc.fsf@gnu.org> <87o89sh96g.fsf@mail.linkov.net> <837dgg1hdg.fsf@gnu.org> <87mtpcf79p.fsf@mail.linkov.net> <83zgtcyp2k.fsf@gnu.org> <56454B2B-0250-4BC6-BC26-E1C5579ACF49@acm.org> <83eeanyrm5.fsf@gnu.org> <4BC1074D-DE75-4303-8385-B70BAACFCDA0@acm.org> <83czq7youc.fsf@gnu.org> <32ef6b91-107c-d7e5-b103-0ff062bf8ebd@yandex.ru> <83y28twahy.fsf@gnu.org> <7af845e0-1f19-61fc-65e0-b23fac3927aa@yandex.ru> <83v93wx5ny.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 50067 Cc: alan@idiocy.org, mattiase@acm.org, juri@linkov.net, homeros.misasa@gmail.com, tkk@misasa.okayama-u.ac.jp, larsi@gnus.org, 50067@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: alan@idiocy.org, mattiase@acm.org, juri@linkov.net, > homeros.misasa@gmail.com, tkk@misasa.okayama-u.ac.jp, larsi@gnus.org, > 50067@debbugs.gnu.org > From: Dmitry Gutov > Date: Mon, 23 Aug 2021 14:18:56 +0300 > > On 23.08.2021 05:21, Eli Zaretskii wrote: > > Yes. But that ship has sailed long ago. > > Only if the chief maintainer thinks that the UI must be frozen in time. > > We could add an option, at the very least. An option to display the first match right away will be most appreciated, thanks. From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 23 12:07:16 2021 Received: (at 50067) by debbugs.gnu.org; 23 Aug 2021 16:07:16 +0000 Received: from localhost ([127.0.0.1]:42452 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mICTf-0008QN-Rx for submit@debbugs.gnu.org; Mon, 23 Aug 2021 12:07:16 -0400 Received: from relay9-d.mail.gandi.net ([217.70.183.199]:51555) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mICTa-0008Ph-EP for 50067@debbugs.gnu.org; Mon, 23 Aug 2021 12:07:11 -0400 Received: (Authenticated sender: juri@linkov.net) by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id 1CC24FF803; Mon, 23 Aug 2021 16:06:54 +0000 (UTC) From: Juri Linkov To: Eli Zaretskii Subject: Re: bug#50067: Context menus Organization: LINKOV.NET References: <83sfz639lh.fsf@gnu.org> <8735r6ppf0.fsf@mail.linkov.net> <83o89u37gh.fsf@gnu.org> <87wnohx5zd.fsf@mail.linkov.net> <831r6p3lzc.fsf@gnu.org> <87o89sh96g.fsf@mail.linkov.net> <837dgg1hdg.fsf@gnu.org> <87mtpcf79p.fsf@mail.linkov.net> <83zgtcyp2k.fsf@gnu.org> <56454B2B-0250-4BC6-BC26-E1C5579ACF49@acm.org> <83eeanyrm5.fsf@gnu.org> <4BC1074D-DE75-4303-8385-B70BAACFCDA0@acm.org> <83czq7youc.fsf@gnu.org> <32ef6b91-107c-d7e5-b103-0ff062bf8ebd@yandex.ru> <83y28twahy.fsf@gnu.org> <7af845e0-1f19-61fc-65e0-b23fac3927aa@yandex.ru> <83v93wx5ny.fsf@gnu.org> <83r1ekwfrd.fsf@gnu.org> Date: Mon, 23 Aug 2021 19:02:19 +0300 In-Reply-To: <83r1ekwfrd.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 23 Aug 2021 14:40:38 +0300") Message-ID: <871r6ki6aw.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 50067 Cc: alan@idiocy.org, mattiase@acm.org, homeros.misasa@gmail.com, tkk@misasa.okayama-u.ac.jp, Dmitry Gutov , larsi@gnus.org, 50067@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> We could add an option, at the very least. > > An option to display the first match right away will be most > appreciated, thanks. Like compilation-auto-jump-to-first-error. From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 24 06:13:28 2021 Received: (at 50067) by debbugs.gnu.org; 24 Aug 2021 10:13:28 +0000 Received: from localhost ([127.0.0.1]:43314 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mITQu-0001yL-Kt for submit@debbugs.gnu.org; Tue, 24 Aug 2021 06:13:28 -0400 Received: from mx0a-00602c01.pphosted.com ([205.220.162.67]:54290) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mITQp-0001y7-NY for 50067@debbugs.gnu.org; Tue, 24 Aug 2021 06:13:27 -0400 Received: from pps.filterd (m0238148.ppops.net [127.0.0.1]) by mx0a-00602c01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 17NLq9em020720; Tue, 24 Aug 2021 19:13:09 +0900 Received: from mlsec.cc.okayama-u.ac.jp (mlsec.cc.okayama-u.ac.jp [150.46.12.254]) by mx0a-00602c01.pphosted.com with ESMTP id 3amfqjruqk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 24 Aug 2021 19:13:09 +0900 Received: from jlsv301.okayama-u.ac.jp (unknown [150.46.12.5]) by mlsec.cc.okayama-u.ac.jp with smtp id 66b6_38da_1cbcafff_7825_4b36_a13a_62884b81feb1; Tue, 24 Aug 2021 19:13:00 +0900 Received: from localhost (vesta.misasa.okayama-u.ac.jp [150.46.48.154]) by jlsv301.okayama-u.ac.jp (Postfix) with ESMTPSA id DA0017600C8; Tue, 24 Aug 2021 19:13:00 +0900 (JST) Date: Tue, 24 Aug 2021 19:12:59 +0900 (JST) Message-Id: <20210824.191259.1858282353329289005.tkk@misasa.okayama-u.ac.jp> To: juri@linkov.net Subject: Re: bug#50067: Context menus From: Tak Kunihiro In-Reply-To: <87wnociu41.fsf@mail.linkov.net> References: <87lf4tews5.fsf@mail.linkov.net> <00A9BE5A-D661-42AF-A65B-3B80C7428121@misasa.okayama-u.ac.jp> <87wnociu41.fsf@mail.linkov.net> X-Mailer: Mew version 6.8 on Emacs 26.3 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 11 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 4 Rules triggered EDT_SA_AU_PASS=0, EDT_SA_DN_PASS=0, EDT_SA_TS_PASS=0, RV6963=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6963> : inlines <7226> : streams <1899714> : uri <3310564> X-Proofpoint-ORIG-GUID: P8jjqr1mKDn2E5QMs4HzyPe5D4v7ZsQ7 X-Proofpoint-GUID: P8jjqr1mKDn2E5QMs4HzyPe5D4v7ZsQ7 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10085 signatures=668682 X-Proofpoint-Spam-Details: rule=outbound_spam_notspam policy=outbound_spam score=0 phishscore=0 impostorscore=0 malwarescore=0 priorityscore=1501 mlxlogscore=841 adultscore=0 lowpriorityscore=0 clxscore=1015 mlxscore=0 spamscore=0 bulkscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2107140000 definitions=main-2108240068 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 50067 Cc: mattiase@acm.org, alan@idiocy.org, 50067@debbugs.gnu.org, larsi@gnus.org, tkk@misasa.okayama-u.ac.jp X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) I started to understand the system. A plug-in to list frames would be something like this. I think it is good to have interface to basic utilities such for recentf and bookmarks. (defun context-menu-frame (menu) "Add MENU a list of frames." (let (frame-map) (dolist (frame (visible-frame-list)) (let ((nickname (cdr (assoc 'name (frame-parameters frame)))) (cmd `(lambda nil (interactive) (funcall 'menu-bar-select-frame ,frame)))) (push (vector nickname cmd :active (not (equal frame (selected-frame)))) frame-map))) (push ["--" ignore] frame-map) (push ["New" make-frame-command] frame-map) (setq frame-map (reverse frame-map)) (push "Frames" frame-map) (easy-menu-add-item menu nil frame-map) menu)) From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 24 13:25:42 2021 Received: (at 50067) by debbugs.gnu.org; 24 Aug 2021 17:25:42 +0000 Received: from localhost ([127.0.0.1]:45109 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIaBB-0003Rq-SE for submit@debbugs.gnu.org; Tue, 24 Aug 2021 13:25:42 -0400 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:58051) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIaB9-0003Ra-Ca for 50067@debbugs.gnu.org; Tue, 24 Aug 2021 13:25:40 -0400 Received: (Authenticated sender: juri@linkov.net) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 17523C0006; Tue, 24 Aug 2021 17:25:27 +0000 (UTC) From: Juri Linkov To: Tak Kunihiro Subject: Re: bug#50067: Context menus Organization: LINKOV.NET References: <87lf4tews5.fsf@mail.linkov.net> <00A9BE5A-D661-42AF-A65B-3B80C7428121@misasa.okayama-u.ac.jp> <87wnociu41.fsf@mail.linkov.net> <20210824.191259.1858282353329289005.tkk@misasa.okayama-u.ac.jp> Date: Tue, 24 Aug 2021 20:23:48 +0300 In-Reply-To: <20210824.191259.1858282353329289005.tkk@misasa.okayama-u.ac.jp> (Tak Kunihiro's message of "Tue, 24 Aug 2021 19:12:59 +0900 (JST)") Message-ID: <877dgalpsr.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 50067 Cc: mattiase@acm.org, alan@idiocy.org, 50067@debbugs.gnu.org, larsi@gnus.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > I started to understand the system. > A plug-in to list frames would be something like this. > I think it is good to have interface to basic utilities such for > recentf and bookmarks. > > (defun context-menu-frame (menu) There are endless possibilities in creating various submenus. So the default set of submenus is limited only to already existing menus: context-menu-toolbar copied from the tool-bar context-menu-global copied from the global menu-bar context-menu-local copied from the local menu-bar context-menu-minor copied from the minor-modes menu-bar context-menu-vc copied from the vc menu context-menu-undo copied from the Edit menu context-menu-region copied from the Edit menu So if you can find an existing menu, it could be added. But I can't find the existing menu with a list of frames. There are only the existing menu with a list of buffers like you proposed (mouse-buffer-menu-map) from [C-down-mouse-1], but better to use (mouse-buffer-menu-keymap), so now context-menu-buffers is added to the default list. The remaining existing menu is 'mouse-appearance-menu' bound to [S-down-mouse-1]. I don't know if it's significant enough to be added to the default list? Also you proposed a good idea to have a frame menu when right clicking on the title bar. From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 24 13:59:52 2021 Received: (at 50067) by debbugs.gnu.org; 24 Aug 2021 17:59:52 +0000 Received: from localhost ([127.0.0.1]:45149 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIaiG-0004IC-1z for submit@debbugs.gnu.org; Tue, 24 Aug 2021 13:59:52 -0400 Received: from mail-wr1-f50.google.com ([209.85.221.50]:43871) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIaiD-0004Hv-Lc for 50067@debbugs.gnu.org; Tue, 24 Aug 2021 13:59:50 -0400 Received: by mail-wr1-f50.google.com with SMTP id z9so32491558wrh.10 for <50067@debbugs.gnu.org>; Tue, 24 Aug 2021 10:59:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language; bh=EhZ2SPDHce6H4Ye8wzeRpMx2FVhxeEdFa1K8/4ZmlqQ=; b=SlhOj6Xu1QrIRRm/P4lnYMQti6Vof0IqN/AGQLc/ur8W1ll09Kz/u5JjBq0QThj/pM pMgvjECaPFpzKBozG0w6Y/GdlcPNpGHJNmHnVzsQXgIEXRitKJxI2Qk4f9BS/1N+khC0 g+LBVW56xZrM1GOKE6Ikpdavrr3qDlsynnJSWdcmLHAVJtbGPB+Jr/jCdZC3qQ6+red1 kvCLAlxQ5LPx8zk9v+eEltaClfKU9GswSuJRmRbdNWO6rkbSnfTqlg/O+JR0/sc1QWig Kh7sxrH+Ghil2mrKS48oq7M3Cadxd0HbqGUNXtJ8PHva5Gn6z+MReFPeKYkT6YnP1FWy 3Lug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language; bh=EhZ2SPDHce6H4Ye8wzeRpMx2FVhxeEdFa1K8/4ZmlqQ=; b=bS79I5dGymwgNRVTfxAlBw3GzQX8n9auD/NegojKug9Gavvx7/QywteRQEB860v6CM uUWy2Bu2kfFNsYXEmTBZxWB/jmpgaTysm4KddZYlJmNMM9QEXndHIZ5yYNoFBtzf9IcF RDEEyfmd/RY+6t2yO7g1/lvU8a7K70ryrI37TmN1d3K5Bz7LHSDKFIpfeWYAvXvutCWQ uAe4Vv1V9O1cZ/UNTAbjzAXeLrpXfe7VU8oHNP2g5Im2O+I4zX6VIB5yMjVAjjBH5rg8 vwXiBbSFEhAZi6hZWnlDL9ZdgO7v3V/8x4uyDS3XU1lkjNmsShe0P9gCrtiZKxdrZC0v JFSA== X-Gm-Message-State: AOAM533xT6LMiVk2kJv3jfzw7QHmOuSPAYzEI0XLYmfrRZR++ZAOfqaa QoZlogfGamMF7vKPyHBZxeFinvZGbHA= X-Google-Smtp-Source: ABdhPJw6PFEltgzxaR5Uxv97IbF9XqOebrC+2kUXVslPq/zr99RoA5v3xV/QtDNbA1/IRg8O1U8PnQ== X-Received: by 2002:a5d:5305:: with SMTP id e5mr21027504wrv.243.1629827983150; Tue, 24 Aug 2021 10:59:43 -0700 (PDT) Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id l2sm3008997wme.28.2021.08.24.10.59.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 24 Aug 2021 10:59:42 -0700 (PDT) Subject: Re: bug#50067: Context menus To: Juri Linkov , Eli Zaretskii References: <83sfz639lh.fsf@gnu.org> <8735r6ppf0.fsf@mail.linkov.net> <83o89u37gh.fsf@gnu.org> <87wnohx5zd.fsf@mail.linkov.net> <831r6p3lzc.fsf@gnu.org> <87o89sh96g.fsf@mail.linkov.net> <837dgg1hdg.fsf@gnu.org> <87mtpcf79p.fsf@mail.linkov.net> <83zgtcyp2k.fsf@gnu.org> <56454B2B-0250-4BC6-BC26-E1C5579ACF49@acm.org> <83eeanyrm5.fsf@gnu.org> <4BC1074D-DE75-4303-8385-B70BAACFCDA0@acm.org> <83czq7youc.fsf@gnu.org> <32ef6b91-107c-d7e5-b103-0ff062bf8ebd@yandex.ru> <83y28twahy.fsf@gnu.org> <7af845e0-1f19-61fc-65e0-b23fac3927aa@yandex.ru> <83v93wx5ny.fsf@gnu.org> <83r1ekwfrd.fsf@gnu.org> <871r6ki6aw.fsf@mail.linkov.net> From: Dmitry Gutov Message-ID: Date: Tue, 24 Aug 2021 20:59:40 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <871r6ki6aw.fsf@mail.linkov.net> Content-Type: multipart/mixed; boundary="------------731E6E4EEEFB597FE81CAC05" Content-Language: en-US X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: 50067 Cc: alan@idiocy.org, mattiase@acm.org, homeros.misasa@gmail.com, tkk@misasa.okayama-u.ac.jp, larsi@gnus.org, 50067@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.6 (/) This is a multi-part message in MIME format. --------------731E6E4EEEFB597FE81CAC05 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 23.08.2021 19:02, Juri Linkov wrote: >>> We could add an option, at the very least. >> An option to display the first match right away will be most >> appreciated, thanks. > Like compilation-auto-jump-to-first-error. So we even have a precedent, very good. Could you both check out the attached patch? Together with (setq xref-auto-jump-to-first-definition t) Questions for feedback: 1. Does the new behavior work okay window management-wise (it does occupy +1 window, after all)? 2. Should this setting also extend to other commands like xref-find-references? Asking for personal preferences here. --------------731E6E4EEEFB597FE81CAC05 Content-Type: text/x-patch; charset=UTF-8; name="xref-auto-jump-to-first-definition.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xref-auto-jump-to-first-definition.diff" diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index d004a0c32c..ca055a36af 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -416,6 +416,12 @@ xref-after-update-hook :version "28.1" :package-version '(xref . "1.0.4")) +(defcustom xref-auto-jump-to-first-definition nil + "If non-nil, `xref-find-definitions' always jumps to the first result." + :type 'boolean + :version "28.1" + :package-version '(xref . "1.2.0")) + (defvar xref--marker-ring (make-ring xref-marker-ring-length) "Ring of markers to implement the marker stack.") @@ -1060,19 +1066,30 @@ xref-revert-buffer (error-message-string err) 'face 'error))))))) +(defun xref--auto-jump-first (buf) + (select-window (get-buffer-window buf)) + (goto-char (point-min)) + (xref-next-line-no-show) + (xref-goto-xref)) + (defun xref-show-definitions-buffer (fetcher alist) "Show the definitions list in a regular window. When only one definition found, jump to it right away instead." - (let ((xrefs (funcall fetcher))) + (let ((xrefs (funcall fetcher)) + buf) (cond ((not (cdr xrefs)) (xref-pop-to-location (car xrefs) (assoc-default 'display-action alist))) (t - (xref--show-xref-buffer fetcher - (cons (cons 'fetched-xrefs xrefs) - alist)))))) + (setq buf + (xref--show-xref-buffer fetcher + (cons (cons 'fetched-xrefs xrefs) + alist))) + (when (assoc-default 'auto-jump alist) + (xref--auto-jump-first buf)) + buf)))) (define-obsolete-function-alias 'xref--show-defs-buffer #'xref-show-definitions-buffer "28.1") @@ -1088,7 +1105,8 @@ xref-show-definitions-buffer-at-bottom ;; XXX: Make percentage customizable maybe? (max-height (/ (window-height) 2)) (size-fun (lambda (window) - (fit-window-to-buffer window max-height)))) + (fit-window-to-buffer window max-height))) + buf) (cond ((not (cdr xrefs)) (xref-pop-to-location (car xrefs) @@ -1101,7 +1119,10 @@ xref-show-definitions-buffer-at-bottom (pop-to-buffer (current-buffer) `(display-buffer-in-direction . ((direction . below) (window-height . ,size-fun)))) - (current-buffer)))))) + (setq buf (current-buffer))) + (when (assoc-default 'auto-jump alist) + (xref--auto-jump-first buf)) + buf)))) (define-obsolete-function-alias 'xref--show-defs-buffer-at-bottom #'xref-show-definitions-buffer-at-bottom "28.1") @@ -1236,7 +1257,8 @@ xref--show-defs (xref--push-markers) (funcall xref-show-definitions-function xrefs `((window . ,(selected-window)) - (display-action . ,display-action)))) + (display-action . ,display-action) + (auto-jump . ,xref-auto-jump-to-first-definition)))) (defun xref--push-markers () (unless (region-active-p) (push-mark nil t)) --------------731E6E4EEEFB597FE81CAC05-- From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 24 19:43:49 2021 Received: (at 50067) by debbugs.gnu.org; 24 Aug 2021 23:43:49 +0000 Received: from localhost ([127.0.0.1]:45363 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIg57-0000Ij-3b for submit@debbugs.gnu.org; Tue, 24 Aug 2021 19:43:49 -0400 Received: from mx0a-00602c01.pphosted.com ([205.220.162.67]:27052) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIg53-0000IZ-5s for 50067@debbugs.gnu.org; Tue, 24 Aug 2021 19:43:48 -0400 Received: from pps.filterd (m0238148.ppops.net [127.0.0.1]) by mx0a-00602c01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 17OKvSXe025354; Wed, 25 Aug 2021 08:43:39 +0900 Received: from mlsec.cc.okayama-u.ac.jp (mlsec.cc.okayama-u.ac.jp [150.46.12.254]) by mx0a-00602c01.pphosted.com with ESMTP id 3amfqjsajq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 25 Aug 2021 08:43:38 +0900 Received: from jlsv301.okayama-u.ac.jp (unknown [150.46.12.5]) by mlsec.cc.okayama-u.ac.jp with smtp id 20f6_48dc_2a6edbab_f127_4f61_bf5d_d41f054cd3f1; Wed, 25 Aug 2021 08:43:30 +0900 Received: from localhost (vesta.misasa.okayama-u.ac.jp [150.46.48.154]) by jlsv301.okayama-u.ac.jp (Postfix) with ESMTPSA id 355607600CA; Wed, 25 Aug 2021 08:43:31 +0900 (JST) Date: Wed, 25 Aug 2021 08:43:29 +0900 (JST) Message-Id: <20210825.084329.2103284747365062473.tkk@misasa.okayama-u.ac.jp> To: juri@linkov.net Subject: Re: bug#50067: Context menus From: Tak Kunihiro In-Reply-To: <877dgalpsr.fsf@mail.linkov.net> References: <87wnociu41.fsf@mail.linkov.net> <20210824.191259.1858282353329289005.tkk@misasa.okayama-u.ac.jp> <877dgalpsr.fsf@mail.linkov.net> X-Mailer: Mew version 6.8 on Emacs 26.3 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 11 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 4 Rules triggered EDT_SA_AU_PASS=0, EDT_SA_DN_PASS=0, EDT_SA_TS_PASS=0, RV6963=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6963> : inlines <7226> : streams <1899767> : uri <3310827> X-Proofpoint-ORIG-GUID: JnCrwFzVTSCpVt_60DkVWFXZTJvilkox X-Proofpoint-GUID: JnCrwFzVTSCpVt_60DkVWFXZTJvilkox X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10086 signatures=668682 X-Proofpoint-Spam-Details: rule=outbound_spam_notspam policy=outbound_spam score=0 phishscore=0 impostorscore=0 malwarescore=0 priorityscore=1501 mlxlogscore=999 adultscore=0 lowpriorityscore=0 clxscore=1015 mlxscore=0 spamscore=0 bulkscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2107140000 definitions=main-2108240147 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 50067 Cc: mattiase@acm.org, alan@idiocy.org, 50067@debbugs.gnu.org, larsi@gnus.org, tkk@misasa.okayama-u.ac.jp X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) * flyspell menu It is handy to show 'flyspell-correct-word when click on typo word. However, menu is embedded inside of pre existing 'flyspell-correct-word and it is hard to collect menu. Since popup-menu interface can accept both menu and function with `e', it's good to utilize 'flyspell-correct-word. How about something like below to interrupt evaluation of context-menu-functions in the middle when one of context-menu-functions returns symbol instead of menu? diff --git a/lisp/mouse.el b/lisp/mouse.el index 6332d9fcec..23f0dda3e8 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -308,7 +308,7 @@ context-menu-map (run-hook-wrapped 'context-menu-functions (lambda (fun) (setq menu (funcall fun menu)) - nil)) + (not (keymapp menu)))) (when (functionp context-menu-filter-function) (setq menu (funcall context-menu-filter-function menu))) menu)) Then function something below will pop word choices. (defun context-menu-spell (menu) "Return 'flyspell-correct-word when word under mouse click is incorrect." (let ((faces-at-point (mapcar (lambda (xxx) (overlay-get xxx 'face)) (overlays-at (posn-point (event-start last-input-event)))))) (if (or (member 'flyspell-incorrect faces-at-point) (member 'flyspell-duplicate faces-at-point)) #'flyspell-correct-word menu))) (setq context-menu-functions '(context-menu-spell ;; flyspell context-menu-undo context-menu-region context-menu-local context-menu-minor)) From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 25 10:15:41 2021 Received: (at 50067) by debbugs.gnu.org; 25 Aug 2021 14:15:41 +0000 Received: from localhost ([127.0.0.1]:47254 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mItgr-00032b-In for submit@debbugs.gnu.org; Wed, 25 Aug 2021 10:15:41 -0400 Received: from mail-wm1-f42.google.com ([209.85.128.42]:39670) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mItgo-00032M-J6 for 50067@debbugs.gnu.org; Wed, 25 Aug 2021 10:15:40 -0400 Received: by mail-wm1-f42.google.com with SMTP id f9-20020a05600c1549b029025b0f5d8c6cso4407691wmg.4 for <50067@debbugs.gnu.org>; Wed, 25 Aug 2021 07:15:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=h14tt5ezkl2fws0rZlj03nax5RTb5SnI1/m8V40C8r8=; b=rWbHH8F4ut58Ky02S8itH4Nv4M17qH3kHUjyQejUePzIyw9H1LIX4k9Piv8OUG5KSU tLdrZJyjx91O4aJOXb1UQu628GsGaAilrZFFAMd2EnfDSvA7oCgNKy1TrrNsp+qBJS4d wPgk++r4fJJmyW4eCi+GFWa3HZDtRSXQmWGUE/fGLYiucbz3ka+8jacFJhDzJ3aW2lSO 6eyXlZNRh6D02JOKqn3MAY5KNRUB8Iy7v9u6qMpJ5BORF2hNFF7Uue8wnM7FqxlP5uTl TqbGdzuTkft9RbFQWug67Lb7eAvcMU8/bNfQDcmqRtz2GCsXmKCIqH6ZjZllJ4sJ6+2g HJ0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:from:to:cc:references:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=h14tt5ezkl2fws0rZlj03nax5RTb5SnI1/m8V40C8r8=; b=MqQ6ICAZqMIBxWR6GJhFAseBid/EOf6NCj4H9FsOalw46v9Yarql5ILLKSn29QRUyx 42HH47PmX8IlE2da5/zb0z2zmpqpPSsHjre1tSk0Uwvnpy6RpVt16/KaoetJgrqbQSXI chvDLNRSdlQq3bO+nmkP+lI65A/octJcSr3iOr+HF7M8ucya4Y8nBl9cgmC3SbwI0Iuu QvI49RVfilAp5OoKXEHy+/MwCtkag2x3E64/bxQx51gv59OJpVkbRc2x73TwsjJbpwGj 1pERyx2qvvqWDjYHni0TpuWN+wVp9DG1IUgstOy6Ki/YkM+aSJ2Wj3BSUPw6Hs1dqF8t 1N0g== X-Gm-Message-State: AOAM533Qv6ENpQWq2+eK/nPxqo+H7sVclh2AmGs/HjAEJFEkvuZX5aWr oxl/SLaqAacqr4rcookl1m307/hx5Zk= X-Google-Smtp-Source: ABdhPJwkOAcIdqEYZIu5RqA42+c2//lsIrq4yZvmD5aXhmb3obZU9R4FZpOlR3bIYFGIyTTPfx9qEw== X-Received: by 2002:a05:600c:414f:: with SMTP id h15mr9634614wmm.66.1629900932591; Wed, 25 Aug 2021 07:15:32 -0700 (PDT) Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id e2sm20016wrq.56.2021.08.25.07.15.29 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 25 Aug 2021 07:15:31 -0700 (PDT) Subject: Re: bug#50067: Context menus From: Dmitry Gutov To: Juri Linkov , Eli Zaretskii References: <83sfz639lh.fsf@gnu.org> <8735r6ppf0.fsf@mail.linkov.net> <83o89u37gh.fsf@gnu.org> <87wnohx5zd.fsf@mail.linkov.net> <831r6p3lzc.fsf@gnu.org> <87o89sh96g.fsf@mail.linkov.net> <837dgg1hdg.fsf@gnu.org> <87mtpcf79p.fsf@mail.linkov.net> <83zgtcyp2k.fsf@gnu.org> <56454B2B-0250-4BC6-BC26-E1C5579ACF49@acm.org> <83eeanyrm5.fsf@gnu.org> <4BC1074D-DE75-4303-8385-B70BAACFCDA0@acm.org> <83czq7youc.fsf@gnu.org> <32ef6b91-107c-d7e5-b103-0ff062bf8ebd@yandex.ru> <83y28twahy.fsf@gnu.org> <7af845e0-1f19-61fc-65e0-b23fac3927aa@yandex.ru> <83v93wx5ny.fsf@gnu.org> <83r1ekwfrd.fsf@gnu.org> <871r6ki6aw.fsf@mail.linkov.net> Message-ID: <66ea2142-4855-e7a2-aa3d-f48283404e03@yandex.ru> Date: Wed, 25 Aug 2021 17:15:28 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: 50067 Cc: alan@idiocy.org, mattiase@acm.org, homeros.misasa@gmail.com, tkk@misasa.okayama-u.ac.jp, larsi@gnus.org, 50067@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.6 (/) On 24.08.2021 20:59, Dmitry Gutov wrote: > > Together with (setq xref-auto-jump-to-first-definition t) > > Questions for feedback: > > 1. Does the new behavior work okay window management-wise (it does > occupy +1 window, after all)? > > 2. Should this setting also extend to other commands like > xref-find-references? Asking for personal preferences here. Eli? From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 25 12:00:39 2021 Received: (at 50067) by debbugs.gnu.org; 25 Aug 2021 16:00:40 +0000 Received: from localhost ([127.0.0.1]:47394 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIvKM-0003hA-P2 for submit@debbugs.gnu.org; Wed, 25 Aug 2021 12:00:39 -0400 Received: from eggs.gnu.org ([209.51.188.92]:46134) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIvKL-0003gy-93 for 50067@debbugs.gnu.org; Wed, 25 Aug 2021 12:00:34 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:52052) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mIvKA-0003KS-Ft; Wed, 25 Aug 2021 12:00:22 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2546 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 1mIvJs-0004k1-J8; Wed, 25 Aug 2021 12:00:10 -0400 Date: Wed, 25 Aug 2021 18:59:59 +0300 Message-Id: <83a6l5v7k0.fsf@gnu.org> From: Eli Zaretskii To: Dmitry Gutov In-Reply-To: <66ea2142-4855-e7a2-aa3d-f48283404e03@yandex.ru> (message from Dmitry Gutov on Wed, 25 Aug 2021 17:15:28 +0300) Subject: Re: bug#50067: Context menus References: <83sfz639lh.fsf@gnu.org> <8735r6ppf0.fsf@mail.linkov.net> <83o89u37gh.fsf@gnu.org> <87wnohx5zd.fsf@mail.linkov.net> <831r6p3lzc.fsf@gnu.org> <87o89sh96g.fsf@mail.linkov.net> <837dgg1hdg.fsf@gnu.org> <87mtpcf79p.fsf@mail.linkov.net> <83zgtcyp2k.fsf@gnu.org> <56454B2B-0250-4BC6-BC26-E1C5579ACF49@acm.org> <83eeanyrm5.fsf@gnu.org> <4BC1074D-DE75-4303-8385-B70BAACFCDA0@acm.org> <83czq7youc.fsf@gnu.org> <32ef6b91-107c-d7e5-b103-0ff062bf8ebd@yandex.ru> <83y28twahy.fsf@gnu.org> <7af845e0-1f19-61fc-65e0-b23fac3927aa@yandex.ru> <83v93wx5ny.fsf@gnu.org> <83r1ekwfrd.fsf@gnu.org> <871r6ki6aw.fsf@mail.linkov.net> <66ea2142-4855-e7a2-aa3d-f48283404e03@yandex.ru> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 50067 Cc: alan@idiocy.org, mattiase@acm.org, juri@linkov.net, homeros.misasa@gmail.com, tkk@misasa.okayama-u.ac.jp, larsi@gnus.org, 50067@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Dmitry Gutov > Cc: alan@idiocy.org, mattiase@acm.org, homeros.misasa@gmail.com, > tkk@misasa.okayama-u.ac.jp, larsi@gnus.org, 50067@debbugs.gnu.org > Date: Wed, 25 Aug 2021 17:15:28 +0300 > > On 24.08.2021 20:59, Dmitry Gutov wrote: > > > > Together with (setq xref-auto-jump-to-first-definition t) > > > > Questions for feedback: > > > > 1. Does the new behavior work okay window management-wise (it does > > occupy +1 window, after all)? > > > > 2. Should this setting also extend to other commands like > > xref-find-references? Asking for personal preferences here. > > Eli? Sorry, I didn't yet have time to try this; will do tomorrow. From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 25 13:48:52 2021 Received: (at 50067) by debbugs.gnu.org; 25 Aug 2021 17:48:52 +0000 Received: from localhost ([127.0.0.1]:47562 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIx1A-0002HU-L5 for submit@debbugs.gnu.org; Wed, 25 Aug 2021 13:48:52 -0400 Received: from relay8-d.mail.gandi.net ([217.70.183.201]:60819) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIx16-0002HE-OK for 50067@debbugs.gnu.org; Wed, 25 Aug 2021 13:48:51 -0400 Received: (Authenticated sender: juri@linkov.net) by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id A59341BF208; Wed, 25 Aug 2021 17:48:39 +0000 (UTC) From: Juri Linkov To: Tak Kunihiro Subject: Re: bug#50067: Context menus Organization: LINKOV.NET References: <87wnociu41.fsf@mail.linkov.net> <20210824.191259.1858282353329289005.tkk@misasa.okayama-u.ac.jp> <877dgalpsr.fsf@mail.linkov.net> <20210825.084329.2103284747365062473.tkk@misasa.okayama-u.ac.jp> Date: Wed, 25 Aug 2021 20:45:20 +0300 In-Reply-To: <20210825.084329.2103284747365062473.tkk@misasa.okayama-u.ac.jp> (Tak Kunihiro's message of "Wed, 25 Aug 2021 08:43:29 +0900 (JST)") Message-ID: <87v93ts9jd.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 50067 Cc: 50067@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > * flyspell menu > > It is handy to show 'flyspell-correct-word when click on typo word. > However, menu is embedded inside of pre existing > 'flyspell-correct-word and it is hard to collect menu. Since > popup-menu interface can accept both menu and function with `e', it's > good to utilize 'flyspell-correct-word. > > How about something like below to interrupt evaluation of > context-menu-functions in the middle when one of > context-menu-functions returns symbol instead of menu? Thanks, adapting flyspell to use the context menu is our next priority. But it seems interrupting evaluation is too hackish solution, and it still uses x-popup-menu. Would it be possible for flyspell to put its context function to the end of context-menu-functions, and then replace all previously added menus with own menu that contains word corrections? From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 26 02:18:36 2021 Received: (at 50067) by debbugs.gnu.org; 26 Aug 2021 06:18:36 +0000 Received: from localhost ([127.0.0.1]:48187 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mJ8ih-0008JL-Te for submit@debbugs.gnu.org; Thu, 26 Aug 2021 02:18:36 -0400 Received: from relay10.mail.gandi.net ([217.70.178.230]:58509) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mJ8if-0008J6-IB for 50067@debbugs.gnu.org; Thu, 26 Aug 2021 02:18:34 -0400 Received: (Authenticated sender: juri@linkov.net) by relay10.mail.gandi.net (Postfix) with ESMTPSA id 4C08224000A; Thu, 26 Aug 2021 06:18:20 +0000 (UTC) From: Juri Linkov To: Tak Kunihiro Subject: Re: bug#50067: Context menus References: <87wnociu41.fsf@mail.linkov.net> <20210824.191259.1858282353329289005.tkk@misasa.okayama-u.ac.jp> <877dgalpsr.fsf@mail.linkov.net> <20210825.084329.2103284747365062473.tkk@misasa.okayama-u.ac.jp> <87v93ts9jd.fsf@mail.linkov.net> Date: Thu, 26 Aug 2021 09:13:10 +0300 In-Reply-To: <87v93ts9jd.fsf@mail.linkov.net> (Juri Linkov's message of "Wed, 25 Aug 2021 20:45:20 +0300") Message-ID: <87a6l47mxr.fsf@linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 50067 Cc: 50067@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain >> * flyspell menu >> >> It is handy to show 'flyspell-correct-word when click on typo word. >> However, menu is embedded inside of pre existing >> 'flyspell-correct-word and it is hard to collect menu. Since >> popup-menu interface can accept both menu and function with `e', it's >> good to utilize 'flyspell-correct-word. >> >> How about something like below to interrupt evaluation of >> context-menu-functions in the middle when one of >> context-menu-functions returns symbol instead of menu? > > Thanks, adapting flyspell to use the context menu is our next priority. > But it seems interrupting evaluation is too hackish solution, and it still > uses x-popup-menu. Would it be possible for flyspell to put its context > function to the end of context-menu-functions, and then replace all > previously added menus with own menu that contains word corrections? Here is the first step that adds support for overlay-local context-menu, and removes the recently added 'flyspell-use-mouse-3-for-menu'. But 'flyspell-context-menu' still returns 'flyspell-correct-word'. I invite you or anyone else to refactor 'flyspell-correct-word' and related functions to return a keymap menu where every menu item is bound to a function that calls flyspell-do-correct with an argument that is a correct word. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=flyspell-context-menu.patch diff --git a/doc/emacs/fixit.texi b/doc/emacs/fixit.texi index b558ebc3fd..85cdbff5fa 100644 --- a/doc/emacs/fixit.texi +++ b/doc/emacs/fixit.texi @@ -462,10 +462,9 @@ Spelling When Flyspell mode highlights a word as misspelled, you can click on it with @kbd{mouse-2} (@code{flyspell-correct-word}) to display a menu of possible corrections and actions. If you want this menu on -@kbd{mouse-3} instead, customize the variable -@code{flyspell-use-mouse-3-for-menu}. In addition, @kbd{C-.} or -@kbd{@key{ESC}-@key{TAB}} (@code{flyspell-auto-correct-word}) will -propose various successive corrections for the word at point, and +@kbd{mouse-3} instead, enable @code{context-menu-mode}. In addition, +@kbd{C-.} or @kbd{@key{ESC}-@key{TAB}} (@code{flyspell-auto-correct-word}) +will propose various successive corrections for the word at point, and @w{@kbd{C-c $}} (@code{flyspell-correct-word-before-point}) will pop up a menu of possible corrections. Of course, you can always correct the misspelled word by editing it manually in any way you like. diff --git a/etc/NEWS b/etc/NEWS index 04e482364a..a6d9b3a8b8 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -2889,8 +2893,7 @@ like 'flymake-mode-line-error-counter', When Flyspell mode highlights a word as misspelled, you can click on it to display a menu of possible corrections and actions. You can now easily bind this menu to 'down-mouse-3' (usually the right mouse button) -instead of 'mouse-2' (the default) by customizing the new user option -'flyspell-use-mouse-3-for-menu'. +instead of 'mouse-2' (the default) by enabling 'context-menu-mode'. --- *** The current dictionary is now displayed in the minor mode lighter. diff --git a/lisp/mouse.el b/lisp/mouse.el index d137419e02..f52fb3f6ba 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -307,10 +307,15 @@ context-menu-filter-function (defun context-menu-map () "Return composite menu map." (let ((menu (make-sparse-keymap (propertize "Context Menu" 'hide t)))) - (run-hook-wrapped 'context-menu-functions - (lambda (fun) - (setq menu (funcall fun menu)) - nil)) + (let ((fun (mouse-posn-property (event-start last-input-event) + 'context-menu-function))) + (if (functionp fun) + (setq menu (funcall fun menu)) + (run-hook-wrapped 'context-menu-functions + (lambda (fun) + (setq menu (funcall fun menu)) + nil)))) + ;; TODO: remove double separators (when (functionp context-menu-filter-function) (setq menu (funcall context-menu-filter-function menu))) menu)) diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el index 836d889a1c..c05be9655f 100644 --- a/lisp/textmodes/flyspell.el +++ b/lisp/textmodes/flyspell.el @@ -442,22 +442,6 @@ flyspell-mode-map map) "Minor mode keymap for Flyspell mode--for the whole buffer.") -;; correct on mouse 3 -(defun flyspell--set-use-mouse-3-for-menu (var value) - (set-default var value) - (if value - (progn (define-key flyspell-mouse-map [mouse-2] nil) - (define-key flyspell-mouse-map [down-mouse-3] 'flyspell-correct-word)) - (define-key flyspell-mouse-map [mouse-2] 'flyspell-correct-word) - (define-key flyspell-mouse-map [down-mouse-3] nil))) - -(defcustom flyspell-use-mouse-3-for-menu nil - "Non-nil means to bind `mouse-3' to `flyspell-correct-word'. -If this is set, also unbind `mouse-2'." - :type 'boolean - :set 'flyspell--set-use-mouse-3-for-menu - :version "28.1") - ;; dash character machinery (defvar-local flyspell-consider-dash-as-word-delimiter-flag nil "Non-nil means that the `-' char is considered as a word delimiter.") @@ -486,6 +470,10 @@ flyspell-duplicate (defvar flyspell-overlay nil) +(defun flyspell-context-menu (_menu) + "Context menu for `context-menu-mode'." + 'flyspell-correct-word) + ;;*---------------------------------------------------------------------*/ ;;* flyspell-mode ... */ ;;*---------------------------------------------------------------------*/ @@ -537,10 +525,7 @@ flyspell-mode :group 'flyspell (if flyspell-mode (condition-case err - (progn - (when flyspell-use-mouse-3-for-menu - (flyspell--set-use-mouse-3-for-menu 'flyspell-use-mouse-3-for-menu t)) - (flyspell-mode-on (called-interactively-p 'interactive))) + (flyspell-mode-on (called-interactively-p 'interactive)) (error (message "Error enabling Flyspell mode:\n%s" (cdr err)) (flyspell-mode -1))) (flyspell-mode-off))) @@ -656,8 +641,7 @@ flyspell-mode-on show-msg) (let* ((binding (where-is-internal 'flyspell-auto-correct-word nil 'non-ascii)) - (mouse-button (if flyspell-use-mouse-3-for-menu - "Mouse-3" "Mouse-2"))) + (mouse-button (if context-menu-mode "Mouse-3" "Mouse-2"))) (message (format-message "Welcome to Flyspell. Use %s to correct words." (if binding @@ -1820,13 +1804,15 @@ make-flyspell-overlay (overlay-put overlay 'mouse-face mouse-face) (overlay-put overlay 'flyspell-overlay t) (overlay-put overlay 'evaporate t) - (overlay-put overlay 'help-echo (concat (if flyspell-use-mouse-3-for-menu - "mouse-3" - "mouse-2") ": correct word at point")) - ;; If misspelled text has a 'keymap' property, let that remain in - ;; effect for the bindings that flyspell-mouse-map doesn't override. - (set-keymap-parent flyspell-mouse-map (get-char-property beg 'keymap)) - (overlay-put overlay 'keymap flyspell-mouse-map) + (overlay-put overlay 'help-echo + (concat (if context-menu-mode "mouse-3" "mouse-2") + ": correct word at point")) + (if context-menu-mode + (overlay-put overlay 'context-menu-function 'flyspell-context-menu) + ;; If misspelled text has a 'keymap' property, let that remain in + ;; effect for the bindings that flyspell-mouse-map doesn't override. + (set-keymap-parent flyspell-mouse-map (get-char-property beg 'keymap)) + (overlay-put overlay 'keymap flyspell-mouse-map)) (when (eq face 'flyspell-incorrect) (and (stringp flyspell-before-incorrect-word-string) (overlay-put overlay 'before-string --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 26 09:01:44 2021 Received: (at 50067) by debbugs.gnu.org; 26 Aug 2021 13:01:44 +0000 Received: from localhost ([127.0.0.1]:48568 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mJF0l-0008Hi-Be for submit@debbugs.gnu.org; Thu, 26 Aug 2021 09:01:44 -0400 Received: from eggs.gnu.org ([209.51.188.92]:58468) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mJF0k-0008HT-29 for 50067@debbugs.gnu.org; Thu, 26 Aug 2021 09:01:38 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:33022) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mJF0U-00023f-TF; Thu, 26 Aug 2021 09:01:22 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4360 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 1mJF0T-0000MR-Kp; Thu, 26 Aug 2021 09:01:22 -0400 Date: Thu, 26 Aug 2021 16:01:00 +0300 Message-Id: <838s0otl6b.fsf@gnu.org> From: Eli Zaretskii To: Dmitry Gutov In-Reply-To: (message from Dmitry Gutov on Tue, 24 Aug 2021 20:59:40 +0300) Subject: Re: bug#50067: Context menus References: <83sfz639lh.fsf@gnu.org> <8735r6ppf0.fsf@mail.linkov.net> <83o89u37gh.fsf@gnu.org> <87wnohx5zd.fsf@mail.linkov.net> <831r6p3lzc.fsf@gnu.org> <87o89sh96g.fsf@mail.linkov.net> <837dgg1hdg.fsf@gnu.org> <87mtpcf79p.fsf@mail.linkov.net> <83zgtcyp2k.fsf@gnu.org> <56454B2B-0250-4BC6-BC26-E1C5579ACF49@acm.org> <83eeanyrm5.fsf@gnu.org> <4BC1074D-DE75-4303-8385-B70BAACFCDA0@acm.org> <83czq7youc.fsf@gnu.org> <32ef6b91-107c-d7e5-b103-0ff062bf8ebd@yandex.ru> <83y28twahy.fsf@gnu.org> <7af845e0-1f19-61fc-65e0-b23fac3927aa@yandex.ru> <83v93wx5ny.fsf@gnu.org> <83r1ekwfrd.fsf@gnu.org> <871r6ki6aw.fsf@mail.linkov.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 50067 Cc: alan@idiocy.org, mattiase@acm.org, juri@linkov.net, homeros.misasa@gmail.com, tkk@misasa.okayama-u.ac.jp, larsi@gnus.org, 50067@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > Cc: alan@idiocy.org, mattiase@acm.org, homeros.misasa@gmail.com, > tkk@misasa.okayama-u.ac.jp, larsi@gnus.org, 50067@debbugs.gnu.org > From: Dmitry Gutov > Date: Tue, 24 Aug 2021 20:59:40 +0300 > > >> An option to display the first match right away will be most > >> appreciated, thanks. > > Like compilation-auto-jump-to-first-error. > > So we even have a precedent, very good. > > Could you both check out the attached patch? > > Together with (setq xref-auto-jump-to-first-definition t) Thanks, this looks very handy, I will definitely use it. > Questions for feedback: > > 1. Does the new behavior work okay window management-wise (it does > occupy +1 window, after all)? Not sure I understand the question: we pop up an additional window when there are more than one candidate even without this option, so why do you say "+1 window"? Maybe you had some recipe in mind that I didn't try? > 2. Should this setting also extend to other commands like > xref-find-references? Not necessarily. Perhaps xref-auto-jump-to-first-definition should be tri-state, to allow users to request the same with xref-find-references as well? From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 26 17:05:55 2021 Received: (at 50067) by debbugs.gnu.org; 26 Aug 2021 21:05:55 +0000 Received: from localhost ([127.0.0.1]:50618 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mJMZJ-0000XS-OS for submit@debbugs.gnu.org; Thu, 26 Aug 2021 17:05:54 -0400 Received: from mail-wm1-f49.google.com ([209.85.128.49]:43663) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mJMZH-0000XD-UI for 50067@debbugs.gnu.org; Thu, 26 Aug 2021 17:05:48 -0400 Received: by mail-wm1-f49.google.com with SMTP id o39-20020a05600c512700b002e74638b567so3008916wms.2 for <50067@debbugs.gnu.org>; Thu, 26 Aug 2021 14:05:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=ZoBHAjvXHQYO9xcrFSPDdqr2rcvjdgUe/xmPs2/eurI=; b=L5pIx1N4xOnnlgra58YXFEUrETN8XUcRCV5oNtKcU6GSRelt1LpzaTS6uKpwrYvg9l G06m4p3z6AxHJ4WUI6Yr2QEIpKz7dzm5GB+WWFeXQQYN5CslurBq1rYYKB8g3RCEFhKU JxxugSGqberwK1hDYeWaJIYtCPQmYEoc7nFL1R+pCaZXKEglzKB8jAr7tV9DWlAGV0Iq uSLcL6nwgFOGTLKXwAM2E1IzXjIovd0djGtrTUqWvti357ooMdprQgjbtVmpn7abpidB jqzT0N0Ga2uZxrQWPCKeJtA9MYyb6lwr1pfTq5oYRVnv53svxroS2WBjjsrFjRSf1ddQ dBdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=ZoBHAjvXHQYO9xcrFSPDdqr2rcvjdgUe/xmPs2/eurI=; b=EGZLF1r0MgAk+1OU2CTC4pb01tSIHHiwnj5yORR/xCRjumrYkD9CrGW6zYMTx7cL7E MQIS7MUxrnXBbU8VwPenspf+LqQpK/PPEevtYl9DSgl8CZSfH62g5bgbKuBpq8T51qmz RBSfC6QMybxhnQfipggUDjEdVoCySR/p2LlZLwY8STOES1u/Gr3TxFLbWnc0drHDpoVb wp41Zq5tTl1WDczdybrc+e8AYRg1SP5kicuvkpBq8tudRCrusCgqpOWGAcHGU1LECSQH DQuo+kx8gfyHgCiAy2DXDdUuixJg32VQlJAl6MyX+sYijfJ1vuaMgi6kEAoGR5am0N1z kiEg== X-Gm-Message-State: AOAM531bi3ZbHvLp62Fmi6ZOvsXmIJFtoVKlbqWoTGALJhiLZAVOW/bg AS1safoyA5Gx9Oo9goJeVlXLsqr0MWk= X-Google-Smtp-Source: ABdhPJycwaPAf2u7LXvF/XwRru+dKQZmeKQXg3YO8JmFMeVmhO7zt26cFYeAmGJgIHTAcg/SsAZVRQ== X-Received: by 2002:a7b:cc07:: with SMTP id f7mr7961369wmh.145.1630011942059; Thu, 26 Aug 2021 14:05:42 -0700 (PDT) Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id s17sm9490625wmj.12.2021.08.26.14.05.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 26 Aug 2021 14:05:41 -0700 (PDT) Subject: Re: bug#50067: Context menus To: Eli Zaretskii References: <83sfz639lh.fsf@gnu.org> <8735r6ppf0.fsf@mail.linkov.net> <83o89u37gh.fsf@gnu.org> <87wnohx5zd.fsf@mail.linkov.net> <831r6p3lzc.fsf@gnu.org> <87o89sh96g.fsf@mail.linkov.net> <837dgg1hdg.fsf@gnu.org> <87mtpcf79p.fsf@mail.linkov.net> <83zgtcyp2k.fsf@gnu.org> <56454B2B-0250-4BC6-BC26-E1C5579ACF49@acm.org> <83eeanyrm5.fsf@gnu.org> <4BC1074D-DE75-4303-8385-B70BAACFCDA0@acm.org> <83czq7youc.fsf@gnu.org> <32ef6b91-107c-d7e5-b103-0ff062bf8ebd@yandex.ru> <83y28twahy.fsf@gnu.org> <7af845e0-1f19-61fc-65e0-b23fac3927aa@yandex.ru> <83v93wx5ny.fsf@gnu.org> <83r1ekwfrd.fsf@gnu.org> <871r6ki6aw.fsf@mail.linkov.net> <838s0otl6b.fsf@gnu.org> From: Dmitry Gutov Message-ID: <0273902a-1f93-c643-da26-ab314d6d2db4@yandex.ru> Date: Fri, 27 Aug 2021 00:05:39 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <838s0otl6b.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: 50067 Cc: alan@idiocy.org, mattiase@acm.org, juri@linkov.net, homeros.misasa@gmail.com, tkk@misasa.okayama-u.ac.jp, larsi@gnus.org, 50067@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.6 (/) On 26.08.2021 16:01, Eli Zaretskii wrote: >> Cc: alan@idiocy.org, mattiase@acm.org, homeros.misasa@gmail.com, >> tkk@misasa.okayama-u.ac.jp, larsi@gnus.org, 50067@debbugs.gnu.org >> From: Dmitry Gutov >> Date: Tue, 24 Aug 2021 20:59:40 +0300 >> >>>> An option to display the first match right away will be most >>>> appreciated, thanks. >>> Like compilation-auto-jump-to-first-error. >> >> So we even have a precedent, very good. >> >> Could you both check out the attached patch? >> >> Together with (setq xref-auto-jump-to-first-definition t) > > Thanks, this looks very handy, I will definitely use it. Very good. Let's now discuss a couple of minor alterations. We can always go back to this patch if we don't decide on anything better. I think I remember now why it didn't make sense to me to have this behavior OOTB: I think the main goal of the user who calls xref-find-definitions is, usually, to pick one definition they wanted to visit. Which also means having the xref buffer dismissed at the end. With the patch under discussion we automatically jump to the first location. We can even iterate through locations with next-error/previous-error (M-g M-n/M-g M-p). But to close (quit/kill/etc) the list of locations, you have to switch back to its window and press 'q'. Didn't that look like a bother to you? Here's how it could look instead: 1. When you press M-., the first location is "shown", but not jumped to. The focus remains on the Xref window, with point on its first item (the arrow beside it is visible, like you wanted). Location is visible in the other window, and we can either visit it and dismiss the Xref buffer (with 'C-u RET'), simply visit it with 'RET', or look at the other locations with 'n'/'p'. For this to work, the patch will need to change xref--auto-jump-first, swapping + (xref-next-line-no-show) + (xref-goto-xref)) for + (xref-next-line) The new option's name would probably be different too. And you could also use a "transient" show-definitions-function like: (setq xref-show-definitions-function #'xref-show-definitions-buffer-at-bottom) Then you'd only need to press RET in the results buffer to jump and dismiss the results buffer. 2. Simply have point move to the first location in the list (rather than remain on the group name). From there, the user can press 'C-o' to show the location without visiting, or 'RET', or 'C-u RET' like described above. I understand this does not fit your prior workflows, but it does require the least number of button presses in the scenario "go to the first location and dismiss the Xref buffer", especially in combination with the (setq xref-show-definitions-function ...) form above. >> Questions for feedback: >> >> 1. Does the new behavior work okay window management-wise (it does >> occupy +1 window, after all)? > > Not sure I understand the question: we pop up an additional window > when there are more than one candidate even without this option, so > why do you say "+1 window"? Maybe you had some recipe in mind that I > didn't try? It's "+1 window" compared to how 'find-tag' worked/works, which I assume is the target. So it's still not the same behavior. >> 2. Should this setting also extend to other commands like >> xref-find-references? > > Not necessarily. Perhaps xref-auto-jump-to-first-definition should be > tri-state, to allow users to request the same with > xref-find-references as well? Sure. Or we can have two variables, especially if we end up cramming different variations of behavior into them. We can do a lot of things. What would help, is better knowledge about what people *want* to do. From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 26 17:07:47 2021 Received: (at 50067) by debbugs.gnu.org; 26 Aug 2021 21:07:48 +0000 Received: from localhost ([127.0.0.1]:50625 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mJMbD-0000ac-Q9 for submit@debbugs.gnu.org; Thu, 26 Aug 2021 17:07:47 -0400 Received: from mail-wr1-f44.google.com ([209.85.221.44]:43542) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mJMbC-0000aP-BR for 50067@debbugs.gnu.org; Thu, 26 Aug 2021 17:07:46 -0400 Received: by mail-wr1-f44.google.com with SMTP id b6so7078348wrh.10 for <50067@debbugs.gnu.org>; Thu, 26 Aug 2021 14:07:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=eFOq6NUfJ3jD0BAF55kDXcGHtwo+XTURdVX8Y5PVjDU=; b=k8lE0zga323eIQtiyn0ZkDF/O7Inr6T1wUtIH0YkRZG2ApiEeJX7m9j6SzOR5SmKR3 YYdA0192pDVJJoDXAN6/ke8ikOfEa5jxCJQbTU2zWJZtxlAuVJ3+On7+GdHsqQHfyl9I uiBB6o30Wk+2f6uHOCK8bDzc67HwfvCJyoQcphkDY4U9mu8zkwUYVcofmZgKKMlTIVAL cDcTSabZrHt8b5BJQ49fe3BvCfYddiabtukUIaW/C+/92+hb5nQYnTO3M6t4UZAaHjPt V5YkeItWBK5nI1+1MwBpY3ufWien4j9BzGd15JLhXVJ76jotSwMeAn2EaMZ6lmDDlC80 LaUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:from:to:cc:references:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=eFOq6NUfJ3jD0BAF55kDXcGHtwo+XTURdVX8Y5PVjDU=; b=oS7X9kxvzucAtp6Kf2gyyJmHP0HMHAzADU7tYFiF/u3nocPSCDXsZ3QLhyr5VQvqGG dLkoOV+EjT250tvA2WFm83dm2m7Bn6sEx8E8WlvqC3wSGiHBbraRrm28WPgZnmDSN9u/ HWWkI/BfBnlwfOJRu2Mq1fdNkt1cM/gmJl7Z8si5WE9dGbjnO0dYhjWU67jbWgma/hBX bXd4o8+yGCo/h3UBBsEcaJHK5pJKZ2OKqLrnbQb3cEos4gA8NXkM87aYA49bKXG9uG1s zBgYym3pmv2rLaZ3S1yzZghDsGmF9D2UD68SoPVfeGbel/xn3ut42YtSrmPe7gaA5Ths pzZQ== X-Gm-Message-State: AOAM533/Bkv8Kg2cmoTgywdHpSySbQXbrFwEiWHdTJK2gBB74gqBewBJ fq8eykJsUKQ7jv2Wvm0K/qjd1y+/O1k= X-Google-Smtp-Source: ABdhPJwU9oa8N4fgW5mFIrksH+A2wUXCvf3rVykmhRpCOYs4eD+cHWmNCSoIYGDcH3M0Uk1VVX+qZw== X-Received: by 2002:adf:ea4f:: with SMTP id j15mr6209127wrn.421.1630012060624; Thu, 26 Aug 2021 14:07:40 -0700 (PDT) Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id l2sm10549762wmi.1.2021.08.26.14.07.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 26 Aug 2021 14:07:40 -0700 (PDT) Subject: Re: bug#50067: Context menus From: Dmitry Gutov To: Eli Zaretskii References: <83sfz639lh.fsf@gnu.org> <8735r6ppf0.fsf@mail.linkov.net> <83o89u37gh.fsf@gnu.org> <87wnohx5zd.fsf@mail.linkov.net> <831r6p3lzc.fsf@gnu.org> <87o89sh96g.fsf@mail.linkov.net> <837dgg1hdg.fsf@gnu.org> <87mtpcf79p.fsf@mail.linkov.net> <83zgtcyp2k.fsf@gnu.org> <56454B2B-0250-4BC6-BC26-E1C5579ACF49@acm.org> <83eeanyrm5.fsf@gnu.org> <4BC1074D-DE75-4303-8385-B70BAACFCDA0@acm.org> <83czq7youc.fsf@gnu.org> <32ef6b91-107c-d7e5-b103-0ff062bf8ebd@yandex.ru> <83y28twahy.fsf@gnu.org> <7af845e0-1f19-61fc-65e0-b23fac3927aa@yandex.ru> <83v93wx5ny.fsf@gnu.org> <83r1ekwfrd.fsf@gnu.org> <871r6ki6aw.fsf@mail.linkov.net> <838s0otl6b.fsf@gnu.org> <0273902a-1f93-c643-da26-ab314d6d2db4@yandex.ru> Message-ID: <9ae8b63d-75df-8ea2-fd90-f932fea39afb@yandex.ru> Date: Fri, 27 Aug 2021 00:07:37 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <0273902a-1f93-c643-da26-ab314d6d2db4@yandex.ru> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: 50067 Cc: alan@idiocy.org, mattiase@acm.org, juri@linkov.net, homeros.misasa@gmail.com, tkk@misasa.okayama-u.ac.jp, larsi@gnus.org, 50067@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.6 (/) On 27.08.2021 00:05, Dmitry Gutov wrote: > +  (xref-next-line-no-show) > +  (xref-goto-xref)) > > for > > +  (xref-next-line) Sorry, missed extra paren: + (xref-next-line)) From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 27 02:24:04 2021 Received: (at 50067) by debbugs.gnu.org; 27 Aug 2021 06:24:04 +0000 Received: from localhost ([127.0.0.1]:51092 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mJVHK-000435-4m for submit@debbugs.gnu.org; Fri, 27 Aug 2021 02:24:04 -0400 Received: from relay11.mail.gandi.net ([217.70.178.231]:57785) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mJVHH-00042T-O6 for 50067@debbugs.gnu.org; Fri, 27 Aug 2021 02:23:48 -0400 Received: (Authenticated sender: juri@linkov.net) by relay11.mail.gandi.net (Postfix) with ESMTPSA id B2C06100004 for <50067@debbugs.gnu.org>; Fri, 27 Aug 2021 06:23:40 +0000 (UTC) From: Juri Linkov To: 50067@debbugs.gnu.org Subject: Re: bug#50067: Context menus Organization: LINKOV.NET References: <83sfz639lh.fsf@gnu.org> <837dgg1hdg.fsf@gnu.org> <87mtpcf79p.fsf@mail.linkov.net> <83zgtcyp2k.fsf@gnu.org> <56454B2B-0250-4BC6-BC26-E1C5579ACF49@acm.org> <83eeanyrm5.fsf@gnu.org> <4BC1074D-DE75-4303-8385-B70BAACFCDA0@acm.org> <83czq7youc.fsf@gnu.org> <32ef6b91-107c-d7e5-b103-0ff062bf8ebd@yandex.ru> <83y28twahy.fsf@gnu.org> <7af845e0-1f19-61fc-65e0-b23fac3927aa@yandex.ru> <83v93wx5ny.fsf@gnu.org> <83r1ekwfrd.fsf@gnu.org> <871r6ki6aw.fsf@mail.linkov.net> <838s0otl6b.fsf@gnu.org> <0273902a-1f93-c643-da26-ab314d6d2db4@yandex.ru> <9ae8b63d-75df-8ea2-fd90-f932fea39afb@yandex.ru> Date: Fri, 27 Aug 2021 09:13:42 +0300 In-Reply-To: <9ae8b63d-75df-8ea2-fd90-f932fea39afb@yandex.ru> (Dmitry Gutov's message of "Fri, 27 Aug 2021 00:07:37 +0300") Message-ID: <87ilzra2rd.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 50067 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) I clicked mouse-3 on the Flymake mode-line indicator expecting a context menu, but mouse-3 abruptly closed the current buffer. This can be fixed by such patch: diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el index 77a807f21a..cc12fce04a 100644 --- a/lisp/progmodes/flymake.el +++ b/lisp/progmodes/flymake.el @@ -1256,6 +1256,8 @@ flymake--mode-line-title ,(let ((map (make-sparse-keymap))) (define-key map [mode-line down-mouse-1] flymake-menu) + (define-key map [mode-line down-mouse-3] + flymake-menu) (define-key map [mode-line mouse-2] (lambda () (interactive) From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 27 02:25:29 2021 Received: (at 50067) by debbugs.gnu.org; 27 Aug 2021 06:25:29 +0000 Received: from localhost ([127.0.0.1]:51099 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mJVIu-00046C-Rt for submit@debbugs.gnu.org; Fri, 27 Aug 2021 02:25:28 -0400 Received: from relay2-d.mail.gandi.net ([217.70.183.194]:42885) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mJVIs-00045z-II for 50067@debbugs.gnu.org; Fri, 27 Aug 2021 02:25:27 -0400 Received: (Authenticated sender: juri@linkov.net) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id A6C0640008; Fri, 27 Aug 2021 06:25:18 +0000 (UTC) From: Juri Linkov To: Tak Kunihiro Subject: Re: bug#50067: Context menus Organization: LINKOV.NET References: <87wnociu41.fsf@mail.linkov.net> <20210824.191259.1858282353329289005.tkk@misasa.okayama-u.ac.jp> <877dgalpsr.fsf@mail.linkov.net> <20210825.084329.2103284747365062473.tkk@misasa.okayama-u.ac.jp> <87v93ts9jd.fsf@mail.linkov.net> <87a6l47mxr.fsf@linkov.net> Date: Fri, 27 Aug 2021 09:24:43 +0300 In-Reply-To: <87a6l47mxr.fsf@linkov.net> (Juri Linkov's message of "Thu, 26 Aug 2021 09:13:10 +0300") Message-ID: <87h7fb76c4.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 50067 Cc: 50067@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > Here is the first step that adds support for overlay-local context-menu, > and removes the recently added 'flyspell-use-mouse-3-for-menu'. > But 'flyspell-context-menu' still returns 'flyspell-correct-word'. Now pushed. > I invite you or anyone else to refactor 'flyspell-correct-word' and > related functions to return a keymap menu where every menu item > is bound to a function that calls flyspell-do-correct with an argument > that is a correct word. Any help is appreciated to create a menu keymap from misspelled words. From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 27 02:27:25 2021 Received: (at 50067) by debbugs.gnu.org; 27 Aug 2021 06:27:25 +0000 Received: from localhost ([127.0.0.1]:51103 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mJVKh-00048v-5C for submit@debbugs.gnu.org; Fri, 27 Aug 2021 02:27:25 -0400 Received: from eggs.gnu.org ([209.51.188.92]:56662) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mJVKf-00048i-8I for 50067@debbugs.gnu.org; Fri, 27 Aug 2021 02:27:17 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:40358) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mJVKU-0004BH-Hx; Fri, 27 Aug 2021 02:27:06 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1032 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 1mJVKT-0003iK-3Q; Fri, 27 Aug 2021 02:27:06 -0400 Date: Fri, 27 Aug 2021 09:26:45 +0300 Message-Id: <8335qvs8re.fsf@gnu.org> From: Eli Zaretskii To: Dmitry Gutov In-Reply-To: <0273902a-1f93-c643-da26-ab314d6d2db4@yandex.ru> (message from Dmitry Gutov on Fri, 27 Aug 2021 00:05:39 +0300) Subject: Re: bug#50067: Context menus References: <83sfz639lh.fsf@gnu.org> <8735r6ppf0.fsf@mail.linkov.net> <83o89u37gh.fsf@gnu.org> <87wnohx5zd.fsf@mail.linkov.net> <831r6p3lzc.fsf@gnu.org> <87o89sh96g.fsf@mail.linkov.net> <837dgg1hdg.fsf@gnu.org> <87mtpcf79p.fsf@mail.linkov.net> <83zgtcyp2k.fsf@gnu.org> <56454B2B-0250-4BC6-BC26-E1C5579ACF49@acm.org> <83eeanyrm5.fsf@gnu.org> <4BC1074D-DE75-4303-8385-B70BAACFCDA0@acm.org> <83czq7youc.fsf@gnu.org> <32ef6b91-107c-d7e5-b103-0ff062bf8ebd@yandex.ru> <83y28twahy.fsf@gnu.org> <7af845e0-1f19-61fc-65e0-b23fac3927aa@yandex.ru> <83v93wx5ny.fsf@gnu.org> <83r1ekwfrd.fsf@gnu.org> <871r6ki6aw.fsf@mail.linkov.net> <838s0otl6b.fsf@gnu.org> <0273902a-1f93-c643-da26-ab314d6d2db4@yandex.ru> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 50067 Cc: alan@idiocy.org, mattiase@acm.org, juri@linkov.net, homeros.misasa@gmail.com, tkk@misasa.okayama-u.ac.jp, larsi@gnus.org, 50067@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > Cc: juri@linkov.net, alan@idiocy.org, mattiase@acm.org, > homeros.misasa@gmail.com, tkk@misasa.okayama-u.ac.jp, larsi@gnus.org, > 50067@debbugs.gnu.org > From: Dmitry Gutov > Date: Fri, 27 Aug 2021 00:05:39 +0300 > > I think I remember now why it didn't make sense to me to have this > behavior OOTB: I think the main goal of the user who calls > xref-find-definitions is, usually, to pick one definition they wanted to > visit. Which also means having the xref buffer dismissed at the end. That's one use case. Another use case is when the candidates are all related to some issue the user is working on, and therefore leaving the xref buffer displayed for a long time is what they want. > With the patch under discussion we automatically jump to the first > location. We can even iterate through locations with > next-error/previous-error (M-g M-n/M-g M-p). But to close > (quit/kill/etc) the list of locations, you have to switch back to its > window and press 'q'. Didn't that look like a bother to you? No. In my case, I just never bother to dismiss the xref buffer. The window showing it is a small one, and sooner or later the xref buffer gets replaced by *Help* or ChangeLog or one of the other buffers I display at the bottom of the frame. > Here's how it could look instead: > > 1. When you press M-., the first location is "shown", but not jumped to. > The focus remains on the Xref window, with point on its first item (the > arrow beside it is visible, like you wanted). Location is visible in the > other window, and we can either visit it and dismiss the Xref buffer > (with 'C-u RET'), simply visit it with 'RET', or look at the other > locations with 'n'/'p'. This AFAIU corresponds to the situation where the user is not certain which of the candidates is the one he/she wants. I don't see how it fundamentally differs from the original patch, since "M-g M-n" (or "C-x `", which is what I use) isn't less convenient than 'n' followed by "C-x o". It might be more convenient to those who like to dismiss the xref buffer, but (a) I'm not one of them, and (b) one can dismiss it without going into it with "C-x 4 C-o". > And you could also use a "transient" show-definitions-function like: > > (setq xref-show-definitions-function > #'xref-show-definitions-buffer-at-bottom) > > Then you'd only need to press RET in the results buffer to jump and > dismiss the results buffer. Do a lot of people really like to dismiss the xref buffer? In any case, I think questions about this aspect are better answered by someone who does like to dismiss the buffer, because the issue simply doesn't bother me enough to give you any useful input. > 2. Simply have point move to the first location in the list (rather than > remain on the group name). From there, the user can press 'C-o' to show > the location without visiting, or 'RET', or 'C-u RET' like described > above. I understand this does not fit your prior workflows, but it does > require the least number of button presses in the scenario "go to the > first location and dismiss the Xref buffer", especially in combination > with the (setq xref-show-definitions-function ...) form above. That's just a minor change in what we have now. I don't object to such a change, not even by default, but it isn't what we were discussing until now. > >> 1. Does the new behavior work okay window management-wise (it does > >> occupy +1 window, after all)? > > > > Not sure I understand the question: we pop up an additional window > > when there are more than one candidate even without this option, so > > why do you say "+1 window"? Maybe you had some recipe in mind that I > > didn't try? > > It's "+1 window" compared to how 'find-tag' worked/works, which I assume > is the target. No, I think xref is actually an improvement in this department, because it shows the list of candidates instead of letting the user guess how many are there. > >> 2. Should this setting also extend to other commands like > >> xref-find-references? > > > > Not necessarily. Perhaps xref-auto-jump-to-first-definition should be > > tri-state, to allow users to request the same with > > xref-find-references as well? > > Sure. Or we can have two variables, especially if we end up cramming > different variations of behavior into them. > > We can do a lot of things. What would help, is better knowledge about > what people *want* to do. If we don't want to take a guess, I'd suggest leaving the option as it is, affecting only xref-find-definitions, and extend it to other commands as user requests arrive. From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 28 01:18:38 2021 Received: (at 50067) by debbugs.gnu.org; 28 Aug 2021 05:18:39 +0000 Received: from localhost ([127.0.0.1]:53272 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mJqjm-0007FR-PX for submit@debbugs.gnu.org; Sat, 28 Aug 2021 01:18:38 -0400 Received: from mail-pf1-f178.google.com ([209.85.210.178]:39534) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mJqjh-0007F1-UU for 50067@debbugs.gnu.org; Sat, 28 Aug 2021 01:18:38 -0400 Received: by mail-pf1-f178.google.com with SMTP id e16so7105850pfc.6 for <50067@debbugs.gnu.org>; Fri, 27 Aug 2021 22:18:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=Mrw5JlR4T4mPpDGBaYfnaygIzag2oqcqvOstwdCMR8M=; b=bVfsbpMYkJul/wrIbcHYb5oVAsFaDtWKpdXBNdcvrWww6l+eAvFL6u6AN9tjrlYNcD IZq761wG5BzPPkcgErCvO020gVLfna1KL1xFV6BrcpbWIH6t8sl6tLbmgpNEPUe6WjO4 FG2tW7xL/yNtwCD9xC6L9hKHPYQB8yFFOvOzvL8xXfLSlOPFMVBEyyPFc72j7+1RPSpc YyZFaZU47cGXsUl1CD6r92Efyb8Gq+8Lb6o71KFGi9CX8/2Mmr8uO5FI+Y6WNkX8S2k2 9vhyXmN1LFgOWc88lL5v6MQUPDH0Dt8RImncEpQK90QsF1/0h0qcCKlyP+JcCnXrt67u eRwg== 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:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=Mrw5JlR4T4mPpDGBaYfnaygIzag2oqcqvOstwdCMR8M=; b=AobpgSKHy2+uromX9oc/btP9BaqnwFGADkD0R18v0iTjkQqp1zWrCHyc4N0MV5cIiS w8bAhZR/60fb830SZrBtuGKt/kDohbnMeGZ+C9rRUKGksl4W/SgiNGHhyNXUeO1JMvii W4owae/HEYYz53msy1aLNzW75cCwMb7wEXN9E7vLwyAATzoAu8rcOEUb8aU1WYp+q8gh n9270GAefZ7VOinqzanE2GeP/6ioMS37zNR0fcfMK+Q5Vad2w9t2Wf6ThPNPyD6KSx/7 tC7wqgD5JeHHXVu5+XynfE2bTTbxMzl2KNdeu5k4HU2WErFoQpqrGwcwljqM4sUxZbai pzOw== X-Gm-Message-State: AOAM533So0XWdpEPx3dlecaGKiWEUyDN87QHrVQqqsyj9Rxk3sPatfmF L9ezy2a51zBQD5QJHY437MscBRvKmtQ= X-Google-Smtp-Source: ABdhPJzd49QV4nmcA5Xu6Soz3nWYSICLQeRaeGowLDsJDUJJguXkbT216gSmjIE0WnptKlY3DNw0/w== X-Received: by 2002:a63:a4a:: with SMTP id z10mr10824549pgk.329.1630127908022; Fri, 27 Aug 2021 22:18:28 -0700 (PDT) Received: from DreamMini2019.local ([150.46.201.82]) by smtp.gmail.com with ESMTPSA id o2sm8861073pgu.76.2021.08.27.22.18.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Aug 2021 22:18:27 -0700 (PDT) From: Tak Kunihiro X-Google-Original-From: Tak Kunihiro To: Juri Linkov Subject: Re: bug#50067: Context menus References: <87wnociu41.fsf@mail.linkov.net> <20210824.191259.1858282353329289005.tkk@misasa.okayama-u.ac.jp> <877dgalpsr.fsf@mail.linkov.net> <20210825.084329.2103284747365062473.tkk@misasa.okayama-u.ac.jp> <87v93ts9jd.fsf@mail.linkov.net> <87a6l47mxr.fsf@linkov.net> <87h7fb76c4.fsf@mail.linkov.net> Date: Sat, 28 Aug 2021 14:18:24 +0900 In-Reply-To: <87h7fb76c4.fsf@mail.linkov.net> (Juri Linkov's message of "Fri, 27 Aug 2021 09:24:43 +0300") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (darwin) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 50067 Cc: 50067@debbugs.gnu.org, tkk@misasa.okayama-u.ac.jp X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> I invite you or anyone else to refactor 'flyspell-correct-word' and >> related functions to return a keymap menu where every menu item >> is bound to a function that calls flyspell-do-correct with an argument >> that is a correct word. > > Any help is appreciated to create a menu keymap from misspelled words. OK. I understand the task. I will try. From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 28 05:08:35 2021 Received: (at 50067) by debbugs.gnu.org; 28 Aug 2021 09:08:35 +0000 Received: from localhost ([127.0.0.1]:53381 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mJuKI-0000PR-UV for submit@debbugs.gnu.org; Sat, 28 Aug 2021 05:08:35 -0400 Received: from mail-pg1-f182.google.com ([209.85.215.182]:36418) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mJuKF-0000PC-9R for 50067@debbugs.gnu.org; Sat, 28 Aug 2021 05:08:33 -0400 Received: by mail-pg1-f182.google.com with SMTP id t1so8307915pgv.3 for <50067@debbugs.gnu.org>; Sat, 28 Aug 2021 02:08:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to:cc; bh=QWpnY35pZWL4qboAh0XN1Crpwawe1IZRHUob4ypBcWQ=; b=VN/YAQZ6RE5p2pq608EC4VsWvaq+vlFzzRy2WqiED948hWHktvzUxm0pIzspuw26lK pp7nCqlqYFA1ZLvwRmP4pycOOVGLagMSZCSnqMvI0mXVtCK0K6kgD23+iZsy0hDlyP7Z +LkUfA4MQy9/X4zx1EiERfB03gjKguVlbx2RwUXMy8z6pk+WcMzWPJIkmSpVUpMHQsgf NHWNSMIFm58vCpv2baHlNBf4FviCpS97bPL0e5KASJEKiOlxWYt3Wm5K6doLEhNtbIKw uikMIX56XlNP2n77j7NhSd8LxbmLB8pECzbzetdb9M9KshdwUZ3+qpHdMexvyPsSisxu ypYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=QWpnY35pZWL4qboAh0XN1Crpwawe1IZRHUob4ypBcWQ=; b=qXU89Z6zyn8MZtCoMRRS33HT68gMUzuth/ETIJEFzTqi5wf0g0cFLrJFvY8oJq5ZLs e+eW4i8F3Yg8x72V5iZKKygzgDk2lcm12TEubVB7UxE7E0k8apeXaudEX5QVqg5H7BvB 5/52x5BdnBXqmxKRzXHL3uiWpD4Oh6L3LVynHjw7CdDVkhfkgMhlB58rsNmZi84cdOxI uZtPNPbBQKks9FSYtvE0O5P87vn7rjUmh6I1hlXyMNkogPn4Hms6PAAdpPHjEiSGKGCt rul+G5SoqJGI9Kg5gZH9kyd35z1dNcuBW/0vdARX4AIoc3XzgN7q+wF/PDY/ueAzKr40 rROw== X-Gm-Message-State: AOAM531YQQ1Ue1hgQl/yVw4JQLWrcZMXNicf4R/w1eLuM3V5FqeC0k1G wdooGOwiDOdhm5HR4GmcZXDsM+olcLgkVk84+Sc= X-Google-Smtp-Source: ABdhPJzAI4+Er85jHlH+A/6nlqlADrEiN+MYsRCJZXUq++4a2mrwngLkQL9tHcj/C3f0wJhpk3LczdDfOzqy6AnN7Qs= X-Received: by 2002:a62:1593:0:b0:3f1:d6c7:9cca with SMTP id 141-20020a621593000000b003f1d6c79ccamr13169304pfv.39.1630141705227; Sat, 28 Aug 2021 02:08:25 -0700 (PDT) MIME-Version: 1.0 From: Naoya Yamashita Date: Sat, 28 Aug 2021 18:08:39 +0900 Message-ID: Subject: Re: bug#50067: Context menus To: tkk@misasa.okayama-u.ac.jp Content-Type: multipart/alternative; boundary="0000000000004610e605ca9af1eb" X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 50067 Cc: 50067@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) --0000000000004610e605ca9af1eb Content-Type: text/plain; charset="UTF-8" Hi. I'm one of the users of Emacs-jp. Tak introduced us to this thread and it got me interested, I'm sending this Email. This mail thread is huge and I haven't read all of it, so I'm sorry if I misread the context. I've created a context menu for ispell (referencing `context-menu-ffap`). You may find some inspiration from this. (defun context-menu-ispell (menu) "Ispell at point menu." (when t ;; (ffap-guess-file-name-at-point) (define-key menu [ispell-separator] menu-bar-separator) (define-key menu [ispell-at-mouse] '(menu-item "Check spelling of word" ispell-word :help "Check spelling of word under or before the cursor."))) menu) Regards, Naoya. --0000000000004610e605ca9af1eb Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi.=C2=A0 I'm one of the users of Emacs-jp.=C2=A0 Tak = introduced us to this
thread and it got me interested, I'm sending t= his Email.=C2=A0 This
mail thread is huge and I haven't read all of = it, so I'm sorry if
I misread the context.

I've created a= context menu for ispell (referencing `context-menu-ffap`).
You may find= some inspiration from this.

=C2=A0 =C2=A0 (defun context-menu-ispel= l (menu)
=C2=A0 =C2=A0 =C2=A0 "Ispell at point menu."
=C2= =A0 =C2=A0 =C2=A0 (when t ;; (ffap-guess-file-name-at-point)
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 (define-key menu [ispell-separator] menu-bar-separator)=C2=A0 =C2=A0 =C2=A0 =C2=A0 (define-key menu [ispell-at-mouse]
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 '(menu-item "Check spelling of word&qu= ot; ispell-word
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 :help "Check spelling of word under or before the= cursor.")))
=C2=A0 =C2=A0 =C2=A0 menu)

Regards,=
Naoya.

--0000000000004610e605ca9af1eb-- From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 28 15:17:24 2021 Received: (at 50067) by debbugs.gnu.org; 28 Aug 2021 19:17:24 +0000 Received: from localhost ([127.0.0.1]:55019 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mK3pR-00068B-Hm for submit@debbugs.gnu.org; Sat, 28 Aug 2021 15:17:24 -0400 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:57147) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mK3pN-00067u-Kg for 50067@debbugs.gnu.org; Sat, 28 Aug 2021 15:17:19 -0400 Received: (Authenticated sender: juri@linkov.net) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 15422E0004; Sat, 28 Aug 2021 19:17:08 +0000 (UTC) From: Juri Linkov To: Naoya Yamashita Subject: Re: bug#50067: Context menus Organization: LINKOV.NET References: Date: Sat, 28 Aug 2021 21:50:15 +0300 In-Reply-To: (Naoya Yamashita's message of "Sat, 28 Aug 2021 18:08:39 +0900") Message-ID: <87eeado13s.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 50067 Cc: 50067@debbugs.gnu.org, tkk@misasa.okayama-u.ac.jp X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain > Hi. I'm one of the users of Emacs-jp. Tak introduced us to this > thread and it got me interested, I'm sending this Email. This > mail thread is huge and I haven't read all of it, so I'm sorry if > I misread the context. > > I've created a context menu for ispell (referencing `context-menu-ffap`). > You may find some inspiration from this. > > (defun context-menu-ispell (menu) > "Ispell at point menu." > (when t ;; (ffap-guess-file-name-at-point) > (define-key menu [ispell-separator] menu-bar-separator) > (define-key menu [ispell-at-mouse] > '(menu-item "Check spelling of word" ispell-word > :help "Check spelling of word under or before the cursor."))) > menu) Thanks for the suggestion. I think such menus should be added to their respective packages. context-menu-ispell could be added to ispell.el (when flyspell is unavailable). Then dictionary.el could provide own context menu too: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=context-menu-dictionary.patch diff --git a/lisp/net/dictionary.el b/lisp/net/dictionary.el index f33cbaf112..7a84f9978f 100644 --- a/lisp/net/dictionary.el +++ b/lisp/net/dictionary.el @@ -1368,5 +1368,27 @@ global-dictionary-tooltip-mode (if on #'dictionary-tooltip-track-mouse #'ignore)) on)) +(defun dictionary-search-word-at-mouse (event) + (interactive "e") + (let ((word (save-window-excursion + (save-excursion + (mouse-set-point event) + (current-word))))) + (selected-window) + (dictionary-search word))) + +(defun context-menu-dictionary (menu) + "Dictionary word at point menu." + (save-excursion + (mouse-set-point last-input-event) + (when (thing-at-point 'word) + (define-key menu [dictionary-separator] menu-bar-separator) + (define-key menu [dictionary-search-word-at-mouse] + '(menu-item "Dictionary Search" dictionary-search-word-at-mouse + :help "Search the word at mouse click in dictionary")))) + menu) + +(add-hook 'context-menu-functions 'context-menu-dictionary 15) + (provide 'dictionary) ;;; dictionary.el ends here --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 29 22:45:24 2021 Received: (at 50067) by debbugs.gnu.org; 30 Aug 2021 02:45:24 +0000 Received: from localhost ([127.0.0.1]:57877 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mKXIU-0007qJ-Kd for submit@debbugs.gnu.org; Sun, 29 Aug 2021 22:45:24 -0400 Received: from mail-wm1-f52.google.com ([209.85.128.52]:36454) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mKXIS-0007q0-Aa for 50067@debbugs.gnu.org; Sun, 29 Aug 2021 22:45:17 -0400 Received: by mail-wm1-f52.google.com with SMTP id 79-20020a1c0452000000b002e6cf79e572so13633014wme.1 for <50067@debbugs.gnu.org>; Sun, 29 Aug 2021 19:45:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=QiqaxBQ5jI1Rwa2GX0HfPiuqyRbyaTOpEk9j148dXMM=; b=ZNjZZts+smp2z+SCJ+2E+zVGTE+NS93Vdrl4FzXrnodRU+XOI9EdTH4H0cOANkRp/u CT/GzSX0jaumk8PVKpNZyKfd0iqTRTnUfxY7yqm9Fw3g7MpE0XU/JNF8CmUWEu6kT6ja jf6zvpu/GncDyA3XVMzhK8mtj1KvcCBSoRClT8ah86XKK6xuAzZOQCRBUsxYxFDWkt0x n0f3Oa30CzAzdN5XNbR4gc5R+Uhu5VV2hT9LzNXTGk41MZhWDXVvyCRZYvvSgjgwGez6 gKQ6U9rCotIIJaNfjhkc+aopoN0wVC1zn5p7rlJ3jPtWBCb96O5cwWe2LEVTTG4Jupwt n0pw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=QiqaxBQ5jI1Rwa2GX0HfPiuqyRbyaTOpEk9j148dXMM=; b=n9//iezLdrmR3jOZKq0zkmOJhznZmy4UHytWW8L96QvfKxOf3to3AQxE390E0Af2Wx /zWOMw2JS8E7bE1cq3tnYujoYjpkFF3U1p5dq9/oU9koS/BQ1bev2yhJK041UYZ6qaId J3k099qsHwkdL4k9vzulUgEGMtzSsvsOAitVy7A9Nsn9fJsun1vVITuwbbLGZDp/wbUS gIcYZf8TIMaIabtcG4eAGi3BdGLR13F2PeHLhCrUH1gb0UdP0jq5fQRjJIwy/bwQIpfv IapVMTm2twFMwmaB4iNi6qnDe319XbdQroc3Inm+K5dZWpcFok/bpC2a8JPr1S7GV1B4 GaKQ== X-Gm-Message-State: AOAM532JY8qFeIJCbypLSu2lGwKz1sKSqecmXUxgmbLR+3CdrbPrpZdB 50vRNqiXOzH75PVuyhk8YN3XEOdM4+A= X-Google-Smtp-Source: ABdhPJxnSfzD6XJtWM9ZlwpQ+cXionF1KWyE+QHix+ESEMh+F6cXjKYIOnhtSGKxKFp94XsHb7+jFg== X-Received: by 2002:a7b:c041:: with SMTP id u1mr19238785wmc.95.1630291510440; Sun, 29 Aug 2021 19:45:10 -0700 (PDT) Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id l21sm12110481wmh.31.2021.08.29.19.45.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 29 Aug 2021 19:45:09 -0700 (PDT) Subject: Re: bug#50067: Context menus To: Eli Zaretskii References: <83sfz639lh.fsf@gnu.org> <8735r6ppf0.fsf@mail.linkov.net> <83o89u37gh.fsf@gnu.org> <87wnohx5zd.fsf@mail.linkov.net> <831r6p3lzc.fsf@gnu.org> <87o89sh96g.fsf@mail.linkov.net> <837dgg1hdg.fsf@gnu.org> <87mtpcf79p.fsf@mail.linkov.net> <83zgtcyp2k.fsf@gnu.org> <56454B2B-0250-4BC6-BC26-E1C5579ACF49@acm.org> <83eeanyrm5.fsf@gnu.org> <4BC1074D-DE75-4303-8385-B70BAACFCDA0@acm.org> <83czq7youc.fsf@gnu.org> <32ef6b91-107c-d7e5-b103-0ff062bf8ebd@yandex.ru> <83y28twahy.fsf@gnu.org> <7af845e0-1f19-61fc-65e0-b23fac3927aa@yandex.ru> <83v93wx5ny.fsf@gnu.org> <83r1ekwfrd.fsf@gnu.org> <871r6ki6aw.fsf@mail.linkov.net> <838s0otl6b.fsf@gnu.org> <0273902a-1f93-c643-da26-ab314d6d2db4@yandex.ru> <8335qvs8re.fsf@gnu.org> From: Dmitry Gutov Message-ID: Date: Mon, 30 Aug 2021 05:45:07 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <8335qvs8re.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: 50067 Cc: alan@idiocy.org, mattiase@acm.org, juri@linkov.net, homeros.misasa@gmail.com, tkk@misasa.okayama-u.ac.jp, larsi@gnus.org, 50067@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.6 (/) On 27.08.2021 09:26, Eli Zaretskii wrote: >> Cc: juri@linkov.net, alan@idiocy.org, mattiase@acm.org, >> homeros.misasa@gmail.com, tkk@misasa.okayama-u.ac.jp, larsi@gnus.org, >> 50067@debbugs.gnu.org >> From: Dmitry Gutov >> Date: Fri, 27 Aug 2021 00:05:39 +0300 >> >> I think I remember now why it didn't make sense to me to have this >> behavior OOTB: I think the main goal of the user who calls >> xref-find-definitions is, usually, to pick one definition they wanted to >> visit. Which also means having the xref buffer dismissed at the end. > > That's one use case. Another use case is when the candidates are all > related to some issue the user is working on, and therefore leaving > the xref buffer displayed for a long time is what they want. Fair enough. >> With the patch under discussion we automatically jump to the first >> location. We can even iterate through locations with >> next-error/previous-error (M-g M-n/M-g M-p). But to close >> (quit/kill/etc) the list of locations, you have to switch back to its >> window and press 'q'. Didn't that look like a bother to you? > > No. In my case, I just never bother to dismiss the xref buffer. The > window showing it is a small one, and sooner or later the xref buffer > gets replaced by *Help* or ChangeLog or one of the other buffers I > display at the bottom of the frame. I see. This does not correspond to my usage and expectations, but, fingers crossed, this addition will satisfy the needs of other former users of 'find-tag' as well. >> Here's how it could look instead: >> >> 1. When you press M-., the first location is "shown", but not jumped to. >> The focus remains on the Xref window, with point on its first item (the >> arrow beside it is visible, like you wanted). Location is visible in the >> other window, and we can either visit it and dismiss the Xref buffer >> (with 'C-u RET'), simply visit it with 'RET', or look at the other >> locations with 'n'/'p'. > > This AFAIU corresponds to the situation where the user is not certain > which of the candidates is the one he/she wants. I don't see how it > fundamentally differs from the original patch, since "M-g M-n" (or > "C-x `", which is what I use) isn't less convenient than 'n' followed > by "C-x o". It might be more convenient to those who like to dismiss > the xref buffer, but (a) I'm not one of them, and (b) one can dismiss > it without going into it with "C-x 4 C-o". All right. You still prefer the original patch, then? >>>> 1. Does the new behavior work okay window management-wise (it does >>>> occupy +1 window, after all)? >>> >>> Not sure I understand the question: we pop up an additional window >>> when there are more than one candidate even without this option, so >>> why do you say "+1 window"? Maybe you had some recipe in mind that I >>> didn't try? >> >> It's "+1 window" compared to how 'find-tag' worked/works, which I assume >> is the target. > > No, I think xref is actually an improvement in this department, > because it shows the list of candidates instead of letting the user > guess how many are there. Cool. >>>> 2. Should this setting also extend to other commands like >>>> xref-find-references? >>> >>> Not necessarily. Perhaps xref-auto-jump-to-first-definition should be >>> tri-state, to allow users to request the same with >>> xref-find-references as well? >> >> Sure. Or we can have two variables, especially if we end up cramming >> different variations of behavior into them. >> >> We can do a lot of things. What would help, is better knowledge about >> what people *want* to do. > > If we don't want to take a guess, I'd suggest leaving the option as it > is, affecting only xref-find-definitions, and extend it to other > commands as user requests arrive. All right. From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 30 07:57:40 2021 Received: (at 50067) by debbugs.gnu.org; 30 Aug 2021 11:57:40 +0000 Received: from localhost ([127.0.0.1]:58324 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mKfux-000145-CO for submit@debbugs.gnu.org; Mon, 30 Aug 2021 07:57:40 -0400 Received: from eggs.gnu.org ([209.51.188.92]:58400) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mKfuq-00013i-Sc for 50067@debbugs.gnu.org; Mon, 30 Aug 2021 07:57:33 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:43166) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mKfuf-0000cA-M7; Mon, 30 Aug 2021 07:57:17 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3967 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 1mKfuf-0003gL-83; Mon, 30 Aug 2021 07:57:17 -0400 Date: Mon, 30 Aug 2021 14:57:08 +0300 Message-Id: <835yvnkuwb.fsf@gnu.org> From: Eli Zaretskii To: Dmitry Gutov In-Reply-To: (message from Dmitry Gutov on Mon, 30 Aug 2021 05:45:07 +0300) Subject: Re: bug#50067: Context menus References: <83sfz639lh.fsf@gnu.org> <8735r6ppf0.fsf@mail.linkov.net> <83o89u37gh.fsf@gnu.org> <87wnohx5zd.fsf@mail.linkov.net> <831r6p3lzc.fsf@gnu.org> <87o89sh96g.fsf@mail.linkov.net> <837dgg1hdg.fsf@gnu.org> <87mtpcf79p.fsf@mail.linkov.net> <83zgtcyp2k.fsf@gnu.org> <56454B2B-0250-4BC6-BC26-E1C5579ACF49@acm.org> <83eeanyrm5.fsf@gnu.org> <4BC1074D-DE75-4303-8385-B70BAACFCDA0@acm.org> <83czq7youc.fsf@gnu.org> <32ef6b91-107c-d7e5-b103-0ff062bf8ebd@yandex.ru> <83y28twahy.fsf@gnu.org> <7af845e0-1f19-61fc-65e0-b23fac3927aa@yandex.ru> <83v93wx5ny.fsf@gnu.org> <83r1ekwfrd.fsf@gnu.org> <871r6ki6aw.fsf@mail.linkov.net> <838s0otl6b.fsf@gnu.org> <0273902a-1f93-c643-da26-ab314d6d2db4@yandex.ru> <8335qvs8re.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 50067 Cc: alan@idiocy.org, mattiase@acm.org, juri@linkov.net, homeros.misasa@gmail.com, tkk@misasa.okayama-u.ac.jp, larsi@gnus.org, 50067@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: juri@linkov.net, alan@idiocy.org, mattiase@acm.org, > homeros.misasa@gmail.com, tkk@misasa.okayama-u.ac.jp, larsi@gnus.org, > 50067@debbugs.gnu.org > From: Dmitry Gutov > Date: Mon, 30 Aug 2021 05:45:07 +0300 > > All right. You still prefer the original patch, then? Yes, the original patch satisfies my needs, AFAICT. It would be good to hear from Juri as well, though. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 31 03:11:17 2021 Received: (at 50067) by debbugs.gnu.org; 31 Aug 2021 07:11:17 +0000 Received: from localhost ([127.0.0.1]:32788 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mKxvR-0004pq-DP for submit@debbugs.gnu.org; Tue, 31 Aug 2021 03:11:17 -0400 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:44423) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mKxvO-0004pT-HG for 50067@debbugs.gnu.org; Tue, 31 Aug 2021 03:11:16 -0400 Received: (Authenticated sender: juri@linkov.net) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 2308BE0005; Tue, 31 Aug 2021 07:11:03 +0000 (UTC) From: Juri Linkov To: Eli Zaretskii Subject: Re: bug#50067: Context menus Organization: LINKOV.NET References: <83sfz639lh.fsf@gnu.org> <83zgtcyp2k.fsf@gnu.org> <56454B2B-0250-4BC6-BC26-E1C5579ACF49@acm.org> <83eeanyrm5.fsf@gnu.org> <4BC1074D-DE75-4303-8385-B70BAACFCDA0@acm.org> <83czq7youc.fsf@gnu.org> <32ef6b91-107c-d7e5-b103-0ff062bf8ebd@yandex.ru> <83y28twahy.fsf@gnu.org> <7af845e0-1f19-61fc-65e0-b23fac3927aa@yandex.ru> <83v93wx5ny.fsf@gnu.org> <83r1ekwfrd.fsf@gnu.org> <871r6ki6aw.fsf@mail.linkov.net> <838s0otl6b.fsf@gnu.org> <0273902a-1f93-c643-da26-ab314d6d2db4@yandex.ru> <8335qvs8re.fsf@gnu.org> <835yvnkuwb.fsf@gnu.org> Date: Tue, 31 Aug 2021 10:05:55 +0300 In-Reply-To: <835yvnkuwb.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 30 Aug 2021 14:57:08 +0300") Message-ID: <87wno26qlo.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 50067 Cc: alan@idiocy.org, mattiase@acm.org, homeros.misasa@gmail.com, tkk@misasa.okayama-u.ac.jp, Dmitry Gutov , larsi@gnus.org, 50067@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> All right. You still prefer the original patch, then? > > Yes, the original patch satisfies my needs, AFAICT. It would be good > to hear from Juri as well, though. Sorry, I can't find the original patch. This bug#50067 collected so many different things, so it's now hard to find anything. From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 31 08:25:04 2021 Received: (at 50067) by debbugs.gnu.org; 31 Aug 2021 12:25:04 +0000 Received: from localhost ([127.0.0.1]:33236 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mL2p5-0000Di-Sl for submit@debbugs.gnu.org; Tue, 31 Aug 2021 08:25:04 -0400 Received: from mail-wr1-f53.google.com ([209.85.221.53]:40905) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mL2p2-0000D5-CQ for 50067@debbugs.gnu.org; Tue, 31 Aug 2021 08:25:02 -0400 Received: by mail-wr1-f53.google.com with SMTP id t15so21177032wrg.7 for <50067@debbugs.gnu.org>; Tue, 31 Aug 2021 05:25:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=TAAB1XWlPNHB6CyMJkgGpA5rnPIETrz5QVTM0XHN0nU=; b=iC7PI5VNUzS5OAM0yUlWKRqDfbbhMRbrv9e8lii9Sn8qENT5hMzGmV5iVuZUhfEee/ 6iy5grojPzvjxPGw6vlO5N6pzxlRQ3b7O8ZkIwlQ/JVGBW3HuzebB+bYOM0VqoacUyyt xN+e7VvU02xX86OepaEhVS1FvkDwB6oc87cZmu2VeNhvTN5P/YBNYR1wd9+rSJ1pTkHD FrjrDdsX0lfrj7Pu8UpFPb43mBLz49MMWb5rP0zuVEnx9I0ivQ2HTuLxXnCXjKlNP5hD c7Am1MimbcCZrDLs152t/RTJYQqQUPi2klUFeNy+YVZw9TkBJQjF0+jYRGx2Cpl6ZVyY sspA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=TAAB1XWlPNHB6CyMJkgGpA5rnPIETrz5QVTM0XHN0nU=; b=MD5c/XqYnuw3H8xWpmaP1BzsqNVX2JdXYZ1xlS3g/druY2Fz9oNRSEFlICPAyao6bJ Vqf+XdSTZts4CEc74n2XsKP3yGmZ72EyxMeVpKvhCV6izq6xH0guRWZ3zqG+rwWQa3Zy WilOkY8f0MIYDlureJRy26EKwU/WI5Uem5pEOoObLzhf/4ylZKygyPThNAWaCMqtKVhz DZBaDC/bA7xTq7w9PQzyqQ5dWLP5towPDkgwStIfgGEE5mK9dhOeB7wYmF2EayBbX5Gh aJwT0n5/z1PXxlCCebNfpxNXwRV4D5qrB5nlO/JK5b6dXSaCTNDdIiEBl9p2f6K8eL+v nFug== X-Gm-Message-State: AOAM531Vsiv4VWDGSmGbJn/JebnmxATclfqKAwXOQwYkShjtN/Pe9c9E HGYadho6kJ0n7hyy3QMSNr04ClFlxuI= X-Google-Smtp-Source: ABdhPJwx3vZINSD6xY9TqkrFpwMTf4NcmfLjI3zvSaw4knakWw5XtW9RNb7fUC2HC/MZdUzQR0w9Hw== X-Received: by 2002:adf:efc2:: with SMTP id i2mr31482266wrp.94.1630412694508; Tue, 31 Aug 2021 05:24:54 -0700 (PDT) Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id z2sm2453130wma.45.2021.08.31.05.24.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 31 Aug 2021 05:24:53 -0700 (PDT) Subject: Re: bug#50067: Context menus To: Juri Linkov , Eli Zaretskii References: <83sfz639lh.fsf@gnu.org> <83zgtcyp2k.fsf@gnu.org> <56454B2B-0250-4BC6-BC26-E1C5579ACF49@acm.org> <83eeanyrm5.fsf@gnu.org> <4BC1074D-DE75-4303-8385-B70BAACFCDA0@acm.org> <83czq7youc.fsf@gnu.org> <32ef6b91-107c-d7e5-b103-0ff062bf8ebd@yandex.ru> <83y28twahy.fsf@gnu.org> <7af845e0-1f19-61fc-65e0-b23fac3927aa@yandex.ru> <83v93wx5ny.fsf@gnu.org> <83r1ekwfrd.fsf@gnu.org> <871r6ki6aw.fsf@mail.linkov.net> <838s0otl6b.fsf@gnu.org> <0273902a-1f93-c643-da26-ab314d6d2db4@yandex.ru> <8335qvs8re.fsf@gnu.org> <835yvnkuwb.fsf@gnu.org> <87wno26qlo.fsf@mail.linkov.net> From: Dmitry Gutov Message-ID: Date: Tue, 31 Aug 2021 15:24:50 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <87wno26qlo.fsf@mail.linkov.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: 50067 Cc: alan@idiocy.org, mattiase@acm.org, homeros.misasa@gmail.com, tkk@misasa.okayama-u.ac.jp, larsi@gnus.org, 50067@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.6 (/) On 31.08.2021 10:05, Juri Linkov wrote: >>> All right. You still prefer the original patch, then? >> Yes, the original patch satisfies my needs, AFAICT. It would be good >> to hear from Juri as well, though. > Sorry, I can't find the original patch. This bug#50067 collected > so many different things, so it's now hard to find anything. Here it is: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=50067#183 From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 31 12:59:29 2021 Received: (at 50067) by debbugs.gnu.org; 31 Aug 2021 16:59:29 +0000 Received: from localhost ([127.0.0.1]:35327 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mL76b-00081d-Cv for submit@debbugs.gnu.org; Tue, 31 Aug 2021 12:59:29 -0400 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:22915) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mL76V-000819-Gw for 50067@debbugs.gnu.org; Tue, 31 Aug 2021 12:59:23 -0400 Received: (Authenticated sender: juri@linkov.net) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id B291A240006; Tue, 31 Aug 2021 16:59:09 +0000 (UTC) From: Juri Linkov To: Dmitry Gutov Subject: Re: bug#50067: Context menus Organization: LINKOV.NET References: <83sfz639lh.fsf@gnu.org> <56454B2B-0250-4BC6-BC26-E1C5579ACF49@acm.org> <83eeanyrm5.fsf@gnu.org> <4BC1074D-DE75-4303-8385-B70BAACFCDA0@acm.org> <83czq7youc.fsf@gnu.org> <32ef6b91-107c-d7e5-b103-0ff062bf8ebd@yandex.ru> <83y28twahy.fsf@gnu.org> <7af845e0-1f19-61fc-65e0-b23fac3927aa@yandex.ru> <83v93wx5ny.fsf@gnu.org> <83r1ekwfrd.fsf@gnu.org> <871r6ki6aw.fsf@mail.linkov.net> <838s0otl6b.fsf@gnu.org> <0273902a-1f93-c643-da26-ab314d6d2db4@yandex.ru> <8335qvs8re.fsf@gnu.org> <835yvnkuwb.fsf@gnu.org> <87wno26qlo.fsf@mail.linkov.net> Date: Tue, 31 Aug 2021 19:56:36 +0300 In-Reply-To: (Dmitry Gutov's message of "Tue, 31 Aug 2021 15:24:50 +0300") Message-ID: <87fsupr1rv.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 50067 Cc: alan@idiocy.org, mattiase@acm.org, homeros.misasa@gmail.com, tkk@misasa.okayama-u.ac.jp, larsi@gnus.org, 50067@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >>>> All right. You still prefer the original patch, then? >>> Yes, the original patch satisfies my needs, AFAICT. It would be good >>> to hear from Juri as well, though. >> Sorry, I can't find the original patch. This bug#50067 collected >> so many different things, so it's now hard to find anything. > > Here it is: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=50067#183 Oh, I thought there were two patches: the patch above and also the original patch. But it the above is the original patch, then I'd recommend to add more already discussed additions, so the new option could provide at least these choices: 1. 'jump': Jump to the first location by selecting its window; 2. 'show': Show the first item, but keep focus in the Xref window; 3. 'move': Move point to the first item in the Xref window without showing it (maybe this should be the default behavior). To be able to add later a similar variable for xref-find-references, the new variable for xref-find-definitions could be named accordingly with a name that refers to xref-find-definitions, for example, xref-find-definitions-auto-jump. Then later xref-find-references-auto-jump. From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 31 14:05:34 2021 Received: (at 50067) by debbugs.gnu.org; 31 Aug 2021 18:05:34 +0000 Received: from localhost ([127.0.0.1]:35348 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mL88c-0001D1-AB for submit@debbugs.gnu.org; Tue, 31 Aug 2021 14:05:34 -0400 Received: from relay8-d.mail.gandi.net ([217.70.183.201]:47813) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mL88X-0001Cf-Na for 50067@debbugs.gnu.org; Tue, 31 Aug 2021 14:05:33 -0400 Received: (Authenticated sender: juri@linkov.net) by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id 09D9F1BF20D; Tue, 31 Aug 2021 18:05:19 +0000 (UTC) From: Juri Linkov To: Tak Kunihiro Subject: Re: bug#50067: Context menus References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@acm.org> <87v942pvcj.fsf@mail.linkov.net> <004A628A-99CC-4C62-8AE2-921C4C38D42A@acm.org> <87h7fkh8z8.fsf@mail.linkov.net> <060413B6-E0EF-491D-986F-3988C255729F@misasa.okayama-u.ac.jp> <87lf4tews5.fsf@mail.linkov.net> <00A9BE5A-D661-42AF-A65B-3B80C7428121@misasa.okayama-u.ac.jp> <87wnociu41.fsf@mail.linkov.net> Date: Tue, 31 Aug 2021 20:37:54 +0300 In-Reply-To: <87wnociu41.fsf@mail.linkov.net> (Juri Linkov's message of "Mon, 23 Aug 2021 10:24:22 +0300") Message-ID: <87y28hpktx.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 50067 Cc: 50067@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >>>> On paste when there is a region and delete-selection-mode is t, the >>>> region should be replaced by the text. >>> >>> Please explain how the region should be replaced by the text, >>> when mouse-yank-at-click or mouse-yank-primary is used >>> to paste where the mouse is clicked. Should it delete the region >>> and paste where mouse is clicked on another part of the buffer? >>> What if the mouse is clicked in another window? >> >> When there is a region and yank text by `C-y’, the text would >> be replaced. >> >> I think when there is a region and point in on region, region >> should be replaced by text. No? > > mouse-yank-at-click is intended to paste where you click. > So when there is a region, and you click mouse-3 at some other position > where you want to paste, and select "Paste" from the context-menu, > it's unclear what to do with the region. It makes no sense > to delete the region, when you paste at the clicked position > outside of the region, but not on the region. > > Please see more in mouse-yank-at-click and mouse-yank-primary > that contain such comment about the need to deactivate the region: > > ;; Without this, confusing things happen upon e.g. inserting into > ;; the middle of an active region. > (when select-active-regions > (let (select-active-regions) > (deactivate-mark))) But maybe still it should delete the region before yanking? I suggest to try these settings: (put 'mouse-yank-primary 'delete-selection 'yank) (put 'mouse-yank-at-click 'delete-selection 'yank) (put 'menu-bar-select-yank 'delete-selection 'yank) Then maybe they should be added to delsel.el. From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 31 14:05:40 2021 Received: (at 50067) by debbugs.gnu.org; 31 Aug 2021 18:05:41 +0000 Received: from localhost ([127.0.0.1]:35352 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mL88i-0001DK-I1 for submit@debbugs.gnu.org; Tue, 31 Aug 2021 14:05:40 -0400 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:34379) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mL88d-0001Cq-11 for 50067@debbugs.gnu.org; Tue, 31 Aug 2021 14:05:36 -0400 Received: (Authenticated sender: juri@linkov.net) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id C443F60002; Tue, 31 Aug 2021 18:05:25 +0000 (UTC) From: Juri Linkov To: Tak Kunihiro Subject: Re: bug#50067: Context menus References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@acm.org> <87v942pvcj.fsf@mail.linkov.net> <004A628A-99CC-4C62-8AE2-921C4C38D42A@acm.org> <87h7fkh8z8.fsf@mail.linkov.net> <060413B6-E0EF-491D-986F-3988C255729F@misasa.okayama-u.ac.jp> <87lf4tews5.fsf@mail.linkov.net> <00A9BE5A-D661-42AF-A65B-3B80C7428121@misasa.okayama-u.ac.jp> Date: Tue, 31 Aug 2021 20:43:36 +0300 In-Reply-To: <00A9BE5A-D661-42AF-A65B-3B80C7428121@misasa.okayama-u.ac.jp> (Tak Kunihiro's message of "Mon, 23 Aug 2021 12:11:27 +0900") Message-ID: <87wno1o5rn.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 50067 Cc: Mattias =?iso-8859-1?Q?Engdeg=E5rd?= , Alan Third , 50067@debbugs.gnu.org, Eli Zaretskii , Lars Ingebrigtsen X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >>> ** no multiple horizontal lines >>> >>> Sometimes I see double lines on the context menu. I think that there is >>> no useful case to have double lines. To allow only one horizontal line >>> would look cool. >> >> Right, double separators should be removed. > > OK. This is not easy to do. Because there are menu-items that use the filter :visible, e.g.: (defun prog-context-menu (menu) (require 'xref) (define-key-after menu [prog-separator] menu-bar-separator 'mark-whole-buffer) (define-key-after menu [xref-find-def] '(menu-item "Find Definition" xref-find-definitions-at-mouse :visible (save-excursion (mouse-set-point last-input-event) (xref-backend-identifier-at-point (xref-find-backend))) :help "Find definition of identifier") 'prog-separator) So it's not known whether the menu-item will be displayed until the menu is displayed. So there is no way to remove a stray separator in the context-menu function that creates the context menu. Maybe such items should be rewritten to avoid the filter :visible, e.g.: (defun prog-context-menu (menu) (require 'xref) (define-key-after menu [prog-separator] menu-bar-separator 'mark-whole-buffer) (when (save-excursion (mouse-set-point last-input-event) (xref-backend-identifier-at-point (xref-find-backend))) (define-key-after menu [xref-find-def] '(menu-item "Find Definition" xref-find-definitions-at-mouse :help "Find definition of identifier") 'prog-separator)) From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 31 14:59:05 2021 Received: (at 50067) by debbugs.gnu.org; 31 Aug 2021 18:59:05 +0000 Received: from localhost ([127.0.0.1]:35395 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mL8yL-0002XZ-6T for submit@debbugs.gnu.org; Tue, 31 Aug 2021 14:59:05 -0400 Received: from eggs.gnu.org ([209.51.188.92]:55088) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mL8yF-0002XE-VT for 50067@debbugs.gnu.org; Tue, 31 Aug 2021 14:59:00 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:49128) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mL8y6-0007Qz-ED; Tue, 31 Aug 2021 14:58:46 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1320 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 1mL8y5-0001r6-QQ; Tue, 31 Aug 2021 14:58:46 -0400 Date: Tue, 31 Aug 2021 21:58:37 +0300 Message-Id: <835yvlsaoy.fsf@gnu.org> From: Eli Zaretskii To: Juri Linkov In-Reply-To: <87wno1o5rn.fsf@mail.linkov.net> (message from Juri Linkov on Tue, 31 Aug 2021 20:43:36 +0300) Subject: Re: bug#50067: Context menus References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@acm.org> <87v942pvcj.fsf@mail.linkov.net> <004A628A-99CC-4C62-8AE2-921C4C38D42A@acm.org> <87h7fkh8z8.fsf@mail.linkov.net> <060413B6-E0EF-491D-986F-3988C255729F@misasa.okayama-u.ac.jp> <87lf4tews5.fsf@mail.linkov.net> <00A9BE5A-D661-42AF-A65B-3B80C7428121@misasa.okayama-u.ac.jp> <87wno1o5rn.fsf@mail.linkov.net> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 50067 Cc: 50067@debbugs.gnu.org, mattiase@acm.org, alan@idiocy.org, tkk@misasa.okayama-u.ac.jp, larsi@gnus.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Juri Linkov > Cc: Alan Third , Mattias Engdegrd > , > Lars Ingebrigtsen , 50067@debbugs.gnu.org, Eli > Zaretskii > Date: Tue, 31 Aug 2021 20:43:36 +0300 > > >>> ** no multiple horizontal lines > >>> > >>> Sometimes I see double lines on the context menu. I think that there is > >>> no useful case to have double lines. To allow only one horizontal line > >>> would look cool. > >> > >> Right, double separators should be removed. > > > > OK. > > This is not easy to do. Because there are menu-items > that use the filter :visible, e.g.: Can I ask why do we need the separators in the context menus? Why not remove them all, unconditionally? From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 31 16:24:00 2021 Received: (at 50067) by debbugs.gnu.org; 31 Aug 2021 20:24:00 +0000 Received: from localhost ([127.0.0.1]:35502 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mLAIW-0000fS-F3 for submit@debbugs.gnu.org; Tue, 31 Aug 2021 16:24:00 -0400 Received: from mail-wr1-f49.google.com ([209.85.221.49]:46660) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mLAIR-0000f5-Ot for 50067@debbugs.gnu.org; Tue, 31 Aug 2021 16:23:55 -0400 Received: by mail-wr1-f49.google.com with SMTP id x6so965524wrv.13 for <50067@debbugs.gnu.org>; Tue, 31 Aug 2021 13:23:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=3RMOjh992Ieo7GoreYRGA4YtB0ljw6UmXNPxZ2Okj8Q=; b=P/ZqzNuD0n0GRIcMjhMrRmsLYvvXDNnR800OJ9X7sI2TiOqMHhJ1SgFVi0AaUp9nx6 SyGOGZx0YHlx5Vwa69AJAsBhItoePvHgoXs43N//aqxoQ84Xio0gx4sAkVvUKJQC8NmG hGtthowsMa4ygvUBQAzjivuCEjRqp000c5SWidqCdD6Ez04Zq6Vo6hJ1VTIHG9E+egC3 Yzh5I35FXoXWcADzqbuDWZvdyDZxQWT1cWlQgKrcC1IxkpH2hHnLlkKNijifJoK2ZYwe 2F6I8xqKWsm/y7uFlqfnIf79Y9k6K1g2ZwFnUnM7Q6IjpcqoGhUl9l6D6VEI0D3qWT1p StlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=3RMOjh992Ieo7GoreYRGA4YtB0ljw6UmXNPxZ2Okj8Q=; b=cPLHJ1BPBjkD/kvBDI0D5zyhfJjMARaozBeCzaC01Da3N4pJBegEfinsnzHM+xtDLa ABuee/7mf2hp3MBrPf2NeZWBxh9wtau5quzU4gDQ5i100jyVf/3pQoSws2CnQZJIsq0G K2aQsSPM+SC9aRNVE/QwRDdw3H0005jXj3ENmLVtDm0JhVswrzgUUWAnf+uyM2h45XrI nRir8NgchBmVs1LV3MeUXt+v84JPc/oCbjvyayN1xOxgfCiC+lBiXz5HnrXXVsPCrnV3 FUh/RBwfvBoxkqVeF6fh9rVRWn91GYoLCeDbRlIrk0Gc+E08psMc9x+ZGxkzSz4haLUK 1mjw== X-Gm-Message-State: AOAM531SCB6ADsooB9/HWy/Ol/KDIGfJ7UhhLBT7/nbigV8iQ+R/ZBYf pA0xJ2Ux1F+LwoQztJa/Ku0xwRvDIOs= X-Google-Smtp-Source: ABdhPJznUM5lwoJU9PPDqijA8KrpEwJKkmZ7qPaEeBqxS7Sk1G5+Ixe86pKK7i/czNQPR7l9CjvD5w== X-Received: by 2002:adf:b741:: with SMTP id n1mr31921777wre.120.1630441425666; Tue, 31 Aug 2021 13:23:45 -0700 (PDT) Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id c2sm19348026wrs.60.2021.08.31.13.23.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 31 Aug 2021 13:23:45 -0700 (PDT) Subject: Re: bug#50067: Context menus To: Juri Linkov References: <83sfz639lh.fsf@gnu.org> <56454B2B-0250-4BC6-BC26-E1C5579ACF49@acm.org> <83eeanyrm5.fsf@gnu.org> <4BC1074D-DE75-4303-8385-B70BAACFCDA0@acm.org> <83czq7youc.fsf@gnu.org> <32ef6b91-107c-d7e5-b103-0ff062bf8ebd@yandex.ru> <83y28twahy.fsf@gnu.org> <7af845e0-1f19-61fc-65e0-b23fac3927aa@yandex.ru> <83v93wx5ny.fsf@gnu.org> <83r1ekwfrd.fsf@gnu.org> <871r6ki6aw.fsf@mail.linkov.net> <838s0otl6b.fsf@gnu.org> <0273902a-1f93-c643-da26-ab314d6d2db4@yandex.ru> <8335qvs8re.fsf@gnu.org> <835yvnkuwb.fsf@gnu.org> <87wno26qlo.fsf@mail.linkov.net> <87fsupr1rv.fsf@mail.linkov.net> From: Dmitry Gutov Message-ID: <3656c47f-49e2-1a90-ce2f-12b8899742aa@yandex.ru> Date: Tue, 31 Aug 2021 23:23:43 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <87fsupr1rv.fsf@mail.linkov.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: 50067 Cc: alan@idiocy.org, mattiase@acm.org, homeros.misasa@gmail.com, tkk@misasa.okayama-u.ac.jp, larsi@gnus.org, 50067@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.6 (/) On 31.08.2021 19:56, Juri Linkov wrote: >>>>> All right. You still prefer the original patch, then? >>>> Yes, the original patch satisfies my needs, AFAICT. It would be good >>>> to hear from Juri as well, though. >>> Sorry, I can't find the original patch. This bug#50067 collected >>> so many different things, so it's now hard to find anything. >> >> Here it is: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=50067#183 > > Oh, I thought there were two patches: the patch above and also > the original patch. But it the above is the original patch, > then I'd recommend to add more already discussed additions, > so the new option could provide at least these choices: > > 1. 'jump': Jump to the first location by selecting its window; > 2. 'show': Show the first item, but keep focus in the Xref window; > 3. 'move': Move point to the first item in the Xref window > without showing it (maybe this should be the default behavior). We can do that. Do you expect to be using more than 1 of these values yourself, or is it just for completeness? Regarding 3 as default, it makes a certain sense, but then you won't be able to iterate through all locations with just 'n'. You'd have to press 'C-o' and then 'n', 'n', 'n'... > To be able to add later a similar variable for xref-find-references, > the new variable for xref-find-definitions could be named accordingly > with a name that refers to xref-find-definitions, for example, > xref-find-definitions-auto-jump. Then later xref-find-references-auto-jump. I think the "other" variable would be called something with the word "xrefs", not "references", and apply to other commands as well, such as xref-find-apropos and project-find-regexp. So the proposed scheme would not quite work. Maybe like this instead? - xref-auto-jump-to-first-definition - xref-auto-jump-to-first-. Or just xref-auto-jump-to-first. From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 01 03:25:44 2021 Received: (at 50067) by debbugs.gnu.org; 1 Sep 2021 07:25:44 +0000 Received: from localhost ([127.0.0.1]:36055 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mLKcy-0002vb-Gx for submit@debbugs.gnu.org; Wed, 01 Sep 2021 03:25:44 -0400 Received: from relay12.mail.gandi.net ([217.70.178.232]:46351) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mLKcw-0002vK-N4 for 50067@debbugs.gnu.org; Wed, 01 Sep 2021 03:25:43 -0400 Received: (Authenticated sender: juri@linkov.net) by relay12.mail.gandi.net (Postfix) with ESMTPSA id F093D200013; Wed, 1 Sep 2021 07:25:32 +0000 (UTC) From: Juri Linkov To: Dmitry Gutov Subject: Re: bug#50067: Context menus Organization: LINKOV.NET References: <83sfz639lh.fsf@gnu.org> <83eeanyrm5.fsf@gnu.org> <4BC1074D-DE75-4303-8385-B70BAACFCDA0@acm.org> <83czq7youc.fsf@gnu.org> <32ef6b91-107c-d7e5-b103-0ff062bf8ebd@yandex.ru> <83y28twahy.fsf@gnu.org> <7af845e0-1f19-61fc-65e0-b23fac3927aa@yandex.ru> <83v93wx5ny.fsf@gnu.org> <83r1ekwfrd.fsf@gnu.org> <871r6ki6aw.fsf@mail.linkov.net> <838s0otl6b.fsf@gnu.org> <0273902a-1f93-c643-da26-ab314d6d2db4@yandex.ru> <8335qvs8re.fsf@gnu.org> <835yvnkuwb.fsf@gnu.org> <87wno26qlo.fsf@mail.linkov.net> <87fsupr1rv.fsf@mail.linkov.net> <3656c47f-49e2-1a90-ce2f-12b8899742aa@yandex.ru> Date: Wed, 01 Sep 2021 10:08:38 +0300 In-Reply-To: <3656c47f-49e2-1a90-ce2f-12b8899742aa@yandex.ru> (Dmitry Gutov's message of "Tue, 31 Aug 2021 23:23:43 +0300") Message-ID: <87czps95tt.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 50067 Cc: alan@idiocy.org, mattiase@acm.org, homeros.misasa@gmail.com, tkk@misasa.okayama-u.ac.jp, larsi@gnus.org, 50067@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> so the new option could provide at least these choices: >> 1. 'jump': Jump to the first location by selecting its window; >> 2. 'show': Show the first item, but keep focus in the Xref window; >> 3. 'move': Move point to the first item in the Xref window >> without showing it (maybe this should be the default behavior). > > We can do that. Do you expect to be using more than 1 of these values > yourself, or is it just for completeness? A good indication that all values are needed is that I still can't decide which to use, so it would be possible to switch to another value when one of them does too much or too little. > Regarding 3 as default, it makes a certain sense, but then you won't be > able to iterate through all locations with just 'n'. You'd have to press > 'C-o' and then 'n', 'n', 'n'... I agree, it should not be the default. >> To be able to add later a similar variable for xref-find-references, >> the new variable for xref-find-definitions could be named accordingly >> with a name that refers to xref-find-definitions, for example, >> xref-find-definitions-auto-jump. Then later xref-find-references-auto-jump. > > I think the "other" variable would be called something with the word > "xrefs", not "references", and apply to other commands as well, such as > xref-find-apropos and project-find-regexp. > > So the proposed scheme would not quite work. Maybe like this instead? > > - xref-auto-jump-to-first-definition > - xref-auto-jump-to-first-. Or just > xref-auto-jump-to-first. grep/compilation already supports the value 'jump' by non-nil 'compilation-auto-jump-to-first-error', and the value 'move' when 'compilation-scroll-output' is customized to 'first-error'. But I think for xref still two separate options are needed xref-auto-jump-to-first-definition for xref-find-definitions, and xref-auto-jump-to-first-xref for other more grep-like xref commands. BTW, I'm testing compilation errors/warnings on xref context menu, and it reposts this warning: prog-mode.el:60:12: Warning: the function `xref-backend-identifier-at-point' is not known to be defined. on this code: (defun prog-context-menu (menu) (require 'xref) (define-key-after menu [prog-separator] menu-bar-separator 'mark-whole-buffer) (when (save-excursion (mouse-set-point last-input-event) (xref-backend-identifier-at-point (xref-find-backend))) (define-key-after menu [xref-find-def] '(menu-item "Find Definition" xref-find-definitions-at-mouse :help "Find definition of identifier") 'prog-separator)) Maybe `xref-backend-identifier-at-point' should be autoloaded? From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 01 03:25:51 2021 Received: (at 50067) by debbugs.gnu.org; 1 Sep 2021 07:25:51 +0000 Received: from localhost ([127.0.0.1]:36058 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mLKd4-0002vu-Q3 for submit@debbugs.gnu.org; Wed, 01 Sep 2021 03:25:50 -0400 Received: from relay9-d.mail.gandi.net ([217.70.183.199]:43681) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mLKd3-0002vU-JZ for 50067@debbugs.gnu.org; Wed, 01 Sep 2021 03:25:50 -0400 Received: (Authenticated sender: juri@linkov.net) by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id EE957FF80E; Wed, 1 Sep 2021 07:25:38 +0000 (UTC) From: Juri Linkov To: Eli Zaretskii Subject: Re: bug#50067: Context menus Organization: LINKOV.NET References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@acm.org> <87v942pvcj.fsf@mail.linkov.net> <004A628A-99CC-4C62-8AE2-921C4C38D42A@acm.org> <87h7fkh8z8.fsf@mail.linkov.net> <060413B6-E0EF-491D-986F-3988C255729F@misasa.okayama-u.ac.jp> <87lf4tews5.fsf@mail.linkov.net> <00A9BE5A-D661-42AF-A65B-3B80C7428121@misasa.okayama-u.ac.jp> <87wno1o5rn.fsf@mail.linkov.net> <835yvlsaoy.fsf@gnu.org> Date: Wed, 01 Sep 2021 10:12:54 +0300 In-Reply-To: <835yvlsaoy.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 31 Aug 2021 21:58:37 +0300") Message-ID: <87o89c7qtx.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 50067 Cc: 50067@debbugs.gnu.org, mattiase@acm.org, alan@idiocy.org, tkk@misasa.okayama-u.ac.jp, larsi@gnus.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> >>> ** no multiple horizontal lines >> >>> >> >>> Sometimes I see double lines on the context menu. I think that there is >> >>> no useful case to have double lines. To allow only one horizontal line >> >>> would look cool. >> >> >> >> Right, double separators should be removed. >> > >> > OK. >> >> This is not easy to do. Because there are menu-items >> that use the filter :visible, e.g.: > > Can I ask why do we need the separators in the context menus? Why not > remove them all, unconditionally? The separators are of great help to provide visual cues for groups of objects. All menus on the menu-bar in Emacs use separators. Anyway, this is implemented now: diff --git a/lisp/mouse.el b/lisp/mouse.el index 7d3ed9a0e4..8ac22a07c9 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -315,7 +315,14 @@ context-menu-map (lambda (fun) (setq menu (funcall fun menu)) nil)))) - ;; TODO: remove double separators + ;; Remove double separators + (let ((l menu)) + (while l + (when (and (equal (cdr-safe (car l)) menu-bar-separator) + (equal (cdr-safe (cadr l)) menu-bar-separator)) + (setcdr l (cddr l))) + (setq l (cdr l)))) + (when (functionp context-menu-filter-function) (setq menu (funcall context-menu-filter-function menu))) menu)) From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 01 15:03:24 2021 Received: (at 50067) by debbugs.gnu.org; 1 Sep 2021 19:03:24 +0000 Received: from localhost ([127.0.0.1]:39013 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mLVW8-00089G-DB for submit@debbugs.gnu.org; Wed, 01 Sep 2021 15:03:24 -0400 Received: from mail-wr1-f46.google.com ([209.85.221.46]:39852) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mLVW6-00088v-Q4 for 50067@debbugs.gnu.org; Wed, 01 Sep 2021 15:03:23 -0400 Received: by mail-wr1-f46.google.com with SMTP id z4so1136917wrr.6 for <50067@debbugs.gnu.org>; Wed, 01 Sep 2021 12:03:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=icV6W6ywvnLhIFEfjWLkBaokg58Klhg84jtdbNtIeNg=; b=af8Bw381lJ8wOLkMyP/pVMQn1SFA1N5aM88yWt+1AbE6vEIA8BZhFW2P/p1AibWnSy NjOaRUIS3zxPfoV5KXjD6t1dzvlAeNRSIJhuI6G2E4Vksc+OrC7JtwGpGHvKn4u9u21J V19is4zT9B+5SrDQkFqqSDsdPirmknd5kBziwn048ltMVEgYV6i4jLO/L3JFLvA6s6kD 7bYAnb0SMpyyve1v/Smb4mAerd3va5HpDpQR4Ppt1lVrZ4Z4pak2ZLoljhiBNr0JnYUv p/Y/9khON6nN6bOfHjOTvaEQP3s6RxXH6zqB3W+kL9qH1WDlQ2pnc0VUW2zDDMC9bL7/ u1vg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=icV6W6ywvnLhIFEfjWLkBaokg58Klhg84jtdbNtIeNg=; b=H46GII3kZ6n5IbkEV1KGenbUDcRUYPXU0QD3PJ1KikqzcczEOipV28bb6P0UQfmM55 /LZk1aVL0iuKihFH+FV3nhwtXQIGs+eYnXZwzkRYWOgr73+5qK8IF6qtslf7Yqi8PSXZ 0aoxSqhCPXdYrv3udM9HTT2WnqFszb3T2RV3rz4O/pMg97Zveu2fIOxA5Y9mhWsYw+AD HPoQRK2gE181+mmXba/uqTKbY9zNcqSGXP3hcvrpzeuyDYx+IKtON6WtV2mZC4oMjJjc SgebpHHtm9C/PH9RNEMezX00aZq6zc5M7JWm1/gUm1Hi0uJdEDtNNPkXVYkNeZif++Hx BKyw== X-Gm-Message-State: AOAM530kJoI1y9MGivguKwhTajW0b4LH5hq0bbkLq8UW/lWqpM9ctyMx jKjxq+IWgCLto+vLl7Fuk9WjGSO6r+o= X-Google-Smtp-Source: ABdhPJxyqkq+opIijj1iIkKCt/OZ5p7o21JJNn6CiyZwh5xjxdJRiENpMOpF0mBSQUocJR10MugLVg== X-Received: by 2002:adf:f4ca:: with SMTP id h10mr960350wrp.351.1630522996821; Wed, 01 Sep 2021 12:03:16 -0700 (PDT) Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id x18sm396869wmj.36.2021.09.01.12.03.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 01 Sep 2021 12:03:16 -0700 (PDT) Subject: Re: bug#50067: Context menus To: Juri Linkov References: <83sfz639lh.fsf@gnu.org> <83eeanyrm5.fsf@gnu.org> <4BC1074D-DE75-4303-8385-B70BAACFCDA0@acm.org> <83czq7youc.fsf@gnu.org> <32ef6b91-107c-d7e5-b103-0ff062bf8ebd@yandex.ru> <83y28twahy.fsf@gnu.org> <7af845e0-1f19-61fc-65e0-b23fac3927aa@yandex.ru> <83v93wx5ny.fsf@gnu.org> <83r1ekwfrd.fsf@gnu.org> <871r6ki6aw.fsf@mail.linkov.net> <838s0otl6b.fsf@gnu.org> <0273902a-1f93-c643-da26-ab314d6d2db4@yandex.ru> <8335qvs8re.fsf@gnu.org> <835yvnkuwb.fsf@gnu.org> <87wno26qlo.fsf@mail.linkov.net> <87fsupr1rv.fsf@mail.linkov.net> <3656c47f-49e2-1a90-ce2f-12b8899742aa@yandex.ru> <87czps95tt.fsf@mail.linkov.net> From: Dmitry Gutov Message-ID: <4e2b37da-eab1-5d23-80d3-629eab6092f9@yandex.ru> Date: Wed, 1 Sep 2021 22:03:13 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <87czps95tt.fsf@mail.linkov.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: 50067 Cc: alan@idiocy.org, mattiase@acm.org, homeros.misasa@gmail.com, tkk@misasa.okayama-u.ac.jp, larsi@gnus.org, 50067@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.6 (/) On 01.09.2021 10:08, Juri Linkov wrote: > BTW, I'm testing compilation errors/warnings on xref context menu, > and it reposts this warning: > > prog-mode.el:60:12: Warning: the function `xref-backend-identifier-at-point' > is not known to be defined. > > on this code: > > (defun prog-context-menu (menu) > (require 'xref) > (define-key-after menu [prog-separator] menu-bar-separator > 'mark-whole-buffer) > (when (save-excursion > (mouse-set-point last-input-event) > (xref-backend-identifier-at-point > (xref-find-backend))) > (define-key-after menu [xref-find-def] > '(menu-item "Find Definition" xref-find-definitions-at-mouse > :help "Find definition of identifier") > 'prog-separator)) > > Maybe `xref-backend-identifier-at-point' should be autoloaded? I don't know. What are the rules? There is no risk to call it before xref.el is loaded because xref-find-backend itself is autoloaded. But the lack of autoloading can cause byte-compilation warnings. They can be dealt with by other means too, though. From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 04 20:55:53 2021 Received: (at 50067) by debbugs.gnu.org; 5 Sep 2021 00:55:53 +0000 Received: from localhost ([127.0.0.1]:48879 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mMgRs-0000jy-Rd for submit@debbugs.gnu.org; Sat, 04 Sep 2021 20:55:53 -0400 Received: from mail-wr1-f49.google.com ([209.85.221.49]:39707) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mMgRr-0000jm-SK for 50067@debbugs.gnu.org; Sat, 04 Sep 2021 20:55:52 -0400 Received: by mail-wr1-f49.google.com with SMTP id z4so4148356wrr.6 for <50067@debbugs.gnu.org>; Sat, 04 Sep 2021 17:55:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=ka/KD+FOj/MkPKzvCeXVh8qaULqLcv89mM7nXGPh2yM=; b=CTE+xg93t6lELUcrAgTN6YSoGfqgw/75Bn/V7KZT70Hl3SsakyFx6m4PtK4DqRtNHY n9OcqKEO++hf6CHfh7YSZh77yNNIeRtKrejK/Ez+kBohxw8Mt/bkwg/9BFOSpIP4kmXf tQ37TgcHon4pITK8/1133aj5sspk4WZ6o2cHiMivwMW/4/EC4qdZbZ6ib/OisgYqEt26 7Cp6pO6ndAXHFcK+e+4N79DOkgnYN3E0Ye116hVp3zp4suhDbqyDEr7sICCYePozHBL5 pWMF0FzkUcxp0GL4q+eq4x8iO3GRBd+qlxgZgDnOiUgI0PVdqDG1ZJfGIuZ4+SWlB60l mO+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=ka/KD+FOj/MkPKzvCeXVh8qaULqLcv89mM7nXGPh2yM=; b=VoPWrmF2qMNm8VngvW9SI+/Ike437ZfmYCwfuccfMFfxBIF0Ouy5a39F7HNdUHqx9V r4shIBTLrPmD91geMyyxwwxMds6TE3T8alxtJY+g9AEqHrSjiO4xwLl6wQvUycqHWAWC 90o+xiOMVMPBWaxrVXI/vnDig5HwVo/QHBH56srqGWS7jbPWwMu1PrGwKAepUpM+f/Ai eIMz/mRMvqzeVMkzvGBLWXdgKqHT3d4/WLQ709k4BN9Ri1l1Ties3Ob21AZ8dIEM/XYo Q6vqLf7j3L0AUEHQtt6Ac9sPzY/O3/HieOmtzSJUaKl7zYk12Al81rn8ZcABXh1jOhaF zY/Q== X-Gm-Message-State: AOAM530aSGgEmcKk3x/cuhknUftUenzm1+3RVVxzXSTJVzLE+HHkkUIQ qeWl2pf1RwI49A2bu2vxXPE3yW7B57o= X-Google-Smtp-Source: ABdhPJwlil8vxHm2fp4ZO/vdRBAzdXcJ8Bu5Hq0mwvMy7TBCznVuIUNglZuhZXc1yJzGmtsh1822vw== X-Received: by 2002:adf:d1c3:: with SMTP id b3mr5981375wrd.286.1630803345864; Sat, 04 Sep 2021 17:55:45 -0700 (PDT) Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id k16sm3565840wrx.87.2021.09.04.17.55.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 04 Sep 2021 17:55:45 -0700 (PDT) Subject: Re: bug#50067: Context menus To: Juri Linkov , Eli Zaretskii References: <83sfz639lh.fsf@gnu.org> <83eeanyrm5.fsf@gnu.org> <4BC1074D-DE75-4303-8385-B70BAACFCDA0@acm.org> <83czq7youc.fsf@gnu.org> <32ef6b91-107c-d7e5-b103-0ff062bf8ebd@yandex.ru> <83y28twahy.fsf@gnu.org> <7af845e0-1f19-61fc-65e0-b23fac3927aa@yandex.ru> <83v93wx5ny.fsf@gnu.org> <83r1ekwfrd.fsf@gnu.org> <871r6ki6aw.fsf@mail.linkov.net> <838s0otl6b.fsf@gnu.org> <0273902a-1f93-c643-da26-ab314d6d2db4@yandex.ru> <8335qvs8re.fsf@gnu.org> <835yvnkuwb.fsf@gnu.org> <87wno26qlo.fsf@mail.linkov.net> <87fsupr1rv.fsf@mail.linkov.net> <3656c47f-49e2-1a90-ce2f-12b8899742aa@yandex.ru> <87czps95tt.fsf@mail.linkov.net> From: Dmitry Gutov Message-ID: Date: Sun, 5 Sep 2021 03:55:43 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <87czps95tt.fsf@mail.linkov.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: 50067 Cc: alan@idiocy.org, mattiase@acm.org, homeros.misasa@gmail.com, tkk@misasa.okayama-u.ac.jp, larsi@gnus.org, 50067@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.6 (/) On 01.09.2021 10:08, Juri Linkov wrote: >>> so the new option could provide at least these choices: >>> 1. 'jump': Jump to the first location by selecting its window; >>> 2. 'show': Show the first item, but keep focus in the Xref window; >>> 3. 'move': Move point to the first item in the Xref window >>> without showing it (maybe this should be the default behavior). >> >> We can do that. Do you expect to be using more than 1 of these values >> yourself, or is it just for completeness? > > A good indication that all values are needed is that I still can't decide > which to use, so it would be possible to switch to another value when > one of them does too much or too little. > >> Regarding 3 as default, it makes a certain sense, but then you won't be >> able to iterate through all locations with just 'n'. You'd have to press >> 'C-o' and then 'n', 'n', 'n'... > > I agree, it should not be the default. > >>> To be able to add later a similar variable for xref-find-references, >>> the new variable for xref-find-definitions could be named accordingly >>> with a name that refers to xref-find-definitions, for example, >>> xref-find-definitions-auto-jump. Then later xref-find-references-auto-jump. >> >> I think the "other" variable would be called something with the word >> "xrefs", not "references", and apply to other commands as well, such as >> xref-find-apropos and project-find-regexp. >> >> So the proposed scheme would not quite work. Maybe like this instead? >> >> - xref-auto-jump-to-first-definition >> - xref-auto-jump-to-first-. Or just >> xref-auto-jump-to-first. > > grep/compilation already supports the value 'jump' by non-nil > 'compilation-auto-jump-to-first-error', and the value 'move' when > 'compilation-scroll-output' is customized to 'first-error'. > > But I think for xref still two separate options are needed > xref-auto-jump-to-first-definition for xref-find-definitions, and > xref-auto-jump-to-first-xref for other more grep-like xref commands. It's now in master: two variables, three methods of behavior for each. Let me know if you see any problems. From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 05 04:37:55 2021 Received: (at 50067) by debbugs.gnu.org; 5 Sep 2021 08:37:56 +0000 Received: from localhost ([127.0.0.1]:49148 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mMnf1-0001qH-Nc for submit@debbugs.gnu.org; Sun, 05 Sep 2021 04:37:55 -0400 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:52003) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mMnf0-0001pv-5C for 50067@debbugs.gnu.org; Sun, 05 Sep 2021 04:37:54 -0400 Received: (Authenticated sender: juri@linkov.net) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id C2997C0004; Sun, 5 Sep 2021 08:37:43 +0000 (UTC) From: Juri Linkov To: Dmitry Gutov Subject: Re: bug#50067: Context menus Organization: LINKOV.NET References: <83sfz639lh.fsf@gnu.org> <83czq7youc.fsf@gnu.org> <32ef6b91-107c-d7e5-b103-0ff062bf8ebd@yandex.ru> <83y28twahy.fsf@gnu.org> <7af845e0-1f19-61fc-65e0-b23fac3927aa@yandex.ru> <83v93wx5ny.fsf@gnu.org> <83r1ekwfrd.fsf@gnu.org> <871r6ki6aw.fsf@mail.linkov.net> <838s0otl6b.fsf@gnu.org> <0273902a-1f93-c643-da26-ab314d6d2db4@yandex.ru> <8335qvs8re.fsf@gnu.org> <835yvnkuwb.fsf@gnu.org> <87wno26qlo.fsf@mail.linkov.net> <87fsupr1rv.fsf@mail.linkov.net> <3656c47f-49e2-1a90-ce2f-12b8899742aa@yandex.ru> <87czps95tt.fsf@mail.linkov.net> Date: Sun, 05 Sep 2021 11:37:00 +0300 In-Reply-To: (Dmitry Gutov's message of "Sun, 5 Sep 2021 03:55:43 +0300") Message-ID: <87zgsrzadv.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 50067 Cc: alan@idiocy.org, mattiase@acm.org, homeros.misasa@gmail.com, tkk@misasa.okayama-u.ac.jp, larsi@gnus.org, 50067@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >>> - xref-auto-jump-to-first-definition >>> - xref-auto-jump-to-first-. Or just >>> xref-auto-jump-to-first. >> grep/compilation already supports the value 'jump' by non-nil >> 'compilation-auto-jump-to-first-error', and the value 'move' when >> 'compilation-scroll-output' is customized to 'first-error'. >> But I think for xref still two separate options are needed >> xref-auto-jump-to-first-definition for xref-find-definitions, and >> xref-auto-jump-to-first-xref for other more grep-like xref commands. > > It's now in master: two variables, three methods of behavior for each. > > Let me know if you see any problems. Thanks, one problem is that defcustoms have no '(const nil :tag' for the default value 'nil'. I don't know what tag to use, maybe "No auto-jump". There were other problems so that it was easier to just push the fix :) From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 05 15:25:39 2021 Received: (at 50067) by debbugs.gnu.org; 5 Sep 2021 19:25:39 +0000 Received: from localhost ([127.0.0.1]:51056 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mMxlr-0003ig-IH for submit@debbugs.gnu.org; Sun, 05 Sep 2021 15:25:39 -0400 Received: from mail-wm1-f42.google.com ([209.85.128.42]:43921) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mMxlp-0003iP-5x for 50067@debbugs.gnu.org; Sun, 05 Sep 2021 15:25:38 -0400 Received: by mail-wm1-f42.google.com with SMTP id o39-20020a05600c512700b002e74638b567so3304362wms.2 for <50067@debbugs.gnu.org>; Sun, 05 Sep 2021 12:25:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=P0Oj5KlFMeJ6puqzOVYBGnYG8zLZxBc3oi736CgXW5M=; b=Jx6PwKWKRlV/r5XNmEOc1/OZO+Le6xHBF6q9yOG/YatL6zzpqun5gyPhIDMRRxPEl+ TPXLknikge26xwEpT36ikS9cMjse9z8yEJI3YKlnJDwr/Detcvv8qZ5mM2zXHa4f1AD1 mKrcV8+HQalxT9eZGjN3VG+0u69MpkaJFcnDQAq8Jl7eS4w/Nm1EbYOLhGt9NMdr1GoL nCV55iw1Qg4F9eIH5yD07+9dilGChoDWuS4UycyJqGhFUbd2nK+8d6AelhtWPKBwnx22 s4/dtXX6fHs5VfBWu064Q9ZRCXlP1tedPlyT3eQrWuHta/FbSwQWvI9y057p644ZyWTI iJkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=P0Oj5KlFMeJ6puqzOVYBGnYG8zLZxBc3oi736CgXW5M=; b=sJexCTuiubse08QBiSwkPrnUv4z5xUsLvaSzTToVyAQnaEKaDDlud/Ui+jOsbEywN1 oaxzYw05mj6BJ2DhT2+ndIXcWtDoXDrnyein9DhPvtSe3xdiziREBUo9QeNXQH161iL9 9RnVvCw9opYM80K+T01LFKXTh8TPQujZr31B/HnaCQLNNUYHzy8e/n2BhW81iNoOdHnm 5Y4SY6HTzF5PmnDP3QANlf6Evob2wyayREDgAdoh+ga5iWMRoUBgFwehN7olJxbdAhGF gu72yy497mRQb92KTB9Zk93CowuFA+gbylhvldhEkzfIyvr5JS/+iXU9lSA7aZw4VCL4 XSww== X-Gm-Message-State: AOAM533VXUoVB0YepCpgowJBuOSOGzEEQnpRPDjGYGgqbFzQn3UcRaso iEYuCiBxcQyuGml+euEekbhQAJhRQZ4= X-Google-Smtp-Source: ABdhPJxNh9jMm+gBzlZEta7jxVzbjMHGy8dC49Yg/c3DYCOOiz0iamgqXeNLMdLxfyEOaUe+YwsZ6g== X-Received: by 2002:a05:600c:a05:: with SMTP id z5mr7925476wmp.73.1630869931419; Sun, 05 Sep 2021 12:25:31 -0700 (PDT) Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id c24sm5740259wrb.57.2021.09.05.12.25.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 05 Sep 2021 12:25:31 -0700 (PDT) Subject: Re: bug#50067: Context menus To: Juri Linkov References: <83sfz639lh.fsf@gnu.org> <83czq7youc.fsf@gnu.org> <32ef6b91-107c-d7e5-b103-0ff062bf8ebd@yandex.ru> <83y28twahy.fsf@gnu.org> <7af845e0-1f19-61fc-65e0-b23fac3927aa@yandex.ru> <83v93wx5ny.fsf@gnu.org> <83r1ekwfrd.fsf@gnu.org> <871r6ki6aw.fsf@mail.linkov.net> <838s0otl6b.fsf@gnu.org> <0273902a-1f93-c643-da26-ab314d6d2db4@yandex.ru> <8335qvs8re.fsf@gnu.org> <835yvnkuwb.fsf@gnu.org> <87wno26qlo.fsf@mail.linkov.net> <87fsupr1rv.fsf@mail.linkov.net> <3656c47f-49e2-1a90-ce2f-12b8899742aa@yandex.ru> <87czps95tt.fsf@mail.linkov.net> <87zgsrzadv.fsf@mail.linkov.net> From: Dmitry Gutov Message-ID: <3abb6691-495d-cdc8-57da-d78a7d6adfaa@yandex.ru> Date: Sun, 5 Sep 2021 22:25:29 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <87zgsrzadv.fsf@mail.linkov.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: 50067 Cc: alan@idiocy.org, mattiase@acm.org, homeros.misasa@gmail.com, tkk@misasa.okayama-u.ac.jp, larsi@gnus.org, 50067@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.6 (/) On 05.09.2021 11:37, Juri Linkov wrote: > Thanks, one problem is that defcustoms have no '(const nil :tag' > for the default value 'nil'. I don't know what tag to use, > maybe "No auto-jump". There were other problems so that it was > easier to just push the fix:) Thanks! I really skipped on testing the Customize behavior. From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 27 11:43:03 2021 Received: (at 50067) by debbugs.gnu.org; 27 Sep 2021 15:43:03 +0000 Received: from localhost ([127.0.0.1]:42441 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mUsmU-0003qt-Mg for submit@debbugs.gnu.org; Mon, 27 Sep 2021 11:43:02 -0400 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:34903) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mUsmQ-0003pk-86 for 50067@debbugs.gnu.org; Mon, 27 Sep 2021 11:42:59 -0400 Received: (Authenticated sender: juri@linkov.net) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 7D6511C000F for <50067@debbugs.gnu.org>; Mon, 27 Sep 2021 15:42:50 +0000 (UTC) From: Juri Linkov To: 50067@debbugs.gnu.org Subject: Re: bug#50067: Context menus References: <87pmufb3u0.fsf@mail.linkov.net> Date: Mon, 27 Sep 2021 18:30:23 +0300 In-Reply-To: <87pmufb3u0.fsf@mail.linkov.net> (Juri Linkov's message of "Sun, 15 Aug 2021 11:48:55 +0300") Message-ID: <877df211vs.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 50067 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-=-= Content-Type: text/plain Other programs don't show the keys in context menus. The Human Interface Guidelines say: Show keyboard shortcuts in menu bar menus, not contextual menus. Contextual menus are already shortcuts to task-specific commands; it's redundant to display keyboard shortcuts too. This patch hides all keys from the context menus: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=inhibit-menu-keys.patch diff --git a/lisp/mouse.el b/lisp/mouse.el index 5f3db46516..2d9b1c8f0b 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -314,7 +314,9 @@ context-menu-map it overrides all functions from `context-menu-functions'. At the end, it's possible to modify the final menu by specifying the function `context-menu-filter-function'." - (let* ((menu (make-sparse-keymap (propertize "Context Menu" 'hide t))) + (let* ((menu (make-sparse-keymap (propertize "Context Menu" + 'hide t + 'no-keys t))) (click (or click last-input-event)) (fun (mouse-posn-property (event-start click) 'context-menu-function))) diff --git a/src/keyboard.c b/src/keyboard.c index 462b415c1d..8c90292137 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -7832,16 +7832,20 @@ parse_menu_item (Lisp_Object item, int inmenubar) filter = item; else if (EQ (tem, QCkey_sequence)) { - tem = XCAR (item); - if (SYMBOLP (tem) || STRINGP (tem) || VECTORP (tem)) - /* Be GC protected. Set keyhint to item instead of tem. */ - keyhint = item; - } + if (!inhibit_menu_keys) + { + tem = XCAR (item); + if (SYMBOLP (tem) || STRINGP (tem) || VECTORP (tem)) + /* Be GC protected. Set keyhint to item instead of tem. */ + keyhint = item; + } } else if (EQ (tem, QCkeys)) { - tem = XCAR (item); - if (CONSP (tem) || STRINGP (tem)) - ASET (item_properties, ITEM_PROPERTY_KEYEQ, tem); + if (!inhibit_menu_keys){ + tem = XCAR (item); + if (CONSP (tem) || STRINGP (tem)) + ASET (item_properties, ITEM_PROPERTY_KEYEQ, tem); + } } else if (EQ (tem, QCbutton) && CONSP (XCAR (item))) { @@ -7916,6 +7920,7 @@ parse_menu_item (Lisp_Object item, int inmenubar) if (inmenubar > 0) return 1; + if (!inhibit_menu_keys) { /* This is a command. See if there is an equivalent key binding. */ Lisp_Object keyeq = AREF (item_properties, ITEM_PROPERTY_KEYEQ); AUTO_STRING (space_space, " "); @@ -12495,6 +12500,11 @@ syms_of_keyboard (void) Vwhile_no_input_ignore_events, doc: /* Ignored events from while-no-input. */); + DEFVAR_BOOL ("inhibit-menu-keys", + inhibit_menu_keys, + doc: /* If non-nil, inhibit menu keys. */); + inhibit_menu_keys = false; + pdumper_do_now_and_after_load (syms_of_keyboard_for_pdumper); } diff --git a/src/menu.c b/src/menu.c index 1aafa78c3c..e7e7ecca6a 100644 --- a/src/menu.c +++ b/src/menu.c @@ -1281,13 +1281,18 @@ x_popup_menu_1 (Lisp_Object position, Lisp_Object menu) /* We were given a keymap. Extract menu info from the keymap. */ Lisp_Object prompt; - /* Extract the detailed info to make one pane. */ - keymap_panes (&menu, 1); - /* Search for a string appearing directly as an element of the keymap. That string is the title of the menu. */ prompt = Fkeymap_prompt (keymap); + if (STRINGP (prompt) + && SCHARS (prompt) > 0 + && !NILP (Fget_text_property (make_fixnum (0), Qno_keys, prompt))) + specbind (Qinhibit_menu_keys, Qt); + + /* Extract the detailed info to make one pane. */ + keymap_panes (&menu, 1); + #if defined (USE_GTK) || defined (HAVE_NS) if (STRINGP (prompt) && SCHARS (prompt) > 0 @@ -1583,6 +1588,8 @@ syms_of_menu (void) staticpro (&menu_items); DEFSYM (Qhide, "hide"); + DEFSYM (Qno_keys, "no-keys"); + DEFSYM (Qinhibit_menu_keys, "inhibit-menu-keys"); defsubr (&Sx_popup_menu); defsubr (&Sx_popup_dialog); --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 27 11:43:03 2021 Received: (at 50067) by debbugs.gnu.org; 27 Sep 2021 15:43:03 +0000 Received: from localhost ([127.0.0.1]:42443 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mUsmV-0003r4-0k for submit@debbugs.gnu.org; Mon, 27 Sep 2021 11:43:03 -0400 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:46787) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mUsmS-0003py-KU for 50067@debbugs.gnu.org; Mon, 27 Sep 2021 11:43:00 -0400 Received: (Authenticated sender: juri@linkov.net) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 95A1E1C000B for <50067@debbugs.gnu.org>; Mon, 27 Sep 2021 15:42:54 +0000 (UTC) From: Juri Linkov To: 50067@debbugs.gnu.org Subject: Re: bug#50067: Context menus References: <87pmufb3u0.fsf@mail.linkov.net> Date: Mon, 27 Sep 2021 18:33:15 +0300 In-Reply-To: <87pmufb3u0.fsf@mail.linkov.net> (Juri Linkov's message of "Sun, 15 Aug 2021 11:48:55 +0300") Message-ID: <87mtnyyr5c.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 50067 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) After typing 'C-h k', clicking mouse-3 on a function name, then selecting e.g. "Describe Function", the Help buffer says at that spot is undefined This can be fixed by this patch: diff --git a/lisp/help.el b/lisp/help.el index 8f77167040..b794751eca 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -695,7 +695,7 @@ help--analyze-key (mouse-msg (if (or (memq 'click modifiers) (memq 'down modifiers) (memq 'drag modifiers)) " at that spot" "")) - (defn (key-binding key t))) + (defn (save-excursion (mouse-set-point event) (key-binding key t)))) ;; Handle the case where we faked an entry in "Select and Paste" menu. (when (and (eq defn nil) (stringp (aref key (1- (length key)))) -- From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 27 11:50:27 2021 Received: (at 50067) by debbugs.gnu.org; 27 Sep 2021 15:50:27 +0000 Received: from localhost ([127.0.0.1]:42593 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mUstf-0004Gg-8F for submit@debbugs.gnu.org; Mon, 27 Sep 2021 11:50:27 -0400 Received: from quimby.gnus.org ([95.216.78.240]:35240) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mUstd-0004GN-RE for 50067@debbugs.gnu.org; Mon, 27 Sep 2021 11:50:26 -0400 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=2IlqdrUPZKBzRg8+hwDZ78dk+QQ41T+qGduZ25W7kOc=; b=Bxx3I27k1ntNg4F0CYC/idW9kd x9ojwRJyyC+B9IVkzXmSgIASpfqjCkMh9Z05N+7zpb/o3RQQz9883X2LrVgRZSLl3P1F8PMXifIcU tjUwBB1oBfui88VFkhC5x4FqO07mEABCgZLkOoyr5PCzIAonNVn7cYhosmxrc4WjFpQo=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mUstU-0008SR-P1; Mon, 27 Sep 2021 17:50:19 +0200 From: Lars Ingebrigtsen To: Juri Linkov Subject: Re: bug#50067: Context menus References: <87pmufb3u0.fsf@mail.linkov.net> <877df211vs.fsf@mail.linkov.net> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADFBMVEUpIyRXQkK2jXT/ //8moIRuAAAAAWJLR0QDEQxM8gAAAAd0SU1FB+UJGw8xCMOPWsMAAAFjSURBVCjPTZK9bsIwEMfv IjsSmRgCKp7pkDxFItXMobIReGJIJeqnoEN3OlAVJiolFfgpe3bChxffz3f3vw8ZgE5cwf2gh6Kz OTyCv7EH/4iohx3QxfXqRFYaYKSUJph6wBXAgGCtfcrOiwLUuuqE/EM9ZGRRpcSDl8A9sI0XmKRU SBwWay+dKQritvV56Uj5QK0CxBW79Z/y4g6UIR7But01DKB17g7auO1tGCNX22AAA1y4w6lbAqcp rWuuO+DSmDP2EgwH8c+tB2nK9rZQNPoOIPimz3+TcsLyUw/maJe26YKUMPbs6s5TRbPjMn+/wsde ib7vSbTLVPJd+F2jwF3+lMw+3Z6IQDSxa7Ulz1he4gAUF5UzF53HF+tIEBlqPCEBCUasKpkCGwDZ fF9MILM6ePBLjeCZFOivMJi/8EIHSGT7exBFG0DIv9Zl0DjfQa5eG5fi2ToaPa9xOuMl1Wn/AQ24 Y7feUWh8AAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIxLTA5LTI3VDE1OjQ5OjA3KzAwOjAw5XnD/gAA ACV0RVh0ZGF0ZTptb2RpZnkAMjAyMS0wOS0yN1QxNTo0OTowNyswMDowMJQke0IAAAAASUVORK5C YII= X-Now-Playing: Neil Young's _Archives Vol. II (1): Everybody's Alone (1972 - 1976)_: "L.A. (Story)" Date: Mon, 27 Sep 2021 17:50:15 +0200 In-Reply-To: <877df211vs.fsf@mail.linkov.net> (Juri Linkov's message of "Mon, 27 Sep 2021 18:30:23 +0300") Message-ID: <87zgryggqw.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.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 writes: > Other programs don't show the keys in context menus. > The Human Interface Guidelines say: > > Show keyboard shortcuts in menu bar menus, not contextual menus. > Contextual menus are already shortcu [...] 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: 50067 Cc: 50067@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Juri Linkov writes: > Other programs don't show the keys in context menus. > The Human Interface Guidelines say: > > Show keyboard shortcuts in menu bar menus, not contextual menus. > Contextual menus are already shortcuts to task-specific commands; > it's redundant to display keyboard shortcuts too. I'm not sure I agree with those guidelines -- displaying the key bindings increases the discoverability of those key bindings. (Not using the mouse is more productive in the long term for most people.) -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 27 12:17:19 2021 Received: (at 50067) by debbugs.gnu.org; 27 Sep 2021 16:17:19 +0000 Received: from localhost ([127.0.0.1]:42632 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mUtJe-0005AD-Pa for submit@debbugs.gnu.org; Mon, 27 Sep 2021 12:17:19 -0400 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:35542) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mUtJc-0005A2-ES for 50067@debbugs.gnu.org; Mon, 27 Sep 2021 12:17:17 -0400 Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 18RFvHbv020780; Mon, 27 Sep 2021 16:17:15 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2021-07-09; bh=rMsMk4l+vS2vtimDklPt/E05WUJt2UIXmPmT9JK9ElI=; b=o7jshDkGA3aRIsyTdiu6w0pYFFOQP1vrAHirzuj2onn3cG1YLc3mn81E91Q6ljbtsJmK 9gPpCx8Y1wdYW4kfBUEe0ORNDwpPo7njfDIIKqx4Y/D8gcVrEwDVwbBR/dAgA1J5m4OQ 3LczBHBzC7v4iJgEey5jan0M4DoAuOUIeQhVe91C0AiGyi90lrvIUt6ZyMXp8nx7fKtQ +Ge4qDXVQL9KfKnYVPHw37RWxAJUw88qyOSX2WrqcqJjdXMA//Tr+cKNH5b4nWuXlzuL UzIo9f7wTi05g7fsKMKUudI3dxBDvodMLYwID8i34OksvC+y7Ep5w02dhnOWafY8UdS9 jw== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by mx0b-00069f02.pphosted.com with ESMTP id 3bbeu11mtr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 27 Sep 2021 16:17:15 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 18RGB8XE019858; Mon, 27 Sep 2021 16:17:14 GMT Received: from nam10-mw2-obe.outbound.protection.outlook.com (mail-mw2nam10lp2108.outbound.protection.outlook.com [104.47.55.108]) by aserp3020.oracle.com with ESMTP id 3b9x50n3nj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 27 Sep 2021 16:17:14 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=a4a7dwh6jr0s3RLZ71PK0JUPx6ovesg4B64UGoFdl1VGjZ+w4wzRRy3z/INqVjXKM8aRdVnYgyJ+m9LtBwD5bc3XQVphBytaAF2gbk5Y8UN/zirTzDe+I1mjcRHbAsw0y1CN70EiCDpWuQfA+kk931E2WMpBTFtX4PtOO2F6HvpQqc/cO5yWayCdzYzJmfUdVNE8D+socVhy64+KMACIj3s8coIZu8/299b+774/EE1g7X9DPHDEeebwplvsUn/lflPiqGaRFrj5r/ZFeZzK99Y/zO+8pni/mEm8VGRPHJ9k+wRDX/2o6eS354ZmSupiSEEJpfZ09SwAi+L2VwS1sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=rMsMk4l+vS2vtimDklPt/E05WUJt2UIXmPmT9JK9ElI=; b=aR1BW76XbL6jsgQqf7dUHy5WHVOCHBKJtH6aC68sutYlYcpf1UrQJb9ygsqH4MFKaPmOcVSgLfoatfxI+pvdaviOK2P18Rim6Wk2MfDJfApHnXDEG45FjcW6/n1/YcH8v8dxb/zM7tEUSK8UYZkPLn2zdg75WD1KgxAk2PJwecRjpS7dV/x836rw7JMY19WiO65VDElo6f/hyKxQpWQuIQl0Ku2wGz205zjbhOXtaNY9AK4qP5WNyUv2rGE8OI262nJBR4pnXta8DHzvqT5GdOTZ7s5ntWwOZ/0XOHPe7cQlYHVWcZAsdeWlMOL3GKDb4Z+j3t0FbX4PGacsx5Re6A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=rMsMk4l+vS2vtimDklPt/E05WUJt2UIXmPmT9JK9ElI=; b=OOo4gLxJlY3V3oJ9OgOGzTt4dSIT76o38tFl8n03XE98inF+eF/wlD5e6xkCHpXOtXe9yONzj+DVGSz9HepdXToBm2Bl1aooPNVgZm29mPisWDEsOok3yQaNuknAWNDF0fTo9HU281lnq3CyUvPsubP+scPciGhBqHGmBlwnZ8w= Received: from SJ0PR10MB5488.namprd10.prod.outlook.com (2603:10b6:a03:37e::19) by SJ0PR10MB5661.namprd10.prod.outlook.com (2603:10b6:a03:3da::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.13; Mon, 27 Sep 2021 16:17:12 +0000 Received: from SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::c0bc:7c3a:292f:8a82]) by SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::c0bc:7c3a:292f:8a82%9]) with mapi id 15.20.4544.021; Mon, 27 Sep 2021 16:17:11 +0000 From: Drew Adams To: Lars Ingebrigtsen , Juri Linkov Subject: RE: [External] : bug#50067: Context menus Thread-Topic: [External] : bug#50067: Context menus Thread-Index: AQHXs7fRkwD2Q4rlzUy0oAzYYkS+Pau4DgFw Date: Mon, 27 Sep 2021 16:17:11 +0000 Message-ID: References: <87pmufb3u0.fsf@mail.linkov.net> <877df211vs.fsf@mail.linkov.net> <87zgryggqw.fsf@gnus.org> In-Reply-To: <87zgryggqw.fsf@gnus.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: gnus.org; dkim=none (message not signed) header.d=none;gnus.org; dmarc=none action=none header.from=oracle.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 3aa395c9-143e-4378-4bad-08d981d24319 x-ms-traffictypediagnostic: SJ0PR10MB5661: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Worc/lRbi+q/yhWUnPl6oCR/vvsoeWUqomzkG/pkJktCRuUedIRo5CThBXnnUIETinU3Z0wbtFayvp7w5O/c/yQJP/1kD2lAIipgd0dx3TiR6fwkqPOy863WFOixsKGpf8C4YHL2vKTYeZeNtstGHWmf8gMe+9mEaAWBvRVRtUgs2TdFLfgxYxElXvRH9XX7q7B2A74urdZVLM/n+ItXQjTSZNDTwXxC8RS8XcJ0pD3mBHOf2r71VYK/glRFw0EYQJ/1NY4gGYlCyftiN6CN8qVP0m3QI4kXFdzZ27Xn2EP9XL+6fZ4KI2pXnfOVq80TGE3Oi+RcxMx7E0gGiLHJ9VmQ7iGH0gLVpNCn6pzDKsJO5+bVEHJ3HJ56KXQh5eZFDLihr7EQsKdigeJ7zAdrWNmC5fkRQNZ5XfI7W+af03DHgF8xLSAgTwrkrqt/1xdkIdYURCxdeUazMPA1tAM7KzFV3NLKVbver+Y5TgKP+wV2P5fXnw959hQSEJfO+Jpw+qqMPAoBXvoIi6BLWCl61BLJO2zHQzT3PeGk461tkC5kNT+qWQAo+cKDO9q8ci/sVBE0Z4p8YrRQ13Xz1eh009+uoHVpRmpRyw9hKQc4fkQZXy4hPx6eV5LQ1IhDczNdh2IOgQsnH05+7Pgqpd6bTKn0pYVSkvhJdQfLp9Ay9CnJ14/2K/DjyHkSEQkIY/nZR41QFdJtMstvpU4DQvK+7w== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR10MB5488.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(86362001)(9686003)(66946007)(76116006)(52536014)(5660300002)(26005)(316002)(186003)(71200400001)(508600001)(55016002)(8936002)(44832011)(8676002)(38100700002)(110136005)(7696005)(66556008)(6506007)(4326008)(66476007)(64756008)(66446008)(4744005)(122000001)(38070700005)(33656002)(2906002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?G3G3pU3P59j0NJnN/Ef6OqlAU+mGAfVEZPqhseGnMiNrE4dToxPykzkCWcOe?= =?us-ascii?Q?RdAjfnxkA2GEWgM1MSmq3IKLVHF3Xt3Li7oulZhqWeahCQCTyOsx+OmMX05J?= =?us-ascii?Q?LYohSTIxKR5osdGvyL6/QK5UUfUC1VxaDrfor6VQuyHxv+URl8lkt+OzCLOK?= =?us-ascii?Q?PfUeZpwp+gFM5NJeVFHBteiyYu/cFUL4/TqeObFW4DKkgSyRQLmoiFDtwFZU?= =?us-ascii?Q?RfPmp/Pue7YawU48N7bOfmoZQoEmjhOamNbcLhPf5ZSdFhhF40k9yjlXc61L?= =?us-ascii?Q?0VJZg2nq0lxioxonIF28akzKDkEf4FskrZ7+a7jLB1x6bt/ObGbp2F9MpC4H?= =?us-ascii?Q?0GsujTeQ3MhjLP89q6O7EFaqu5LCrCYIDNuMGc+BEhn6dk1ccs45YDEvVJD/?= =?us-ascii?Q?40NyTsA2kxUSYQG1xOnZhkUeRoNb65nyBq5OpE03VkOHv4h9t50pxd6hCLre?= =?us-ascii?Q?jUBCSwQFH+AeMuXjOQBTMYXXPWFyZhr/TGqH5xDDEjm3DlK46bJFAtTZXc/O?= =?us-ascii?Q?ikdsHK7lP2/A++AanCIIS+dCU/huVdnyCBRZbur6cg5LuTQfLtMgjuViSQKr?= =?us-ascii?Q?EHRKt00NzzPHVD7/o2yiadnsFO3i09N/2NMPfK3U2xiWE2Y4uhjO5dI6fQl0?= =?us-ascii?Q?UqXTQ8teKcG78vQj2+MoE3u3dQZQuSSSVOLCwuaSbDUgdu1jG4vO8wX3fqyj?= =?us-ascii?Q?hZ522RUnpnMcmypntuQzY7HeZlpIPJMwQHCswNF0gZnJ29ugBWEyzmh2c8Xj?= =?us-ascii?Q?GOUwFkYXJXVK7gWj1FqFjRCYQDNq5baRFQFSDcnXaBnQlbmuMTNBcN7XH4vV?= =?us-ascii?Q?TxN3yfatOxj6aE8QZh0yQO4qM5YajLQP0yd2JBa+T9LASxQagdYWeJtyoDtv?= =?us-ascii?Q?wCUwzrbs2oqYDWMKLSa5hjR5wwXpnMRKHNoKSO8YgzXZuPNVOnO/il48nhyW?= =?us-ascii?Q?OpIqkgJH5sp/q0mU0h/HhxSsPj3lz9v5KVoC1jo1q2y5cbF2hY6zmvO5C7Y0?= =?us-ascii?Q?9Psc74o51iEMRC/0578Cmsp4Ycc5W5GkPExubTO006pJTr8srDYeodLAXVVB?= =?us-ascii?Q?1bnw0ElSLfR43evOEanm5R0x9t2KEu4TDrenFC4G4nlVVElT7JdKjb16uSBt?= =?us-ascii?Q?HOuNM6eIGdk47yfwNZ7c1yISUbHBUgjgj3933ifkEqk9DcRTSHRNkk2Idy24?= =?us-ascii?Q?EZS0YcnnO1kpi5WptN39fo191lm5wXo/15hYj8R93KlOal+nwCV5z2fJneSM?= =?us-ascii?Q?9MPpdCsTcHubvwbwxFKD85BByitBIvYkrnY6srd8IseXEAftxWzk3kRmSU5x?= =?us-ascii?Q?9prJSfl+41FCoImkhOVGKdqr?= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SJ0PR10MB5488.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3aa395c9-143e-4378-4bad-08d981d24319 X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Sep 2021 16:17:11.7884 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Q7lwpTfuZhfD0Vc1zQlCnXrv6tWpuuaYxyRrF4XWYUnvTDHIjnNMf9qlQjWrN6ZM+cp9MrwAiDLSUTK0s7NF1g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR10MB5661 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10120 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 phishscore=0 adultscore=0 mlxscore=0 malwarescore=0 suspectscore=0 bulkscore=0 mlxlogscore=963 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2109230001 definitions=main-2109270111 X-Proofpoint-GUID: kh8dHgyhVrZJvk2k0AWEpXMccUVKNDXu X-Proofpoint-ORIG-GUID: kh8dHgyhVrZJvk2k0AWEpXMccUVKNDXu X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 50067 Cc: "50067@debbugs.gnu.org" <50067@debbugs.gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > > Other programs don't show the keys in context menus. > > The Human Interface Guidelines say: > > > > Show keyboard shortcuts in menu bar menus, not contextual menus. > > Contextual menus are already shortcuts to task-specific commands; > > it's redundant to display keyboard shortcuts too. >=20 > I'm not sure I agree with those guidelines -- displaying the key > bindings increases the discoverability of those key bindings. (Not > using the mouse is more productive in the long term for most people.) +1. Provided, that is, that the (context) menu-item is bound to exactly the same command as the key. But if the key does something different from what the item does (e.g. dependent on the context), then omitting the key name can make sense. From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 27 14:41:54 2021 Received: (at 50067) by debbugs.gnu.org; 27 Sep 2021 18:41:54 +0000 Received: from localhost ([127.0.0.1]:42836 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mUvZa-0000ue-Hm for submit@debbugs.gnu.org; Mon, 27 Sep 2021 14:41:54 -0400 Received: from eggs.gnu.org ([209.51.188.92]:41912) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mUvZY-0000uD-Hk for 50067@debbugs.gnu.org; Mon, 27 Sep 2021 14:41:53 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:38612) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mUvZT-0001eX-AV; Mon, 27 Sep 2021 14:41:47 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4193 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 1mUvZS-0007qg-MT; Mon, 27 Sep 2021 14:41:47 -0400 Date: Mon, 27 Sep 2021 21:41:52 +0300 Message-Id: <83k0j1lv2n.fsf@gnu.org> From: Eli Zaretskii To: Juri Linkov In-Reply-To: <877df211vs.fsf@mail.linkov.net> (message from Juri Linkov on Mon, 27 Sep 2021 18:30:23 +0300) Subject: Re: bug#50067: Context menus References: <87pmufb3u0.fsf@mail.linkov.net> <877df211vs.fsf@mail.linkov.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 50067 Cc: 50067@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Juri Linkov > Date: Mon, 27 Sep 2021 18:30:23 +0300 > > Other programs don't show the keys in context menus. > The Human Interface Guidelines say: > > Show keyboard shortcuts in menu bar menus, not contextual menus. > Contextual menus are already shortcuts to task-specific commands; > it's redundant to display keyboard shortcuts too. > > This patch hides all keys from the context menus: Unconditionally? why?? Emacs always shows the keyboard bindings in its menus, so why should we care what other apps do? And why force this on everyone? From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 28 15:04:34 2021 Received: (at 50067) by debbugs.gnu.org; 28 Sep 2021 19:04:34 +0000 Received: from localhost ([127.0.0.1]:46996 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mVIP3-0005Xe-VC for submit@debbugs.gnu.org; Tue, 28 Sep 2021 15:04:34 -0400 Received: from relay12.mail.gandi.net ([217.70.178.232]:60173) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mVIP0-0005XA-BC for 50067@debbugs.gnu.org; Tue, 28 Sep 2021 15:04:30 -0400 Received: (Authenticated sender: juri@linkov.net) by relay12.mail.gandi.net (Postfix) with ESMTPSA id B1C3B20000C; Tue, 28 Sep 2021 19:04:23 +0000 (UTC) From: Juri Linkov To: Eli Zaretskii Subject: Re: bug#50067: Context menus Organization: LINKOV.NET References: <87pmufb3u0.fsf@mail.linkov.net> <877df211vs.fsf@mail.linkov.net> <83k0j1lv2n.fsf@gnu.org> Date: Tue, 28 Sep 2021 21:54:40 +0300 In-Reply-To: <83k0j1lv2n.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 27 Sep 2021 21:41:52 +0300") Message-ID: <87zgrwmtjv.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 50067 Cc: 50067@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> Other programs don't show the keys in context menus. >> The Human Interface Guidelines say: >> >> Show keyboard shortcuts in menu bar menus, not contextual menus. >> Contextual menus are already shortcuts to task-specific commands; >> it's redundant to display keyboard shortcuts too. >> >> This patch hides all keys from the context menus: > > Unconditionally? why?? Emacs always shows the keyboard bindings in > its menus, so why should we care what other apps do? And why force > this on everyone? The patch disables the keys conditionally by adding a new text property to the menu title. From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 28 15:04:47 2021 Received: (at 50067) by debbugs.gnu.org; 28 Sep 2021 19:04:47 +0000 Received: from localhost ([127.0.0.1]:46999 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mVIPH-0005YD-9f for submit@debbugs.gnu.org; Tue, 28 Sep 2021 15:04:47 -0400 Received: from relay11.mail.gandi.net ([217.70.178.231]:34239) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mVIP3-0005XJ-Qz for 50067@debbugs.gnu.org; Tue, 28 Sep 2021 15:04:34 -0400 Received: (Authenticated sender: juri@linkov.net) by relay11.mail.gandi.net (Postfix) with ESMTPSA id 99733100002; Tue, 28 Sep 2021 19:04:26 +0000 (UTC) From: Juri Linkov To: Lars Ingebrigtsen Subject: Re: bug#50067: Context menus Organization: LINKOV.NET References: <87pmufb3u0.fsf@mail.linkov.net> <877df211vs.fsf@mail.linkov.net> <87zgryggqw.fsf@gnus.org> Date: Tue, 28 Sep 2021 21:49:59 +0300 In-Reply-To: <87zgryggqw.fsf@gnus.org> (Lars Ingebrigtsen's message of "Mon, 27 Sep 2021 17:50:15 +0200") Message-ID: <87r1d8lelk.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 50067 Cc: 50067@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> Other programs don't show the keys in context menus. >> The Human Interface Guidelines say: >> >> Show keyboard shortcuts in menu bar menus, not contextual menus. >> Contextual menus are already shortcuts to task-specific commands; >> it's redundant to display keyboard shortcuts too. > > I'm not sure I agree with those guidelines -- displaying the key > bindings increases the discoverability of those key bindings. For example, how to explain to the users why a keybinding is displayed for "Undo", but not for "Redo". Another question is why currently `C-x u' is displayed instead of the shorter `C-/' for "Undo". So maybe simpler just to disable keys only for "Undo" with ‘:keys ""’. Or the other way around: to manually add some suggested keybinding to "Redo". From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 28 15:31:59 2021 Received: (at 50067) by debbugs.gnu.org; 28 Sep 2021 19:31:59 +0000 Received: from localhost ([127.0.0.1]:47065 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mVIpa-0006HG-W3 for submit@debbugs.gnu.org; Tue, 28 Sep 2021 15:31:59 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40276) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mVIpZ-0006H3-Nu for 50067@debbugs.gnu.org; Tue, 28 Sep 2021 15:31:58 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:56650) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mVIpU-0001mV-4o; Tue, 28 Sep 2021 15:31:52 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4473 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 1mVIpR-0003TE-P0; Tue, 28 Sep 2021 15:31:52 -0400 Date: Tue, 28 Sep 2021 22:31:40 +0300 Message-Id: <83wnn0ijj7.fsf@gnu.org> From: Eli Zaretskii To: Juri Linkov In-Reply-To: <87zgrwmtjv.fsf@mail.linkov.net> (message from Juri Linkov on Tue, 28 Sep 2021 21:54:40 +0300) Subject: Re: bug#50067: Context menus References: <87pmufb3u0.fsf@mail.linkov.net> <877df211vs.fsf@mail.linkov.net> <83k0j1lv2n.fsf@gnu.org> <87zgrwmtjv.fsf@mail.linkov.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 50067 Cc: 50067@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Juri Linkov > Cc: 50067@debbugs.gnu.org > Date: Tue, 28 Sep 2021 21:54:40 +0300 > > >> Other programs don't show the keys in context menus. > >> The Human Interface Guidelines say: > >> > >> Show keyboard shortcuts in menu bar menus, not contextual menus. > >> Contextual menus are already shortcuts to task-specific commands; > >> it's redundant to display keyboard shortcuts too. > >> > >> This patch hides all keys from the context menus: > > > > Unconditionally? why?? Emacs always shows the keyboard bindings in > > its menus, so why should we care what other apps do? And why force > > this on everyone? > > The patch disables the keys conditionally by adding a new > text property to the menu title. I meant user's ability to request the display of key bindings in the menu. I hope you don't expect users to change text properties on menu titles as the means to have that control. There should be an option, and frankly I don't understand why these menus should behave differently from any other menu in Emacs that shows commands. From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 28 18:09:00 2021 Received: (at 50067) by debbugs.gnu.org; 28 Sep 2021 22:09:00 +0000 Received: from localhost ([127.0.0.1]:47235 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mVLHX-0001kx-V6 for submit@debbugs.gnu.org; Tue, 28 Sep 2021 18:09:00 -0400 Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]:22206) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mVLHL-0001kf-DF for 50067@debbugs.gnu.org; Tue, 28 Sep 2021 18:08:58 -0400 Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 18SL2kCR031120; Tue, 28 Sep 2021 22:08:46 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2021-07-09; bh=2Rg6EiUXxPSVxHAZ/Ia422Mfldu6YSDYrOlk28Hu/o0=; b=bf06C2tlw8RgzFavlDogCidbta26HCh/EdV/fcqJnn87A6raQhDIhpi17Nw2CFrcZMAW 2MU0gXxlOkcXJdpPx8eBHgT4mT0OGegckMdgb7yUby0G/fIfLj1bGjv7BqHru6UQ39mT 5wf/9PHwhiQZ4s0Wm7TxdATYPWRoNNaYDECfWG/YlbaVfHOZjd+LHWR3t8HQ4bCIGK3u UStirRFAlTARFyBx7IM5DD+FdZPg8787DW9tEwEbA5/lCP90/Rrgys1DBQBJkya6l0cS YsVyauO6B5QGtHPeeRD1roOlDg5muV41Dx9/R/VEjKLtzLL15EI3sKsJjg4lO9zGeMrh 9A== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by mx0b-00069f02.pphosted.com with ESMTP id 3bbejen6n4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 28 Sep 2021 22:08:46 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 18SM08Xw103458; Tue, 28 Sep 2021 22:08:44 GMT Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2107.outbound.protection.outlook.com [104.47.58.107]) by userp3020.oracle.com with ESMTP id 3bc3cd911x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 28 Sep 2021 22:08:44 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Z+06GVbWfSIkMP6P100PWYa3Kd3JooNjTywfJ93UCj+m3Ch7YH2DUY1U4zGIvUrX5pmEKNw8me4YWHPpcIkB/16g8lDea68FCIgBvIsqfk13JIhg0QQO40bO3THlukXi6xP1QBo+rdlMABLOCFfiQhM4qAbB6z94BzSjjJD0pewG8Eia2zfzzmy7cZRxeAGIvmA62HWvXgJi9rHOC+Gm42LqPSATjqVlZtW5F8o+NJ+2KRMj0bZoFz4KFp3JVm3TqI1cLc9A/pGEf/QUEfr9yzh1lM/hx7cZm00hekJeFjRh5lBkiVT3IKmrAbnMrEwQLUmIT9jRiSlPtAxQWvhC0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=2Rg6EiUXxPSVxHAZ/Ia422Mfldu6YSDYrOlk28Hu/o0=; b=fiJfp61v1FYBW867WZrUTeuGOkAAAPvNa6oxeWv1tvD1pUd1hovUoDwpSTMc9x1EYbDEtncoCgYJ2Sbj3h4jj6x00yKQPeivhy84G3BlNHvpMzl+KvGJ7mxp383JAooBwsZ2O12K5TJmjEihkGMEe8i9GJAtrii0okvNhO0nlmaSRG/2YpWdkpmm+7Mv+EAHGN00UgQRGTfGdPQjkLtKYNBNfS0eiQhZXH1eQkmlHGJThNQ4H2JmbLz+339z5q8yx5Xd2oW3a3IJo5o2NT9uLSdbUwki0huG9ktwTHpaLOL992i7JVOsZWdIj/WSyfEEQ/T43fyT0HedtYBzu/GPew== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2Rg6EiUXxPSVxHAZ/Ia422Mfldu6YSDYrOlk28Hu/o0=; b=0H+a1Hnwns9hOxbZI9PuWiukgnZAyGzb052ul94nKfeP6r+uOUfNaZWHqZU2E+u+PIBv03cCRHtMRiPXC4oqwCKD2AzNnA1RpEyYjqsdAr6xIhTn3FN87Y7L1/TkxuX9YxZcV52xWzunYft8PxUG73ONBhMDTrG37kGdUQpU7RM= Received: from SJ0PR10MB5488.namprd10.prod.outlook.com (2603:10b6:a03:37e::19) by SJ0PR10MB4656.namprd10.prod.outlook.com (2603:10b6:a03:2d1::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.13; Tue, 28 Sep 2021 22:08:42 +0000 Received: from SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::c0bc:7c3a:292f:8a82]) by SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::c0bc:7c3a:292f:8a82%9]) with mapi id 15.20.4544.021; Tue, 28 Sep 2021 22:08:42 +0000 From: Drew Adams To: Juri Linkov , Lars Ingebrigtsen Subject: RE: [External] : bug#50067: Context menus Thread-Topic: [External] : bug#50067: Context menus Thread-Index: AQHXtJvqhlIy+GxoT0STmxzPtmME8qu6AKtQ Date: Tue, 28 Sep 2021 22:08:42 +0000 Message-ID: References: <87pmufb3u0.fsf@mail.linkov.net> <877df211vs.fsf@mail.linkov.net> <87zgryggqw.fsf@gnus.org> <87r1d8lelk.fsf@mail.linkov.net> In-Reply-To: <87r1d8lelk.fsf@mail.linkov.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: linkov.net; dkim=none (message not signed) header.d=none;linkov.net; dmarc=none action=none header.from=oracle.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: c3fc353e-28dd-4d42-3b1e-08d982cc886c x-ms-traffictypediagnostic: SJ0PR10MB4656: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6430; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: +LfVA9WjUZMJQ/5DLrt6RFNVFLENaJkJhcKyedwoNXLXtyySByXCa7DSzlhpPkYjKuSf9L5ClsM3DWqm/A1S8QGhkyOLciMyGZ8+YFUnUYmR7jNvsepHSsPmS1Cjs736EhwA+uF9B+Sxf8jirli6E0/Ev2AXvP2lA3ChsB/ezDHfkDaRvqAA58MdzUhw59XkvUzBySRLMcaxW/6AhFllasoguKp8KhwFivpBFCzL/ecZ58feoC3fsQEux60ZmEWO7TP8iPk4MspbcohQ2wrI/asGslN2vyin+2yw7P0tKfeu0vVhc6sbiGJdhjKiw6LKGNV7VYyGSTwRVgx9sLJK46hbLJnkHgJw6CWMwFrzsmCXSdlMGtOPcI+WOaeRyl0yYnubnZ9TDMFP/k/g+fT/qWP3x1kZyVy7eYo4lZJyd6YhUZcP1f553B6lgmgw7rLprm6nWZtY9iL0IiRU3+lYZQgP9s6hPLGYtf7Jtu9H7qbez/9dPsFXSBkSs+DN/GAMZf8tZaWczsdECSzcME9v4nhoCSns4zbjwTtb/N99zv7a6L+MVcm0LEZt6uISaSpqUK3VbnQi+Nxb0Q+//bIJY5LTZQu2TLHDzM9gFzjh/FQpRjAqR6di/wRMgkj+QbPEYvKX/3juJUR7/fziotGvRiQIXsjg2uAxRpoEg5OVS2eTwrmogVdD1QB7OmScajCYaXBx7zhY3gud88ZLUyAjvA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR10MB5488.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(110136005)(8676002)(26005)(6506007)(4744005)(5660300002)(38070700005)(186003)(7696005)(71200400001)(55016002)(44832011)(66556008)(64756008)(316002)(86362001)(9686003)(76116006)(52536014)(4326008)(122000001)(33656002)(2906002)(8936002)(66476007)(66446008)(508600001)(66946007)(38100700002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?utf-8?B?KzFKN3pReTRxWWVBSWtNZ05Ddy9zcG8vdDlHRXVVNzQ2NHJmdWFMaThkRy9a?= =?utf-8?B?dzJwYVRjRkV6cWp6ZmZSQU9PWjRVZFN2aE5CczlUeWVEa3hHMUVtRU9BakxU?= =?utf-8?B?b3prZWNaUWdPOVlqa0s0MjBtZUNSdEpVV2JpSGRoS0Q4SEJPam9lazZSbHZa?= =?utf-8?B?aUY0VDRHVkd5SVlLWjFpdkNYTHBPbmdVVXQySUFqc25NZE4zUzFhaituN0l1?= =?utf-8?B?ZHBna0RkV1QyUW1jTlo0cXFjNU8rWG1od1BvRWsya1NWVlZDQTFzODUzU3hQ?= =?utf-8?B?SXJvMnRadXNrZGt6WWNaRklYV2Nja3hRTDYxWnJGRHpjQjcyTHBURkprMXBV?= =?utf-8?B?K21UQkh4eXFydkgxVHRONUpWYmRUSDg1TFhtZWUwRDAwQy9MMnBLZDVTdVFw?= =?utf-8?B?a09kQU94RUhVa1VFSkttOW9kclc4bXZZcElXcjJ3clk1RkpITVBoT2ZtR214?= =?utf-8?B?YURQbkhsZi9LNDVJTCtmT1RxYzZSYXhrcERqelJLUDdnM2NHYlF5VVlNSGZw?= =?utf-8?B?NW52eVVJYjFzQkxGK3pnN0RvY1BaaThDelZRTXpyMUFIRk4zYWtwaGdtdzN3?= =?utf-8?B?ZzlSUUI0SkxzS3hucVg3ZXVIM2NaYlRoYkdUakxOQzhvbWFTbHJVZnlQRkxI?= =?utf-8?B?NXlRS0dSdzVGYmFtSzlKL1h6ZHozMUF3K1BkQlNmdDZXbkZnTkNWQVhMVWla?= =?utf-8?B?VVZqMERBeUxIWjZZbW1lVkt2Q2RZQkFZL0ZRMEZkaDRCMlB6ZHNTOTFjMTF4?= =?utf-8?B?NUhjczU5YjdJeER5OE5ZczJ2L2VLeGh3b0N1U3FEZ29WVlBGcytBNm9JNWtH?= =?utf-8?B?cG44Vjh4N0ZBM3kwelE5L1l2OUEydm4xcytmZ2pPT01sNU92bEtyQTNVb0d4?= =?utf-8?B?QWJBZkJpbVh4aE1raUlDVWVHS0FoaitsUlptdkFDRS9iSjZMbDJTalZXRmpw?= =?utf-8?B?NWVRcWlNUHNnSmErODJyMmpBMXU3dWNXSUdUWUVnaGFIY1hsMVl5NEM2MVdv?= =?utf-8?B?VU94WW1DMmtOcUlnT1JiZUVoT0RIUTJBR2hYbVV4SkIzb3FmbjRSOUU1Rmkr?= =?utf-8?B?eDJlZUF4YlJqcDVyK3poaWRSNTdXbDlGSnhkbldHU0ZBRFpGVHA4MWVlUWNE?= =?utf-8?B?VnhTR0pudUtmeDQxUXljM1FvRWZNQVJsNmw3ZWZLSzRGK0FCK1FtSkxQRXJm?= =?utf-8?B?eldFc1pLOTlKcHQvYlE1aU16SE9hK1FnT3J2eVdJQ2VPeXJ1VDZYRFQ5QXVH?= =?utf-8?B?SHFaWTN2L0RGdENRbi9DTFVKSFlPRlUwLzY4WWIwL3RBMWxkcHpWa0N5MXRz?= =?utf-8?B?V0J5WDBQQWNvU29YMW4za003NStTaGFEOEx4YW1IbExqT3BtL3o4elNyTU9l?= =?utf-8?B?YWwya1ZTR01HYTl1YkVKSko1NUl5b0svMWhxeklOU2c0VU43Z1prK1FrbkZo?= =?utf-8?B?QlhoVzdvVE5JWnZsY04xTFNoNkUyUzZZUzhTbzN2ckdEb3JBSXk5djVjZHdB?= =?utf-8?B?TVRKNWMvdGRnWHZHMS82U2FLNGpZeG1iMk95b3BkUFN1aGl4VkpsV08wamtR?= =?utf-8?B?dnBHMFNOTzYrN21BVms4KzBKZ0VNQUh6K3Y3cVVHa1RFV0hXN3NTRVBYTC83?= =?utf-8?B?QzB5UnZRRlpITy9VRmlBbDJ0TU15amxrc29tdjZyWGxOU0xjTGJSV2NJSUQy?= =?utf-8?B?YWxZZmZJanpDM3puVDRrTmJhanBwckY5djdRbGdCaVZUSlFhMW5TdXpTMTlk?= =?utf-8?Q?ToqHhX1aHsncyiU/q6TbQ0OYFbOnRCsF8sbQ1O8?= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SJ0PR10MB5488.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: c3fc353e-28dd-4d42-3b1e-08d982cc886c X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Sep 2021 22:08:42.2493 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: GtkM36O60FULF6DVAC0NH0YyC1u0isNOs9oiCZtrWkDb6Un7sRm3DwhUhhXEUO55r1N3ZtKpy7Qwinci9NyrYg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR10MB4656 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10121 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 mlxscore=0 mlxlogscore=941 phishscore=0 bulkscore=0 suspectscore=0 malwarescore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2109230001 definitions=main-2109280129 X-Proofpoint-GUID: pUJbTxu0ivdeA9QbYPQwNmLm19iSitWu X-Proofpoint-ORIG-GUID: pUJbTxu0ivdeA9QbYPQwNmLm19iSitWu X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 50067 Cc: "50067@debbugs.gnu.org" <50067@debbugs.gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) PiBGb3IgZXhhbXBsZSwgaG93IHRvIGV4cGxhaW4gdG8gdGhlIHVzZXJzIHdoeSBhIGtleWJpbmRp bmcNCj4gaXMgZGlzcGxheWVkIGZvciAiVW5kbyIsIGJ1dCBub3QgZm9yICJSZWRvIi4NCg0KV2hl biAmIHdoeSBkb2VzIHRoYXQgbmVlZCB0byBiZSBleHBsYWluZWQ/DQpJcyB0aGVyZSBhIG1pc3Np bmcgYmluZGluZywgcGVyaGFwcz8NCg0KPiBBbm90aGVyIHF1ZXN0aW9uIGlzIHdoeSBjdXJyZW50 bHkgYEMteCB1JyBpcyBkaXNwbGF5ZWQNCj4gaW5zdGVhZCBvZiB0aGUgc2hvcnRlciBgQy0vJyBm b3IgIlVuZG8iLg0KDQpUaGF0J3MgYW4gb3J0aG9nb25hbCBwcm9ibGVtLCB3aGljaCBpcyBub3QN CnNwZWNpZmljIHRvIGNvbnRleHQgbWVudXMsIHJpZ2h0PyAgVGhhdCdzDQphIGdlbmVyYWwsIGxv bmdzdGFuZGluZyBwcm9ibGVtLCBJSVVDLg0KDQo+IFNvIG1heWJlIHNpbXBsZXIganVzdCB0byBk aXNhYmxlIGtleXMgb25seSBmb3IgIlVuZG8iDQo+IHdpdGgg4oCYOmtleXMgIiLigJkuICBPciB0 aGUgb3RoZXIgd2F5IGFyb3VuZDogdG8gbWFudWFsbHkNCj4gYWRkIHNvbWUgc3VnZ2VzdGVkIGtl eWJpbmRpbmcgdG8gIlJlZG8iLg0KDQpJcyB0aGVyZSBhIHJlYXNvbiB3aHkgb25lIGhhcyBhbmQg dGhlIG90aGVyDQpkb2Vzbid0IGhhdmUgYSBiaW5kaW5nPyAgRG9lcyBpdCBtYXR0ZXI/DQoNCkhv dyBpcyB0aGlzIHJlbGF0ZWQgdG8gdGhlIGdlbmVyYWwgcXVlc3Rpb24NCm9mIHdoZXRoZXIgX2Nv bnRleHQgbWVudV8gaXRlbXMgc2hvdWxkIGJlDQphYmxlIHRvIGhhdmUga2V5cyBsaXN0ZWQ/ICBE b2Vzbid0IGFsbCB0aGF0DQp5b3Ugd3JvdGUgYXBwbHkgdG8gbWVudXMgZ2VuZXJhbGx5Pw0K From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 29 03:20:42 2021 Received: (at 50067) by debbugs.gnu.org; 29 Sep 2021 07:20:42 +0000 Received: from localhost ([127.0.0.1]:47667 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mVTtR-0000s8-U4 for submit@debbugs.gnu.org; Wed, 29 Sep 2021 03:20:42 -0400 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:35333) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mVTtI-0000re-3g for 50067@debbugs.gnu.org; Wed, 29 Sep 2021 03:20:32 -0400 Received: (Authenticated sender: juri@linkov.net) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id B0C6760008; Wed, 29 Sep 2021 07:20:25 +0000 (UTC) From: Juri Linkov To: Lars Ingebrigtsen Subject: Re: bug#50067: Context menus Organization: LINKOV.NET References: <87pmufb3u0.fsf@mail.linkov.net> <877df211vs.fsf@mail.linkov.net> <87zgryggqw.fsf@gnus.org> <87r1d8lelk.fsf@mail.linkov.net> Date: Wed, 29 Sep 2021 10:00:10 +0300 In-Reply-To: <87r1d8lelk.fsf@mail.linkov.net> (Juri Linkov's message of "Tue, 28 Sep 2021 21:49:59 +0300") Message-ID: <87k0izsw79.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 50067 Cc: 50067@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> I'm not sure I agree with those guidelines -- displaying the key >> bindings increases the discoverability of those key bindings. > > For example, how to explain to the users why a keybinding > is displayed for "Undo", but not for "Redo". > > Another question is why currently `C-x u' is displayed > instead of the shorter `C-/' for "Undo". > > So maybe simpler just to disable keys only for "Undo" > with ‘:keys ""’. Or the other way around: to manually > add some suggested keybinding to "Redo". I think it would be better to rebind "Undo" from 'undo' to 'undo-only'. Since 'undo-only' has no keybinding, it will not be displayed in the menu. From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 20 13:00:27 2021 Received: (at 50067) by debbugs.gnu.org; 20 Oct 2021 17:00:27 +0000 Received: from localhost ([127.0.0.1]:55364 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mdEx1-00082E-87 for submit@debbugs.gnu.org; Wed, 20 Oct 2021 13:00:27 -0400 Received: from relay7-d.mail.gandi.net ([217.70.183.200]:54187) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mdEx0-0007v9-1A for 50067@debbugs.gnu.org; Wed, 20 Oct 2021 13:00:26 -0400 Received: (Authenticated sender: juri@linkov.net) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id 139732000B for <50067@debbugs.gnu.org>; Wed, 20 Oct 2021 17:00:18 +0000 (UTC) From: Juri Linkov To: 50067@debbugs.gnu.org Subject: Re: bug#50067: Context menus References: <87pmufb3u0.fsf@mail.linkov.net> Date: Wed, 20 Oct 2021 19:59:18 +0300 In-Reply-To: <87pmufb3u0.fsf@mail.linkov.net> (Juri Linkov's message of "Sun, 15 Aug 2021 11:48:55 +0300") Message-ID: <875ytr1vkp.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 50067 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-=-= Content-Type: text/plain Currently the option context-menu-global of context-menu-functions doesn't take into account the variable menu-bar-final-items to properly order the menu items. This patch makes it possible to order the items of global-map instead of menu-bar-current-active-maps used in menu-bar-keymap by default: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=menu-bar-keymap.patch diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index 980ba2fcd1..b6cc29720d 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el @@ -2713,9 +2713,11 @@ menu-bar-open-mouse (cdr menu-bar-item-cons) 0)))) -(defun menu-bar-keymap () +(defun menu-bar-keymap (&optional keymap) "Return the current menu-bar keymap. - +It's possible to use the KEYMAP argument to override the default keymap +that is the currently active maps. For example, the argument KEYMAP +could provide `global-map' where items are limited to the global map only. The ordering of the return value respects `menu-bar-final-items'." (let ((menu-bar '()) (menu-end '())) @@ -2729,7 +2731,7 @@ menu-bar-keymap ;; sorting. (push (cons pos menu-item) menu-end) (push menu-item menu-bar)))) - (lookup-key (menu-bar-current-active-maps) [menu-bar])) + (lookup-key (or keymap (menu-bar-current-active-maps)) [menu-bar])) `(keymap ,@(nreverse menu-bar) ,@(mapcar #'cdr (sort menu-end (lambda (a b) diff --git a/lisp/mouse.el b/lisp/mouse.el index 3e00ca7ce1..6c97cc365f 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -364,7 +364,7 @@ context-menu-global (when (consp binding) (define-key-after menu (vector key) (copy-sequence binding)))) - (lookup-key global-map [menu-bar])) + (menu-bar-keymap global-map)) menu) (defun context-menu-local (menu _click) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 08 15:07:05 2021 Received: (at 50067) by debbugs.gnu.org; 8 Nov 2021 20:07:05 +0000 Received: from localhost ([127.0.0.1]:59647 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mkAv2-0006hk-Mk for submit@debbugs.gnu.org; Mon, 08 Nov 2021 15:07:04 -0500 Received: from relay10.mail.gandi.net ([217.70.178.230]:56101) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mkAuz-0006hC-Gz for 50067@debbugs.gnu.org; Mon, 08 Nov 2021 15:07:02 -0500 Received: (Authenticated sender: juri@linkov.net) by relay10.mail.gandi.net (Postfix) with ESMTPSA id 87184240006 for <50067@debbugs.gnu.org>; Mon, 8 Nov 2021 20:06:54 +0000 (UTC) From: Juri Linkov To: 50067@debbugs.gnu.org Subject: Re: bug#50067: Context menus Organization: LINKOV.NET References: <87pmufb3u0.fsf@mail.linkov.net> <875ytr1vkp.fsf@mail.linkov.net> Date: Mon, 08 Nov 2021 22:05:12 +0200 In-Reply-To: <875ytr1vkp.fsf@mail.linkov.net> (Juri Linkov's message of "Wed, 20 Oct 2021 19:59:18 +0300") Message-ID: <864k8mwgzr.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 50067 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-=-= Content-Type: text/plain > Currently the option context-menu-global of context-menu-functions > doesn't take into account the variable menu-bar-final-items > to properly order the menu items. This patch makes it possible > to order the items of global-map instead of menu-bar-current-active-maps > used in menu-bar-keymap by default: Actually, here is a better patch that will also allow sorting items on context-menu-local as well. The same KEYMAP arg of menu-bar-keymap could be used also in mouse-menu-bar-map to sort items of [C-down-mouse-3] in the right order (they were unsorted for a long time): --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=menu-bar-keymap-2.patch diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index 1a81f1a3d0..94e75efeeb 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el @@ -2738,7 +2738,7 @@ menu-bar-keymap ;; sorting. (push (cons pos menu-item) menu-end) (push menu-item menu-bar)))) - (lookup-key (or keymap (menu-bar-current-active-maps)) [menu-bar])) + (or keymap (lookup-key (menu-bar-current-active-maps) [menu-bar]))) `(keymap ,@(nreverse menu-bar) ,@(mapcar #'cdr (sort menu-end (lambda (a b) diff --git a/lisp/mouse.el b/lisp/mouse.el index d6912892ef..5b9ae121d7 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -271,10 +271,10 @@ mouse-menu-bar-map ;; FIXME: We have a problem here: we have to use the global/local/minor ;; so they're displayed in the expected order, but later on in the command ;; loop, they're actually looked up in the opposite order. - (apply 'append - global-menu - local-menu - minor-mode-menus))) + (menu-bar-keymap (apply 'append + global-menu + local-menu + minor-mode-menus)))) ;; Context menus. @@ -364,7 +364,7 @@ context-menu-global (when (consp binding) (define-key-after menu (vector key) (copy-sequence binding)))) - (menu-bar-keymap global-map)) + (menu-bar-keymap (lookup-key global-map [menu-bar]))) menu) (defun context-menu-local (menu _click) @@ -377,7 +377,7 @@ context-menu-local (when (consp binding) (define-key-after menu (vector key) (copy-sequence binding)))) - keymap))) + (menu-bar-keymap keymap)))) menu) (defun context-menu-minor (menu _click) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 18 13:39:41 2021 Received: (at 50067) by debbugs.gnu.org; 18 Nov 2021 18:39:41 +0000 Received: from localhost ([127.0.0.1]:37163 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mnmJx-0002OW-0T for submit@debbugs.gnu.org; Thu, 18 Nov 2021 13:39:41 -0500 Received: from relay9-d.mail.gandi.net ([217.70.183.199]:45925) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mnmJv-0002OH-E7 for 50067@debbugs.gnu.org; Thu, 18 Nov 2021 13:39:40 -0500 Received: (Authenticated sender: juri@linkov.net) by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id 6345FFF807 for <50067@debbugs.gnu.org>; Thu, 18 Nov 2021 18:39:31 +0000 (UTC) From: Juri Linkov To: 50067@debbugs.gnu.org Subject: Re: bug#50067: Context menus Organization: LINKOV.NET References: <87pmufb3u0.fsf@mail.linkov.net> <875ytr1vkp.fsf@mail.linkov.net> <864k8mwgzr.fsf@mail.linkov.net> Date: Thu, 18 Nov 2021 20:38:53 +0200 In-Reply-To: <864k8mwgzr.fsf@mail.linkov.net> (Juri Linkov's message of "Mon, 08 Nov 2021 22:05:12 +0200") Message-ID: <86bl2hux4y.fsf@mail.linkov.net> 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 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 50067 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> Currently the option context-menu-global of context-menu-functions >> doesn't take into account the variable menu-bar-final-items >> to properly order the menu items. This patch makes it possible >> to order the items of global-map instead of menu-bar-current-active-maps >> used in menu-bar-keymap by default: > > Actually, here is a better patch that will also allow sorting items on > context-menu-local as well. The same KEYMAP arg of menu-bar-keymap > could be used also in mouse-menu-bar-map to sort items of [C-down-mouse-3] > in the right order (they were unsorted for a long time): Only part of the patch that fixes the new feature was pushed to emacs-28. But the following part that fixes the old function could pushed to master later: > diff --git a/lisp/mouse.el b/lisp/mouse.el > index d6912892ef..5b9ae121d7 100644 > --- a/lisp/mouse.el > +++ b/lisp/mouse.el > @@ -271,10 +271,10 @@ mouse-menu-bar-map > ;; FIXME: We have a problem here: we have to use the global/local/minor > ;; so they're displayed in the expected order, but later on in the command > ;; loop, they're actually looked up in the opposite order. > - (apply 'append > - global-menu > - local-menu > - minor-mode-menus))) > + (menu-bar-keymap (apply 'append > + global-menu > + local-menu > + minor-mode-menus)))) From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 25 03:00:37 2021 Received: (at 50067) by debbugs.gnu.org; 25 Nov 2021 08:00:38 +0000 Received: from localhost ([127.0.0.1]:55661 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mq9gL-00039f-KN for submit@debbugs.gnu.org; Thu, 25 Nov 2021 03:00:37 -0500 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:33513) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mq9gF-00039E-8M for 50067@debbugs.gnu.org; Thu, 25 Nov 2021 03:00:35 -0500 Received: (Authenticated sender: juri@linkov.net) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 4381FC0008 for <50067@debbugs.gnu.org>; Thu, 25 Nov 2021 08:00:23 +0000 (UTC) From: Juri Linkov To: 50067@debbugs.gnu.org Subject: Re: bug#50067: Context menus Organization: LINKOV.NET References: <87pmufb3u0.fsf@mail.linkov.net> <875ytr1vkp.fsf@mail.linkov.net> <864k8mwgzr.fsf@mail.linkov.net> <86bl2hux4y.fsf@mail.linkov.net> Date: Thu, 25 Nov 2021 09:50:40 +0200 In-Reply-To: <86bl2hux4y.fsf@mail.linkov.net> (Juri Linkov's message of "Thu, 18 Nov 2021 20:38:53 +0200") Message-ID: <86h7c0wu5r.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 50067 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-=-= Content-Type: text/plain After clicking the right mouse button e.g. on the mode-line's minor-modes, typing S-F10 on a misspelled word pops up the context menu over the mode-line instead of the position over the misspelled word. Because it tries to find the last event that is a mouse event. In case of keyboard-based 'context-menu-open' that let-binds 'inhibit-mouse-event-check' to t, this is not needed: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=inhibit_mouse_event_check.patch diff --git a/src/callint.c b/src/callint.c index 44dae361c1..525a18683d 100644 --- a/src/callint.c +++ b/src/callint.c @@ -367,7 +367,7 @@ DEFUN ("call-interactively", Fcall_interactively, Scall_interactively, 1, 3, 0, event with parameters. */ ptrdiff_t next_event; for (next_event = 0; next_event < key_count; next_event++) - if (EVENT_HAS_PARAMETERS (AREF (keys, next_event))) + if (inhibit_mouse_event_check || EVENT_HAS_PARAMETERS (AREF (keys, next_event))) break; /* Handle special starting chars `*' and `@'. Also `-'. */ @@ -618,6 +618,7 @@ DEFUN ("call-interactively", Fcall_interactively, Scall_interactively, 1, 3, 0, do next_event++; while (next_event < key_count + && ! inhibit_mouse_event_check && ! EVENT_HAS_PARAMETERS (AREF (keys, next_event))); break; --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 25 03:39:03 2021 Received: (at 50067) by debbugs.gnu.org; 25 Nov 2021 08:39:03 +0000 Received: from localhost ([127.0.0.1]:55681 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mqAHW-00042m-NR for submit@debbugs.gnu.org; Thu, 25 Nov 2021 03:39:03 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42658) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mqAHI-000424-M0 for 50067@debbugs.gnu.org; Thu, 25 Nov 2021 03:39:01 -0500 Received: from [2001:470:142:3::e] (port=33054 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 1mqAHC-0000ZC-SL; Thu, 25 Nov 2021 03:38:42 -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=lSHga249l3NHxa3HzgatAXZ1OD4qQSSh3fmrfVwtpg0=; b=qS30ztZWGYEw hRhYW+36xurbvZ8ZJZ17MVPxrhKUQTN4OwWBuUxn6l+gOM3Au8p+c1V6c91qgTTozVyNsKSf44+QD rwji1uMVhk3hsiZ7m7ke2G24enbavlVyF9nC9nivv93qG1AvlCBM5K+Mf/ByaHgJW9UIw9/9fUSVp puCkmxUfS8uyDNH7q2cqlZA6tpgZW/p5shMYAzWoptt3P5Q+uY9dVygKIWvvpUlQZc+FZ7ey/C8ei 6L4gIx/Om3JQQVDXEzMZstNbkQ92KymO6YD+ILooo9ycNQG8ezbvZ881LOULWoLzC8Z0XBd8Wke09 hLXNavuC5EQdm8FGxYV5Qg==; Received: from [87.69.77.57] (port=4223 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 1mqAHC-0003D9-Iz; Thu, 25 Nov 2021 03:38:42 -0500 Date: Thu, 25 Nov 2021 10:38:44 +0200 Message-Id: <83czmo7hpn.fsf@gnu.org> From: Eli Zaretskii To: Juri Linkov In-Reply-To: <86h7c0wu5r.fsf@mail.linkov.net> (message from Juri Linkov on Thu, 25 Nov 2021 09:50:40 +0200) Subject: Re: bug#50067: Context menus References: <87pmufb3u0.fsf@mail.linkov.net> <875ytr1vkp.fsf@mail.linkov.net> <864k8mwgzr.fsf@mail.linkov.net> <86bl2hux4y.fsf@mail.linkov.net> <86h7c0wu5r.fsf@mail.linkov.net> X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 50067 Cc: 50067@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Juri Linkov > Date: Thu, 25 Nov 2021 09:50:40 +0200 > > --- a/src/callint.c > +++ b/src/callint.c > @@ -367,7 +367,7 @@ DEFUN ("call-interactively", Fcall_interactively, Scall_interactively, 1, 3, 0, > event with parameters. */ > ptrdiff_t next_event; > for (next_event = 0; next_event < key_count; next_event++) > - if (EVENT_HAS_PARAMETERS (AREF (keys, next_event))) > + if (inhibit_mouse_event_check || EVENT_HAS_PARAMETERS (AREF (keys, next_event))) > break; > > /* Handle special starting chars `*' and `@'. Also `-'. */ > @@ -618,6 +618,7 @@ DEFUN ("call-interactively", Fcall_interactively, Scall_interactively, 1, 3, 0, > do > next_event++; > while (next_event < key_count > + && ! inhibit_mouse_event_check > && ! EVENT_HAS_PARAMETERS (AREF (keys, next_event))); > > break; Why check this condition inside the loops, rather than avoid entering the loops when the condition is right, in the first place? And please add comments there explaining the meaning of the inhibit_mouse_event_check test. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 25 14:33:06 2021 Received: (at 50067) by debbugs.gnu.org; 25 Nov 2021 19:33:06 +0000 Received: from localhost ([127.0.0.1]:58058 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mqKUU-0003XM-3Y for submit@debbugs.gnu.org; Thu, 25 Nov 2021 14:33:06 -0500 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:45339) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mqKUP-0003Wm-05 for 50067@debbugs.gnu.org; Thu, 25 Nov 2021 14:33:04 -0500 Received: (Authenticated sender: juri@linkov.net) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 9E7711C0005; Thu, 25 Nov 2021 19:32:53 +0000 (UTC) From: Juri Linkov To: Eli Zaretskii Subject: Re: bug#50067: Context menus Organization: LINKOV.NET References: <87pmufb3u0.fsf@mail.linkov.net> <875ytr1vkp.fsf@mail.linkov.net> <864k8mwgzr.fsf@mail.linkov.net> <86bl2hux4y.fsf@mail.linkov.net> <86h7c0wu5r.fsf@mail.linkov.net> <83czmo7hpn.fsf@gnu.org> Date: Thu, 25 Nov 2021 21:28:47 +0200 In-Reply-To: <83czmo7hpn.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 25 Nov 2021 10:38:44 +0200") Message-ID: <865ysgkpao.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 50067 Cc: 50067@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-=-= Content-Type: text/plain >> @@ -367,7 +367,7 @@ DEFUN ("call-interactively", Fcall_interactively, Scall_interactively, 1, 3, 0, >> event with parameters. */ >> ptrdiff_t next_event; >> for (next_event = 0; next_event < key_count; next_event++) >> - if (EVENT_HAS_PARAMETERS (AREF (keys, next_event))) >> + if (inhibit_mouse_event_check || EVENT_HAS_PARAMETERS (AREF (keys, next_event))) >> break; >> >> /* Handle special starting chars `*' and `@'. Also `-'. */ >> @@ -618,6 +618,7 @@ DEFUN ("call-interactively", Fcall_interactively, Scall_interactively, 1, 3, 0, >> do >> next_event++; >> while (next_event < key_count >> + && ! inhibit_mouse_event_check >> && ! EVENT_HAS_PARAMETERS (AREF (keys, next_event))); >> >> break; > > Why check this condition inside the loops, rather than avoid entering > the loops when the condition is right, in the first place? I thought that checking the condition inside the loops would be less risky for the emacs-28 release branch. > And please add comments there explaining the meaning of the > inhibit_mouse_event_check test. This patch also adds comments, and removes one condition that is not unnecessary when event with parameters is not searched when inhibit_mouse_event_check is non-nil: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=inhibit_mouse_event_check_2.patch diff --git a/src/callint.c b/src/callint.c index 44dae361c1..68f103759a 100644 --- a/src/callint.c +++ b/src/callint.c @@ -364,11 +364,14 @@ DEFUN ("call-interactively", Fcall_interactively, Scall_interactively, 1, 3, 0, /* The index of the next element of this_command_keys to examine for the 'e' interactive code. Initialize it to point to the first - event with parameters. */ - ptrdiff_t next_event; - for (next_event = 0; next_event < key_count; next_event++) - if (EVENT_HAS_PARAMETERS (AREF (keys, next_event))) - break; + event with parameters. When `inhibit_mouse_event_check' is non-nil, + the command can accept an event without parameters, + so don't search for the event with parameters in this case. */ + ptrdiff_t next_event = 0; + if (!inhibit_mouse_event_check) + for (; next_event < key_count; next_event++) + if (EVENT_HAS_PARAMETERS (AREF (keys, next_event))) + break; /* Handle special starting chars `*' and `@'. Also `-'. */ /* Note that `+' is reserved for user extensions. */ @@ -606,7 +609,7 @@ DEFUN ("call-interactively", Fcall_interactively, Scall_interactively, 1, 3, 0, break; case 'e': /* The invoking event. */ - if (!inhibit_mouse_event_check && next_event >= key_count) + if (next_event >= key_count) error ("%s must be bound to an event with parameters", (SYMBOLP (function) ? SSDATA (SYMBOL_NAME (function)) @@ -614,11 +617,15 @@ DEFUN ("call-interactively", Fcall_interactively, Scall_interactively, 1, 3, 0, args[i] = AREF (keys, next_event); varies[i] = -1; - /* Find the next parameterized event. */ - do + /* `inhibit_mouse_event_check' allows non-parameterized events. */ + if (inhibit_mouse_event_check) next_event++; - while (next_event < key_count - && ! EVENT_HAS_PARAMETERS (AREF (keys, next_event))); + else + /* Find the next parameterized event. */ + do + next_event++; + while (next_event < key_count + && ! EVENT_HAS_PARAMETERS (AREF (keys, next_event))); break; --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 30 13:14:11 2021 Received: (at 50067) by debbugs.gnu.org; 30 Nov 2021 18:14:11 +0000 Received: from localhost ([127.0.0.1]:42475 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ms7dr-0006JO-Ga for submit@debbugs.gnu.org; Tue, 30 Nov 2021 13:14:11 -0500 Received: from relay11.mail.gandi.net ([217.70.178.231]:60451) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ms7dp-0006J9-SQ for 50067@debbugs.gnu.org; Tue, 30 Nov 2021 13:14:10 -0500 Received: (Authenticated sender: juri@linkov.net) by relay11.mail.gandi.net (Postfix) with ESMTPSA id 27F6B10000B; Tue, 30 Nov 2021 18:14:02 +0000 (UTC) From: Juri Linkov To: Eli Zaretskii Subject: Re: bug#50067: Context menus Organization: LINKOV.NET References: <87pmufb3u0.fsf@mail.linkov.net> <875ytr1vkp.fsf@mail.linkov.net> <864k8mwgzr.fsf@mail.linkov.net> <86bl2hux4y.fsf@mail.linkov.net> <86h7c0wu5r.fsf@mail.linkov.net> <83czmo7hpn.fsf@gnu.org> <865ysgkpao.fsf@mail.linkov.net> Date: Tue, 30 Nov 2021 20:12:48 +0200 In-Reply-To: <865ysgkpao.fsf@mail.linkov.net> (Juri Linkov's message of "Thu, 25 Nov 2021 21:28:47 +0200") Message-ID: <86r1axcy1r.fsf@mail.linkov.net> 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 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 50067 Cc: 50067@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> Why check this condition inside the loops, rather than avoid entering >> the loops when the condition is right, in the first place? > > I thought that checking the condition inside the loops > would be less risky for the emacs-28 release branch. > >> And please add comments there explaining the meaning of the >> inhibit_mouse_event_check test. > > This patch also adds comments, and removes one condition > that is not unnecessary when event with parameters > is not searched when inhibit_mouse_event_check is non-nil: Patch pushed now. From unknown Wed Jun 18 23:09:33 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 29 Dec 2021 12:24:08 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator