Received: (at 14793) by debbugs.gnu.org; 5 Oct 2017 07:56:00 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Oct 05 03:56:00 2017 Received: from localhost ([127.0.0.1]:49649 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1e010h-0005wQ-Qo for submit <at> debbugs.gnu.org; Thu, 05 Oct 2017 03:56:00 -0400 Received: from eggs.gnu.org ([208.118.235.92]:41000) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1e010g-0005wF-At for 14793 <at> debbugs.gnu.org; Thu, 05 Oct 2017 03:55:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <eliz@HIDDEN>) id 1e010W-0006kD-D0 for 14793 <at> debbugs.gnu.org; Thu, 05 Oct 2017 03:55:53 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:44478) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>) id 1e010E-0006bG-5y; Thu, 05 Oct 2017 03:55:30 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2618 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from <eliz@HIDDEN>) id 1e0107-0006iE-W3; Thu, 05 Oct 2017 03:55:24 -0400 Date: Thu, 05 Oct 2017 10:55:11 +0300 Message-Id: <83fuayxc4g.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> To: Alex <agrambot@HIDDEN> In-reply-to: <87vajuutxq.fsf@HIDDEN> (message from Alex on Wed, 04 Oct 2017 21:58:41 -0600) Subject: Re: bug#14793: 23.4; Cannot bind a function to a sequence of two mouse keys References: <CANPgWdLNEFCuMdd6HU=MqZuE567A=y8RFk4FvjK3+3TPNc28Jw@HIDDEN> <878twa94c5.fsf@HIDDEN> <878tgvy3dq.fsf@HIDDEN> <83tvzi3lh8.fsf@HIDDEN> <87h8virbzn.fsf@HIDDEN> <83poa63es2.fsf@HIDDEN> <8760bwridy.fsf@HIDDEN> <83r2uk1eu5.fsf@HIDDEN> <87vajuutxq.fsf@HIDDEN> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 14793 Cc: 14793 <at> debbugs.gnu.org, regularclockwork@HIDDEN, npostavs@HIDDEN X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Reply-To: Eli Zaretskii <eliz@HIDDEN> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -5.0 (-----) > From: Alex <agrambot@HIDDEN> > Cc: 14793 <at> debbugs.gnu.org, npostavs@HIDDEN, regularclockwork@HIDDEN > Date: Wed, 04 Oct 2017 21:58:41 -0600 > > There are a couple issues that I can see though, regarding double/triple > clicks. First, evaluate the following: > > (define-prefix-command 'test) > (global-set-key [mouse-3] #'test) > (global-set-key [mouse-3 mouse-1] #'forward-word) > > 1. Triple clicking mouse-3 results in a popup menu that seems like it > shouldn't appear, but this is also case when triple clicking > C-mouse-3 even without my patch. I'm not sure what it's doing there. > > 2. Double clicking mouse-3 usually results in a mouse-3 double-mouse-3 > sequence, instead of double-mouse-3. You can tell by also evaluating: > > (global-set-key [mouse-3 double-mouse-3] #'forward-line) > (global-set-key [double-mouse-3] #'goto-line) > > With the above key set, double clicking mouse-3 calls `forward-line', > and oddly enough _triple_ clicking mouse-3 calls `goto-line'. Here's what > `describe-key' has to say about triple clicking mouse-3: > > <double-mouse-3> (translated from <triple-down-mouse-3> > <triple-mouse-3>) runs the command goto-line > > I have no idea why that translation exists. > > Do you have any ideas on how to solve these issues (especially getting > double click to issue double-mouse-#)? No ideas at the moment, but I think we should first decide whether we want to allow mouse clicks as prefix keys. What are the practical gains that justify messing with read_char on this behalf? We already have the equivalent functionality via menus, right? Not that I want to discourage you from digging into these issues ;-) Thanks.
bug-gnu-emacs@HIDDEN
:bug#14793
; Package emacs
.
Full text available.Received: (at 14793) by debbugs.gnu.org; 5 Oct 2017 03:58:57 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Wed Oct 04 23:58:56 2017 Received: from localhost ([127.0.0.1]:49553 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1dzxJI-00007m-Hb for submit <at> debbugs.gnu.org; Wed, 04 Oct 2017 23:58:56 -0400 Received: from mail-it0-f51.google.com ([209.85.214.51]:51692) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <agrambot@HIDDEN>) id 1dzxJG-00007U-9D for 14793 <at> debbugs.gnu.org; Wed, 04 Oct 2017 23:58:54 -0400 Received: by mail-it0-f51.google.com with SMTP id w1so8841294itd.0 for <14793 <at> debbugs.gnu.org>; Wed, 04 Oct 2017 20:58:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:message-id:user-agent :mime-version; bh=7JPkuS7Sx34cEsrE3AliOaECQacCZT3/xcSEAS2ITB8=; b=s/27nzGFFi6af7EvkuwGeozjk9nmDIIkJlNhzpjj+24CWxiRupH1EHBi+OcjQshtOf G5owkT+KSgevpN8AV7AMCW5+Q60WO47KQ77yIy/oy8+SRoNOUgZModxIGdyLoG9rxHQh tra1sr7MgoRS7eX78Q0LT6Fnuz7lRy7rpeinxVnOjptkkQeg15Q3HO6zLcllNFkU2wdW clqI36KbjeXV3UL6DoRQJ3PmkU4S/vqXOl11OAnkUNJYiU/vDwVF6MfLr5rL/gBWmt0I X/IY+mg2xXucYKUPFdLmpFYAp52WN/IKDA+KReQQLdH0oq4A7GhpiADmKTmkKn9jtBcW 4ihA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:message-id :user-agent:mime-version; bh=7JPkuS7Sx34cEsrE3AliOaECQacCZT3/xcSEAS2ITB8=; b=r+YgrIyuq/pVY3xhDbAaL367NZxi/AEl6wcUfpyR6kyLwHGkX2TAhUZHOedel8HxgW yDOPFQ/fDW90UtON8yvAFi9ndgq/PW1m/LH9f7AyqdYoNCuybrTZg365H0hvca4fWGmH IndCc39K1ZMkc4FCuEdsCQY7gjL6H0OcAh2UJO6QlfcW8EcWTyphYKYK4673uQUlKhV9 85a89dvVrZHpCPi0v0HAQSg++6C2/w17O5guLLefXS2+558uNmGliPPftrX517WNLmEC rigp+HGbN95gGlxBo9dfHS5Ie55vH1k+g7PbMAj8L+ztypQ1mLaDevHchSrSvqi3wHGn AIzQ== X-Gm-Message-State: AHPjjUjWei3osZeS9QCecQVtpIBZgi4IsPntOyv5RjMD4gXTNL7pWK5O DbhIPyiUSOwBEZ0JWSSZt6c= X-Google-Smtp-Source: AOwi7QCIJpNg/Hd4N+O2fCNiqojLDmwTYgNH6PD8rF7thQ8LiOu+FR9VJ9mgPDqeviY8J1E5IH7HgQ== X-Received: by 10.36.238.6 with SMTP id b6mr32042071iti.70.1507175928657; Wed, 04 Oct 2017 20:58:48 -0700 (PDT) Received: from lylat (S010664777d9cebe3.ss.shawcable.net. [70.64.85.59]) by smtp.gmail.com with ESMTPSA id h81sm616767itb.18.2017.10.04.20.58.46 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 04 Oct 2017 20:58:47 -0700 (PDT) From: Alex <agrambot@HIDDEN> To: Eli Zaretskii <eliz@HIDDEN> Subject: Re: bug#14793: 23.4; Cannot bind a function to a sequence of two mouse keys References: <CANPgWdLNEFCuMdd6HU=MqZuE567A=y8RFk4FvjK3+3TPNc28Jw@HIDDEN> <878twa94c5.fsf@HIDDEN> <878tgvy3dq.fsf@HIDDEN> <83tvzi3lh8.fsf@HIDDEN> <87h8virbzn.fsf@HIDDEN> <83poa63es2.fsf@HIDDEN> <8760bwridy.fsf@HIDDEN> <83r2uk1eu5.fsf@HIDDEN> Date: Wed, 04 Oct 2017 21:58:41 -0600 Message-ID: <87vajuutxq.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 14793 Cc: 14793 <at> debbugs.gnu.org, regularclockwork@HIDDEN, npostavs@HIDDEN X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.0 (/) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Eli Zaretskii <eliz@HIDDEN> writes: >> From: Alex <agrambot@HIDDEN> >> Cc: 14793 <at> debbugs.gnu.org, npostavs@HIDDEN, regularcloc= kwork@HIDDEN >> Date: Mon, 02 Oct 2017 21:59:37 -0600 >>=20 >> > I just asked that question because my reading of the code is that this >> > is not supported. Maybe I'm misreading: keyboard.c:read_char is not >> > for the faint at heart. >>=20 >> Yeah, I'm having trouble going through it. Is there a way to make it >> supported, though? For example, what about catching the error around >> read_char_x_menu_prompt (keyboard.c:L2683) and not exiting if an error >> was thrown? > > That's hardly a clean solution. A clean solution would avoid calling > Fx_popup_menu when it detects the situation we are talking about. Right, I just figured it was the easiest way to check if the rest of the code supported prefix mouse clicks, but maybe it isn't for C. In any case, I have a possible solution below. >> >> Also, "(emacs) Mouse Buttons" states that "You can put more than one >> >> mouse button in a key sequence, but it isn=E2=80=99t usual to do so.". >> >>=20 >> >> How would one do this if a mouse click can't be a prefix key? >> > >> > By making a menu, I presume. >>=20 >> Do you mean those mentioned in "(emacs) Menu Mouse Clicks"? Does >> clicking in those menus count as key sequences? > > Yes, of course. You can see that with "C-h l", for example. Also, > every non-leaf menu item is a keymap. Ah, I see it now. It seems that it depends on the menu (the binding for C-down-mouse-1 isn't a keymap, but C-down-mouse-2's is, which is important for below). Anyway, I tried out the following diff, which is based on the condition at xmenu.c:L1460. The problem is that it uses the global variable `menu_items_used', which is incremented during the execution of Fx_popup_menu (keymap_panes). So the diff uses the value of `menu_items_used' of the previously called menu. With the diff, you can see that pressing C-down-mouse-2 right after startup leads to an undefined key message instead of opening a menu; after pressing C-down-mouse-1, though, pressing C-down-mouse-2 opens its menu properly. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=mouse.diff Content-Description: simple diff diff --git a/src/keyboard.c b/src/keyboard.c index e8701b8870..5f92807087 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -2678,7 +2678,8 @@ read_char (int commandflag, Lisp_Object map, && !EQ (XCAR (prev_event), Qmenu_bar) && !EQ (XCAR (prev_event), Qtool_bar) /* Don't bring up a menu if we already have another event. */ - && !CONSP (Vunread_command_events)) + && !CONSP (Vunread_command_events) + && menu_items_used > MENU_ITEMS_PANE_LENGTH) { c = read_char_x_menu_prompt (map, prev_event, used_mouse_menu); -- 2.14.2 --=-=-= Content-Type: text/plain I've attached a patch that seems to work for single clicks. I had to move Fx_popup_menu's implementation outside of DEFUN so I could use used_mouse_menu in it. What do you think? --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Allow-mouse-clicks-to-be-prefix-keys-Bug-14793.patch Content-Description: mouse prefix From d001740b0f59cdc2165d62e05c7f2cb5ff8ab6b4 Mon Sep 17 00:00:00 2001 From: Alexander Gramiak <agrambot@HIDDEN> Date: Tue, 3 Oct 2017 17:11:08 -0600 Subject: [PATCH] Allow mouse clicks to be prefix keys (Bug#14793) * src/keyboard.c (read_char): Check used_mouse_menu after calling read_char_x_menu_prompt. (read_char_x_menu_prompt): Pass used_mouse_menu to x_popup_menu and return nil if it wasn't set to true. * src/menu.c (Fx_popup_menu): Extract into a new function. (x_popup_menu): New function. Don't error if used_mouse_menu is null, and set used_mouse_menu if there was no error. * src/keyboard.h: Declare x_popup_menu. --- src/keyboard.c | 21 +++++++++++++-------- src/keyboard.h | 3 +++ src/menu.c | 11 ++++++++++- 3 files changed, 26 insertions(+), 9 deletions(-) diff --git a/src/keyboard.c b/src/keyboard.c index e8701b8870..5912f89115 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -2682,11 +2682,15 @@ read_char (int commandflag, Lisp_Object map, { c = read_char_x_menu_prompt (map, prev_event, used_mouse_menu); - /* Now that we have read an event, Emacs is not idle. */ - if (!end_time) - timer_stop_idle (); + /* Only exit if a mouse menu was actually used successfully. */ + if (*used_mouse_menu) + { + /* Now that we have read an event, Emacs is not idle. */ + if (!end_time) + timer_stop_idle (); - goto exit; + goto exit; + } } /* Maybe autosave and/or garbage collect due to idleness. */ @@ -8457,8 +8461,11 @@ read_char_x_menu_prompt (Lisp_Object map, /* Display the menu and get the selection. */ Lisp_Object value; - value = Fx_popup_menu (prev_event, get_keymap (map, 0, 1)); - if (CONSP (value)) + value = x_popup_menu (prev_event, get_keymap (map, 0, 1), used_mouse_menu); + + if (!*used_mouse_menu) + value = Qnil; + else if (CONSP (value)) { Lisp_Object tem; @@ -8489,8 +8496,6 @@ read_char_x_menu_prompt (Lisp_Object map, } else if (NILP (value)) value = Qt; - if (used_mouse_menu) - *used_mouse_menu = true; return value; } return Qnil ; diff --git a/src/keyboard.h b/src/keyboard.h index a2a5f8f21d..954485c78b 100644 --- a/src/keyboard.h +++ b/src/keyboard.h @@ -360,6 +360,9 @@ enum menu_item_idx extern void unuse_menu_items (void); +extern Lisp_Object +x_popup_menu (Lisp_Object position, Lisp_Object menu, bool *used_mouse_menu); + /* This is how to deal with multibyte text if HAVE_MULTILINGUAL_MENU isn't defined. The use of HAVE_MULTILINGUAL_MENU could probably be confined to an extended version of this with sections of code below diff --git a/src/menu.c b/src/menu.c index d569b4b29b..257c67f6a4 100644 --- a/src/menu.c +++ b/src/menu.c @@ -1157,6 +1157,12 @@ keyboard input, then this normally results in a quit and event (indicating that the user invoked the menu with the mouse) then no quit occurs and `x-popup-menu' returns nil. */) (Lisp_Object position, Lisp_Object menu) +{ + return x_popup_menu (position, menu, NULL); +} + +Lisp_Object +x_popup_menu (Lisp_Object position, Lisp_Object menu, bool *used_mouse_menu) { Lisp_Object keymap, tem, tem2; int xpos = 0, ypos = 0; @@ -1439,7 +1445,10 @@ no quit occurs and `x-popup-menu' returns nil. */) FRAME_DISPLAY_INFO (f)->grabbed = 0; #endif - if (error_name) error ("%s", error_name); + if (error_name && !used_mouse_menu) + error ("%s", error_name); + else if (!error_name && used_mouse_menu) + *used_mouse_menu = true; return selection; } -- 2.14.2 --=-=-= Content-Type: text/plain There are a couple issues that I can see though, regarding double/triple clicks. First, evaluate the following: (define-prefix-command 'test) (global-set-key [mouse-3] #'test) (global-set-key [mouse-3 mouse-1] #'forward-word) 1. Triple clicking mouse-3 results in a popup menu that seems like it shouldn't appear, but this is also case when triple clicking C-mouse-3 even without my patch. I'm not sure what it's doing there. 2. Double clicking mouse-3 usually results in a mouse-3 double-mouse-3 sequence, instead of double-mouse-3. You can tell by also evaluating: (global-set-key [mouse-3 double-mouse-3] #'forward-line) (global-set-key [double-mouse-3] #'goto-line) With the above key set, double clicking mouse-3 calls `forward-line', and oddly enough _triple_ clicking mouse-3 calls `goto-line'. Here's what `describe-key' has to say about triple clicking mouse-3: <double-mouse-3> (translated from <triple-down-mouse-3> <triple-mouse-3>) runs the command goto-line I have no idea why that translation exists. Do you have any ideas on how to solve these issues (especially getting double click to issue double-mouse-#)? If not, maybe I'll fiddle around with read_key_sequence later. --=-=-=--
bug-gnu-emacs@HIDDEN
:bug#14793
; Package emacs
.
Full text available.Received: (at 14793) by debbugs.gnu.org; 3 Oct 2017 14:34:03 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Oct 03 10:34:03 2017 Received: from localhost ([127.0.0.1]:46441 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1dzOGp-0003Am-Ey for submit <at> debbugs.gnu.org; Tue, 03 Oct 2017 10:34:03 -0400 Received: from eggs.gnu.org ([208.118.235.92]:36641) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1dzOGn-00039x-Ln for 14793 <at> debbugs.gnu.org; Tue, 03 Oct 2017 10:34:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <eliz@HIDDEN>) id 1dzOGa-00028I-Sg for 14793 <at> debbugs.gnu.org; Tue, 03 Oct 2017 10:33:56 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:33819) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>) id 1dzOGA-0001c0-H6; Tue, 03 Oct 2017 10:33:22 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2774 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from <eliz@HIDDEN>) id 1dzOG9-0006Py-SO; Tue, 03 Oct 2017 10:33:22 -0400 Date: Tue, 03 Oct 2017 17:33:06 +0300 Message-Id: <83r2uk1eu5.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> To: Alex <agrambot@HIDDEN> In-reply-to: <8760bwridy.fsf@HIDDEN> (message from Alex on Mon, 02 Oct 2017 21:59:37 -0600) Subject: Re: bug#14793: 23.4; Cannot bind a function to a sequence of two mouse keys References: <CANPgWdLNEFCuMdd6HU=MqZuE567A=y8RFk4FvjK3+3TPNc28Jw@HIDDEN> <878twa94c5.fsf@HIDDEN> <878tgvy3dq.fsf@HIDDEN> <83tvzi3lh8.fsf@HIDDEN> <87h8virbzn.fsf@HIDDEN> <83poa63es2.fsf@HIDDEN> <8760bwridy.fsf@HIDDEN> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 14793 Cc: 14793 <at> debbugs.gnu.org, regularclockwork@HIDDEN, npostavs@HIDDEN X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Reply-To: Eli Zaretskii <eliz@HIDDEN> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -5.0 (-----) > From: Alex <agrambot@HIDDEN> > Cc: 14793 <at> debbugs.gnu.org, npostavs@HIDDEN, regularclockwork@HIDDEN > Date: Mon, 02 Oct 2017 21:59:37 -0600 > > > I just asked that question because my reading of the code is that this > > is not supported. Maybe I'm misreading: keyboard.c:read_char is not > > for the faint at heart. > > Yeah, I'm having trouble going through it. Is there a way to make it > supported, though? For example, what about catching the error around > read_char_x_menu_prompt (keyboard.c:L2683) and not exiting if an error > was thrown? That's hardly a clean solution. A clean solution would avoid calling Fx_popup_menu when it detects the situation we are talking about. > >> Also, "(emacs) Mouse Buttons" states that "You can put more than one > >> mouse button in a key sequence, but it isn’t usual to do so.". > >> > >> How would one do this if a mouse click can't be a prefix key? > > > > By making a menu, I presume. > > Do you mean those mentioned in "(emacs) Menu Mouse Clicks"? Does > clicking in those menus count as key sequences? Yes, of course. You can see that with "C-h l", for example. Also, every non-leaf menu item is a keymap.
bug-gnu-emacs@HIDDEN
:bug#14793
; Package emacs
.
Full text available.Received: (at 14793) by debbugs.gnu.org; 3 Oct 2017 03:59:51 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Oct 02 23:59:51 2017 Received: from localhost ([127.0.0.1]:44910 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1dzEN5-0008Cv-4D for submit <at> debbugs.gnu.org; Mon, 02 Oct 2017 23:59:51 -0400 Received: from mail-it0-f54.google.com ([209.85.214.54]:54263) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <agrambot@HIDDEN>) id 1dzEN3-0008Cg-Fu for 14793 <at> debbugs.gnu.org; Mon, 02 Oct 2017 23:59:49 -0400 Received: by mail-it0-f54.google.com with SMTP id 85so9818316ith.2 for <14793 <at> debbugs.gnu.org>; Mon, 02 Oct 2017 20:59:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=8ZkILGAz4Q0MUxaQ7ebnUz1giQZEoA36/dFvVe2pTvA=; b=EiLIkDKm549FkhHClorx9FivxQJ34BsxwCKPzO51MCVGvuj5LOPX7bfg9VyaKbakkh 6+W3QMDI2NnPAq4n42uO9IkVNUwN2vDNIpEnl/rCnLXp3u2GG8RD8yfbq5dC90yPOQzZ PR57vc/E/47r5gPhnTqKL9SSwhxdsqTJIg+LCQZRn0yY5rUXBv4fWzk+lccYMqvy15jW BdTDv1ZmRMzwiGSOKnKC1hL4HQn5YujI0NiV++bPnBLgu/taDVKY5XkeMProHmS7DS25 9WoH3tU8CLLqkRHzZ/eYcK3F4UZTHDDErPSDRloNNF6gncgVMbpzPJO56vmfEXwQX48E iKFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=8ZkILGAz4Q0MUxaQ7ebnUz1giQZEoA36/dFvVe2pTvA=; b=oTv3JUr3jW/FMdcUUh/09kURccjp59v2SkeJbtbt9ZCJNLKHl57+1jMCm0XNVOLm6e HElzYpAWGw6MmGmbxbpQLkaNHrtRSj2U2e5CT+tYvoTKghq8X41rcHXh6PV/nFQoMxUJ QhXnv/KFEHNOOIsDu/VasHzWRhEfHfec26BRq932KNYYFebaWDyTQXMptiXrRKUhilWL JBGUFVumFid0cRSGtupFWuc+RZEDEHtRfknqyUqtG8cpBkforjCUleiLtCW+/R4Q2wI1 wrqtpZjyw8ccDH222JSUG4QNStp/Y8O9i6/HQYekTnjUOSC/+WNrpNUvIePKgRemRckH 6iow== X-Gm-Message-State: AMCzsaWg+0uYeC1RLPbCRirHgJAM8c+e5xIMooic/BsrfzaVNLgWvPBV tVurRn8NNw71mzXPiMp/Beo= X-Google-Smtp-Source: AOwi7QCrAV4JDTXJEMa/ZS8NGlgY8d1+YZOu3LRpW3+/rVwpYt1/JqAczRl3i6Q/rz/Z6nn5MZsFOw== X-Received: by 10.36.82.150 with SMTP id d144mr22568376itb.1.1507003183773; Mon, 02 Oct 2017 20:59:43 -0700 (PDT) Received: from lylat (S010664777d9cebe3.ss.shawcable.net. [70.64.85.59]) by smtp.gmail.com with ESMTPSA id w132sm5123645itf.4.2017.10.02.20.59.41 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 02 Oct 2017 20:59:42 -0700 (PDT) From: Alex <agrambot@HIDDEN> To: Eli Zaretskii <eliz@HIDDEN> Subject: Re: bug#14793: 23.4; Cannot bind a function to a sequence of two mouse keys References: <CANPgWdLNEFCuMdd6HU=MqZuE567A=y8RFk4FvjK3+3TPNc28Jw@HIDDEN> <878twa94c5.fsf@HIDDEN> <878tgvy3dq.fsf@HIDDEN> <83tvzi3lh8.fsf@HIDDEN> <87h8virbzn.fsf@HIDDEN> <83poa63es2.fsf@HIDDEN> Date: Mon, 02 Oct 2017 21:59:37 -0600 In-Reply-To: <83poa63es2.fsf@HIDDEN> (Eli Zaretskii's message of "Sun, 01 Oct 2017 21:26:53 +0300") Message-ID: <8760bwridy.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.8 (/) X-Debbugs-Envelope-To: 14793 Cc: 14793 <at> debbugs.gnu.org, regularclockwork@HIDDEN, npostavs@HIDDEN X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.2 (/) Eli Zaretskii <eliz@HIDDEN> writes: >> From: Alex <agrambot@HIDDEN> >> Cc: 14793 <at> debbugs.gnu.org, npostavs@HIDDEN, regularcloc= kwork@HIDDEN >> Date: Sun, 01 Oct 2017 11:53:16 -0600 >>=20 >> > Who said a mouse click could be a prefix key? >>=20 >> Does the manual state that a mouse click can't be a prefix key? > > If you are arguing that the manual is incomplete or inaccurate, I > could agree, but that's a different/separate issue, I'm sure. Fixing > the docs is easy. If it turns out that mouse clicks can't be prefix keys, then the doc should indeed be fixed. > I just asked that question because my reading of the code is that this > is not supported. Maybe I'm misreading: keyboard.c:read_char is not > for the faint at heart. Yeah, I'm having trouble going through it. Is there a way to make it supported, though? For example, what about catching the error around read_char_x_menu_prompt (keyboard.c:L2683) and not exiting if an error was thrown? I'm not sure how to go about this in C. >> Also, "(emacs) Mouse Buttons" states that "You can put more than one >> mouse button in a key sequence, but it isn=E2=80=99t usual to do so.". >>=20 >> How would one do this if a mouse click can't be a prefix key? > > By making a menu, I presume. Do you mean those mentioned in "(emacs) Menu Mouse Clicks"? Does clicking in those menus count as key sequences?
bug-gnu-emacs@HIDDEN
:bug#14793
; Package emacs
.
Full text available.Received: (at 14793) by debbugs.gnu.org; 1 Oct 2017 18:27:33 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun Oct 01 14:27:33 2017 Received: from localhost ([127.0.0.1]:43096 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1dyixh-0002T8-JL for submit <at> debbugs.gnu.org; Sun, 01 Oct 2017 14:27:33 -0400 Received: from eggs.gnu.org ([208.118.235.92]:57273) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1dyixf-0002Su-RN for 14793 <at> debbugs.gnu.org; Sun, 01 Oct 2017 14:27:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <eliz@HIDDEN>) id 1dyixX-0004Pw-5Q for 14793 <at> debbugs.gnu.org; Sun, 01 Oct 2017 14:27:26 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_20,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:45539) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>) id 1dyixE-0004Bt-OP; Sun, 01 Oct 2017 14:27:04 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1091 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from <eliz@HIDDEN>) id 1dyixD-000566-4F; Sun, 01 Oct 2017 14:27:04 -0400 Date: Sun, 01 Oct 2017 21:26:53 +0300 Message-Id: <83poa63es2.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> To: Alex <agrambot@HIDDEN> In-reply-to: <87h8virbzn.fsf@HIDDEN> (message from Alex on Sun, 01 Oct 2017 11:53:16 -0600) Subject: Re: bug#14793: 23.4; Cannot bind a function to a sequence of two mouse keys References: <CANPgWdLNEFCuMdd6HU=MqZuE567A=y8RFk4FvjK3+3TPNc28Jw@HIDDEN> <878twa94c5.fsf@HIDDEN> <878tgvy3dq.fsf@HIDDEN> <83tvzi3lh8.fsf@HIDDEN> <87h8virbzn.fsf@HIDDEN> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 14793 Cc: 14793 <at> debbugs.gnu.org, regularclockwork@HIDDEN, npostavs@HIDDEN X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Reply-To: Eli Zaretskii <eliz@HIDDEN> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -5.0 (-----) > From: Alex <agrambot@HIDDEN> > Cc: 14793 <at> debbugs.gnu.org, npostavs@HIDDEN, regularclockwork@HIDDEN > Date: Sun, 01 Oct 2017 11:53:16 -0600 > > > Who said a mouse click could be a prefix key? > > Does the manual state that a mouse click can't be a prefix key? If you are arguing that the manual is incomplete or inaccurate, I could agree, but that's a different/separate issue, I'm sure. Fixing the docs is easy. I just asked that question because my reading of the code is that this is not supported. Maybe I'm misreading: keyboard.c:read_char is not for the faint at heart. > Also, "(emacs) Mouse Buttons" states that "You can put more than one > mouse button in a key sequence, but it isn’t usual to do so.". > > How would one do this if a mouse click can't be a prefix key? By making a menu, I presume.
bug-gnu-emacs@HIDDEN
:bug#14793
; Package emacs
.
Full text available.Received: (at 14793) by debbugs.gnu.org; 1 Oct 2017 17:53:29 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun Oct 01 13:53:29 2017 Received: from localhost ([127.0.0.1]:42998 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1dyiQj-0001Ts-9f for submit <at> debbugs.gnu.org; Sun, 01 Oct 2017 13:53:29 -0400 Received: from mail-io0-f173.google.com ([209.85.223.173]:44597) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <agrambot@HIDDEN>) id 1dyiQi-0001Tg-7v for 14793 <at> debbugs.gnu.org; Sun, 01 Oct 2017 13:53:28 -0400 Received: by mail-io0-f173.google.com with SMTP id v36so3206585ioi.1 for <14793 <at> debbugs.gnu.org>; Sun, 01 Oct 2017 10:53:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=qBW+Fx5/Ct2XgwrQsLC6+Y9mO9PreztS/AuUdYcCQcM=; b=UCKuphoV50UqXUgtqWw08FLmX/dN/Dqr5CPio1+6uVV1m/rMmE6dt/N33J7NnJpMeG yqtQpTsSz6JySqle5N8HQP9VAGrK5IW/eQFg8GfjB1rC6leNI7qE20frAAhsPoEf70Z1 s2qOjGZSZgTTee+NNiRi3M7Y3I3PoDWDfZv6N5aYAOPBpEpM7dZ0PhjWKNIIeruV6TAY OhbDNAsw8w38bMIq18hiQub2futwWlKgSJO60rMN6VhQCz6g2M1TUvRzRRyQi/1pwqjl wu/KzBRdLIHb1+RphpZ0ckQJzdkZU3kIIosUbT1HjpMWVUuAJ3mf2H5gQ3ETjHUFd0is h53g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=qBW+Fx5/Ct2XgwrQsLC6+Y9mO9PreztS/AuUdYcCQcM=; b=E5xG7Y9HEIrHvI3Fy4YRGOK/8noCjBY25WvBTaCCbZ/4TcAG7/6Us90UboPStYPa/Z QZIkxwG7Uc04+SP54wP1TLSnbNJMRxdzfpu5cdhaq9vGa88z85Phwwwldple1pNEE//5 gflYUE9TU1XW9k1YPOR7r3eKPw1K/NTtPA4T+43R5xT1fPzIvncJv7vwI72jvd9VfBAi 43qCaRVjYvQE12u40NFf0enuSeC6rzEXsKoIHnezYcNRQTRGW/ghYhmEnntfuaMjhRx3 aZw2WV5Wco6IDaKITEgdGO519X2jJqB8On5DWZGwW85A693UPFLygftQHBEMCYjXLSmL 7gNA== X-Gm-Message-State: AMCzsaUhyfHn+YLmCLmCGRDlyPTEwhqoNg3kFB9DA+9LR+cMfWMKdmJT ULQu7u4WvwMuw4Zo/OhpPn0= X-Google-Smtp-Source: AOwi7QCp1O2qTApxxvz4Y0m43iZ+raG9IqT1rLPuv3UbMI0qFmBEtqziqCi6zlPJJSWkGGwbCBu6nA== X-Received: by 10.107.184.139 with SMTP id i133mr21552485iof.278.1506880402462; Sun, 01 Oct 2017 10:53:22 -0700 (PDT) Received: from lylat (S010664777d9cebe3.ss.shawcable.net. [70.64.85.59]) by smtp.gmail.com with ESMTPSA id w132sm3544129itf.4.2017.10.01.10.53.20 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 01 Oct 2017 10:53:21 -0700 (PDT) From: Alex <agrambot@HIDDEN> To: Eli Zaretskii <eliz@HIDDEN> Subject: Re: bug#14793: 23.4; Cannot bind a function to a sequence of two mouse keys References: <CANPgWdLNEFCuMdd6HU=MqZuE567A=y8RFk4FvjK3+3TPNc28Jw@HIDDEN> <878twa94c5.fsf@HIDDEN> <878tgvy3dq.fsf@HIDDEN> <83tvzi3lh8.fsf@HIDDEN> Date: Sun, 01 Oct 2017 11:53:16 -0600 In-Reply-To: <83tvzi3lh8.fsf@HIDDEN> (Eli Zaretskii's message of "Sun, 01 Oct 2017 19:02:11 +0300") Message-ID: <87h8virbzn.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: 14793 Cc: 14793 <at> debbugs.gnu.org, regularclockwork@HIDDEN, npostavs@HIDDEN X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -2.3 (--) Eli Zaretskii <eliz@HIDDEN> writes: >> From: Alex <agrambot@HIDDEN> >> Cc: 14793 <at> debbugs.gnu.org, npostavs@HIDDEN, regularclockw= ork@HIDDEN >> Date: Sat, 30 Sep 2017 21:05:05 -0600 >>=20 >> (define-prefix-command 'test) >> (global-set-key (kbd "C-t") #'test) >> (global-set-key [mouse-3] #'test) >> (global-set-key (kbd "C-t <mouse-2>") #'backward-word) >> (global-set-key [mouse-3 mouse-2] #'backward-word) >>=20 >> Hitting C-t mouse-2 calls `backward-word' as intended, but hitting >> mouse-3 mouse-2 displays an "Empty menu" error as in the original >> report. >>=20 >> The error is thrown from Fx_popup_menu and is called from >> read_char_x_menu_prompt, which is only called in the mouse case. I'm not >> sure how to proceed from here. > > Who said a mouse click could be a prefix key? Does the manual state that a mouse click can't be a prefix key? "(elisp) Prefix Keys" states that "A prefix key is a key sequence whose binding is a keymap", which mouse-3 as above satisfies: (keymapp (key-binding [mouse-3])) =3D> t As long as the mouse click isn't in some special area (mode-line, menu-bar, etc.), then I would hope that it would be treated as a prefix key. Also, "(emacs) Mouse Buttons" states that "You can put more than one mouse button in a key sequence, but it isn=E2=80=99t usual to do so.". How would one do this if a mouse click can't be a prefix key? The following also fails: (define-prefix-command 'test) (global-set-key (kbd "C-t") #'test) (global-set-key (kbd "C-t <mouse-3> <mouse-2>") #'backward-word)
bug-gnu-emacs@HIDDEN
:bug#14793
; Package emacs
.
Full text available.Received: (at 14793) by debbugs.gnu.org; 1 Oct 2017 16:02:42 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun Oct 01 12:02:42 2017 Received: from localhost ([127.0.0.1]:42908 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1dyghW-0007Af-2u for submit <at> debbugs.gnu.org; Sun, 01 Oct 2017 12:02:42 -0400 Received: from eggs.gnu.org ([208.118.235.92]:46772) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1dyghT-0007AS-QN for 14793 <at> debbugs.gnu.org; Sun, 01 Oct 2017 12:02:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <eliz@HIDDEN>) id 1dyghK-0006s3-Ng for 14793 <at> debbugs.gnu.org; Sun, 01 Oct 2017 12:02:34 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:55084) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>) id 1dygh6-0006hv-OU; Sun, 01 Oct 2017 12:02:16 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4976 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from <eliz@HIDDEN>) id 1dygh5-00040i-UD; Sun, 01 Oct 2017 12:02:16 -0400 Date: Sun, 01 Oct 2017 19:02:11 +0300 Message-Id: <83tvzi3lh8.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> To: Alex <agrambot@HIDDEN> In-reply-to: <878tgvy3dq.fsf@HIDDEN> (message from Alex on Sat, 30 Sep 2017 21:05:05 -0600) Subject: Re: bug#14793: 23.4; Cannot bind a function to a sequence of two mouse keys References: <CANPgWdLNEFCuMdd6HU=MqZuE567A=y8RFk4FvjK3+3TPNc28Jw@HIDDEN> <878twa94c5.fsf@HIDDEN> <878tgvy3dq.fsf@HIDDEN> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 14793 Cc: 14793 <at> debbugs.gnu.org, regularclockwork@HIDDEN, npostavs@HIDDEN X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Reply-To: Eli Zaretskii <eliz@HIDDEN> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -5.0 (-----) > From: Alex <agrambot@HIDDEN> > Cc: 14793 <at> debbugs.gnu.org, npostavs@HIDDEN, regularclockwork@HIDDEN > Date: Sat, 30 Sep 2017 21:05:05 -0600 > > (define-prefix-command 'test) > (global-set-key (kbd "C-t") #'test) > (global-set-key [mouse-3] #'test) > (global-set-key (kbd "C-t <mouse-2>") #'backward-word) > (global-set-key [mouse-3 mouse-2] #'backward-word) > > Hitting C-t mouse-2 calls `backward-word' as intended, but hitting > mouse-3 mouse-2 displays an "Empty menu" error as in the original > report. > > The error is thrown from Fx_popup_menu and is called from > read_char_x_menu_prompt, which is only called in the mouse case. I'm not > sure how to proceed from here. Who said a mouse click could be a prefix key?
bug-gnu-emacs@HIDDEN
:bug#14793
; Package emacs
.
Full text available.Received: (at 14793) by debbugs.gnu.org; 1 Oct 2017 03:05:21 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sat Sep 30 23:05:21 2017 Received: from localhost ([127.0.0.1]:41640 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1dyUZE-0005eJ-CS for submit <at> debbugs.gnu.org; Sat, 30 Sep 2017 23:05:21 -0400 Received: from mail-io0-f171.google.com ([209.85.223.171]:51314) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <agrambot@HIDDEN>) id 1dyUZB-0005e2-Vn for 14793 <at> debbugs.gnu.org; Sat, 30 Sep 2017 23:05:18 -0400 Received: by mail-io0-f171.google.com with SMTP id l15so2490413iol.8 for <14793 <at> debbugs.gnu.org>; Sat, 30 Sep 2017 20:05:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=js8UYL6o5wlWJUVrBFVPbopVLQsob/C8JUFA6pQNZZM=; b=GO80qrE7DWfof7qZtFCiwpX2V+E/jqzWatsqSg6CSXlACMWO4xu5OhurV2LJ+gn8cR 4LnhUakwCfW+xuyxUbXyMioECXaTQlP2FWHtDHqfLXr08uYT+GCDd4j/vb293uPjlbpQ qktHyJ0Q4QDH8Q+xYe5FrLV1dd1QqRHs3YxOx6qsnrJZYp4NJmH8l0USjpNnpFwPGufJ OVG+7RKYgBMh8dSldYRIG8pW10vnlTDUMSty8Y8bZiPtwckdHQ0hz1poUOXVgqcMTSSg aOXNhpqAQN7XT/OhO5i/fDVSaF3izhiVajHbUQOjfHGUyu3rQMTrXlQxpWojJosa4fcq eLZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=js8UYL6o5wlWJUVrBFVPbopVLQsob/C8JUFA6pQNZZM=; b=Dxlt/0/TIF0Njjz2t/JVjyU02+d+cU0uGBy5HiOLCO9MEnYtXW8LBAflL+tGD5xKM2 hnIUAO6LAAx5BjGOH4vGTSe88KMPfSDlHEa4mdy/Ndq2iH3Vocco0CJGl5egJh5U02IH hkDkUih6PC5Qz0yCI5VGBDcqeMpppp+7F9zFPog7TaX1ds/BtkLO2MA3nXl7kvhYHkd0 DeljxW8OlVr5r6SEtmqC03XUrxgfgjD+uLmusyI/h49Th0MLrpmgCwx77dNmELtGKM+k 6btxTwLXbqiLQaL+LKVp6D4kZCvaOGOLlX+8SxRtLX4kqCKeO7duyYwL9ri8yYE3Lqcu RQ8w== X-Gm-Message-State: AMCzsaWw4VtafiL2Efd0WC1kKuN5XcrW1FK1NboVTfHjOzF2M88nQIT3 Ac6mTzBBFTLR0GDxwmUcxlk= X-Google-Smtp-Source: AOwi7QCF3qS1er+53GgTU99yL5FGZcry7Z+6rfdEfJrMkWc8HUj72SwGkrGr5aaNn/dLX5SUptHNdw== X-Received: by 10.107.23.135 with SMTP id 129mr18967959iox.279.1506827112065; Sat, 30 Sep 2017 20:05:12 -0700 (PDT) Received: from lylat (S010664777d9cebe3.ss.shawcable.net. [70.64.85.59]) by smtp.gmail.com with ESMTPSA id f14sm3064518itc.13.2017.09.30.20.05.10 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 30 Sep 2017 20:05:10 -0700 (PDT) From: Alex <agrambot@HIDDEN> To: eliz@HIDDEN Subject: Re: bug#14793: 23.4; Cannot bind a function to a sequence of two mouse keys References: <CANPgWdLNEFCuMdd6HU=MqZuE567A=y8RFk4FvjK3+3TPNc28Jw@HIDDEN> <878twa94c5.fsf@HIDDEN> Date: Sat, 30 Sep 2017 21:05:05 -0600 In-Reply-To: <878twa94c5.fsf@HIDDEN> (npostavs's message of "Fri, 05 Aug 2016 19:35:38 -0400") Message-ID: <878tgvy3dq.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 14793 Cc: 14793 <at> debbugs.gnu.org, regularclockwork@HIDDEN, npostavs@HIDDEN X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -2.3 (--) Eli, do you know how to solve this? Try this: (define-prefix-command 'test) (global-set-key (kbd "C-t") #'test) (global-set-key [mouse-3] #'test) (global-set-key (kbd "C-t <mouse-2>") #'backward-word) (global-set-key [mouse-3 mouse-2] #'backward-word) Hitting C-t mouse-2 calls `backward-word' as intended, but hitting mouse-3 mouse-2 displays an "Empty menu" error as in the original report. The error is thrown from Fx_popup_menu and is called from read_char_x_menu_prompt, which is only called in the mouse case. I'm not sure how to proceed from here.
bug-gnu-emacs@HIDDEN
:bug#14793
; Package emacs
.
Full text available.npostavs@HIDDEN
to control <at> debbugs.gnu.org
.
Full text available.npostavs@HIDDEN
to control <at> debbugs.gnu.org
.
Full text available.Received: (at 14793) by debbugs.gnu.org; 4 Jul 2013 20:12:17 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jul 04 16:12:17 2013 Received: from localhost ([127.0.0.1]:58025 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1Uupt3-0006AV-3S for submit <at> debbugs.gnu.org; Thu, 04 Jul 2013 16:12:17 -0400 Received: from mail-ve0-f179.google.com ([209.85.128.179]:37645) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from <regularclockwork@HIDDEN>) id 1Uupt0-0006AB-Oq for 14793 <at> debbugs.gnu.org; Thu, 04 Jul 2013 16:12:15 -0400 Received: by mail-ve0-f179.google.com with SMTP id d10so1275356vea.10 for <14793 <at> debbugs.gnu.org>; Thu, 04 Jul 2013 13:12:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=575QcuqHj97dhexAe4xJn6jcmrK2uKtMLn72r0aM5AI=; b=Vuk9UI42Gn8NY0TpqFQVk/eHKKagkF3ZVJ6Jz8QVOu3yySkqJ7GMScwlNu+vOORG5w fJcpnszGnoW2ABi1mZSYZy4vs23iwe+1z7I9tD7KUBPXKUDrYRo4/tzj5IaTXaWU+V4v udgAdnq+FK3HQOxbF6zl1CA1hnndXNL+kdDR563rp7FS7qWy9+xg+6D9t4SlNY+8dUBm hHEQlFcEgPHRfra2TTFxK7q9r7MvS7CBaU2ll0WKMWhmLrDMBRkvTzvAtJA85qzXZs2H oBf2YFUXLWTjqaYwwCFUorpjeBbBcOowSF168GdsdaS2nc/HA7OQbeB5A+YLgmfZR59W yoEA== MIME-Version: 1.0 X-Received: by 10.58.127.202 with SMTP id ni10mr4187948veb.27.1372968728994; Thu, 04 Jul 2013 13:12:08 -0700 (PDT) Received: by 10.220.14.2 with HTTP; Thu, 4 Jul 2013 13:12:08 -0700 (PDT) Date: Thu, 4 Jul 2013 22:12:08 +0200 Message-ID: <CANPgWdKt+Nw+x6ks_6e74U-jWMRBZdb6RmoUid8vEoC8HC0pJw@HIDDEN> Subject: Further important info From: Stefano Lodi <regularclockwork@HIDDEN> To: 14793 <at> debbugs.gnu.org Content-Type: multipart/alternative; boundary=047d7b5d870f612a6604e0b53101 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 14793 X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.7 (/) --047d7b5d870f612a6604e0b53101 Content-Type: text/plain; charset=ISO-8859-1 I forgot to mention that the bug described happens also in trunk. --047d7b5d870f612a6604e0b53101 Content-Type: text/html; charset=ISO-8859-1 <div dir="ltr">I forgot to mention that the bug described happens also in trunk.<br></div> --047d7b5d870f612a6604e0b53101--
bug-gnu-emacs@HIDDEN
:bug#14793
; Package emacs
.
Full text available.Received: (at submit) by debbugs.gnu.org; 4 Jul 2013 18:28:30 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jul 04 14:28:30 2013 Received: from localhost ([127.0.0.1]:57842 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1UuoGa-0003AH-Pa for submit <at> debbugs.gnu.org; Thu, 04 Jul 2013 14:28:29 -0400 Received: from eggs.gnu.org ([208.118.235.92]:34435) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from <regularclockwork@HIDDEN>) id 1UunBl-0001DH-Ur for submit <at> debbugs.gnu.org; Thu, 04 Jul 2013 13:19:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <regularclockwork@HIDDEN>) id 1UunBc-0003DT-Gz for submit <at> debbugs.gnu.org; Thu, 04 Jul 2013 13:19:20 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:36080) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <regularclockwork@HIDDEN>) id 1UunBc-0003DF-D9 for submit <at> debbugs.gnu.org; Thu, 04 Jul 2013 13:19:16 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36084) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <regularclockwork@HIDDEN>) id 1UunBV-0006q4-H1 for bug-gnu-emacs@HIDDEN; Thu, 04 Jul 2013 13:19:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <regularclockwork@HIDDEN>) id 1Uun76-0001My-0M for bug-gnu-emacs@HIDDEN; Thu, 04 Jul 2013 13:14:41 -0400 Received: from mail-vb0-x230.google.com ([2607:f8b0:400c:c02::230]:49313) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <regularclockwork@HIDDEN>) id 1Uun75-0001Mp-Py for bug-gnu-emacs@HIDDEN; Thu, 04 Jul 2013 13:14:35 -0400 Received: by mail-vb0-f48.google.com with SMTP id w15so1096530vbf.21 for <bug-gnu-emacs@HIDDEN>; Thu, 04 Jul 2013 10:14:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=8NUKMTIz5ck0DWmiuujGtN+YVZ1DSXbuemG4Sp5lxDg=; b=TarYtY/2xoe62Nj5yaNA4KWptKHRsYb/6MphFVfKGxTkhgSXSd7PtD84jc/BVv+USR O+ahnTm4/1CdlFAct8W+pZpihYeDBq1epstz3fk60Ah6FtziOoWwuYvTY9Xo+UCCo8du +TfuSZj0csYeRApY9H7YU+Nd6M/Hhfb6veV/POWhY3WOZIWaTOwkym5pROZfdOGASi2j bwgKWBcJiEiKK9LNXNaqGWN0i4sq+9Ot58LjcBDud9Ft9zknTUDEj6OSjPyZGgWvdnpl 9iSTRM81l/Fz+zsITll8iby5q0Wc4RLADSbx4DMRpXYw1VQT+BaGL1GwoDzcAolrGRy+ lD5A== MIME-Version: 1.0 X-Received: by 10.220.163.72 with SMTP id z8mr3772572vcx.89.1372958075389; Thu, 04 Jul 2013 10:14:35 -0700 (PDT) Received: by 10.220.14.2 with HTTP; Thu, 4 Jul 2013 10:14:35 -0700 (PDT) Date: Thu, 4 Jul 2013 19:14:35 +0200 Message-ID: <CANPgWdLNEFCuMdd6HU=MqZuE567A=y8RFk4FvjK3+3TPNc28Jw@HIDDEN> Subject: 23.4; Cannot bind a function to a sequence of two mouse keys From: Stefano Lodi <regularclockwork@HIDDEN> To: bug-gnu-emacs@HIDDEN Content-Type: multipart/alternative; boundary=001a1132e5f66009f304e0b2b6f3 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.3 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Thu, 04 Jul 2013 14:28:27 -0400 X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -4.3 (----) --001a1132e5f66009f304e0b2b6f3 Content-Type: text/plain; charset=ISO-8859-1 This bug report will be sent to the Free Software Foundation, not to your local site managers! Please write in English if possible, because the Emacs maintainers usually do not have translators to read other languages for them. Your report will be posted to the bug-gnu-emacs@HIDDEN mailing list and the gnu.emacs.bug news group, and at http://debbugs.gnu.org. Please describe exactly what actions triggered the bug and the precise symptoms of the bug. If you can, give a recipe starting from `emacs -Q': The manual states at the end of Section 48.3.10 "Rebinding Mouse Buttons" says "You can put more than one mouse button in a key sequence, but it isn't usual to do so." I failed to bind a simple function to a sequence of two mouse keys. > emacs -Q inside the *scratch* buffer, evaluate: (defun go-backwards () "Go backward one word." (interactive) (backward-word 1)) (global-unset-key [mouse-3]) (global-set-key [mouse-3 mouse-2] 'go-backwards) Now, pressing the right mouse button gives the message Empty menu at the bottom of the Emacs screen. If I evaluate (setq debug-on-error t) and press the right button again I get just Debugger entered--Lisp error: (error "Empty menu") However, after evaluating (global-set-key [mouse-3] 'go-backwards) pressing the right mouse button does indeed move the point backward one word; therefore binding a single mouse key works. Another way to obtain the same result is the following. Evaluate (defun go-backwards () "Go backward one word." (interactive) (backward-word 1)) (global-unset-key [mouse-3]) (defvar my-map (make-sparse-keymap)) (define-key my-map [mouse-2] 'go-backwards) Now, C-h v my-map gives clearly my-map's value is (keymap (mouse-2 . go-backwards)) Then evaluating (define-key global-map [mouse-3] my-map) gives (keymap (mouse-2 . go-backwards)) at the bottom of the Emacs screen. However, again the right button gives "Empty menu". --001a1132e5f66009f304e0b2b6f3 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div><div><div><div><div><div><div><div><div>This bug repo= rt will be sent to the Free Software Foundation,<br>not to your local site = managers!<br>Please write in English if possible, because the Emacs maintai= ners<br> usually do not have translators to read other languages for them.<br><br>Yo= ur report will be posted to the <a href=3D"mailto:bug-gnu-emacs@HIDDEN">bu= g-gnu-emacs@HIDDEN</a> mailing list<br>and the gnu.emacs.bug news group, a= nd at <a href=3D"http://debbugs.gnu.org">http://debbugs.gnu.org</a>.<br> <br>Please describe exactly what actions triggered the bug<br>and the preci= se symptoms of the bug.=A0 If you can, give<br>a recipe starting from `emac= s -Q':<br><br></div><div>The manual states at the end of Section 48.3.1= 0 "Rebinding Mouse Buttons" says "You can put more than one = mouse button in a key sequence, but it isn't usual to do so."<br><br></div>I failed to bind a simple function to a = sequence of two mouse keys.<br><br></div>> emacs -Q<br><br></div>inside = the *scratch* buffer, evaluate:<br><br>(defun go-backwards ()<br>=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0 "Go backward one word."<br> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (interactive)<br>=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0 (backward-word 1))<br>(global-unset-key [mouse-3])<br>(global-set= -key [mouse-3 mouse-2] 'go-backwards)<br><br></div>Now, pressing the ri= ght mouse button gives the message<br><br> </div>Empty menu<br><br></div>at the bottom of the Emacs screen.<br><br>If = I evaluate<br><br>(setq debug-on-error t) <br><br></div>and press the right= button again I get just<br><br>Debugger entered--Lisp error: (error "= Empty menu")<br> <br>However, after evaluating<br><br>(global-set-key [mouse-3] 'go-back= wards)<br><br></div><div>pressing the right mouse button does indeed move t= he point backward one word; therefore binding a single mouse key works.<br> <br></div>Another way to obtain the same result is the following.<br><br>Ev= aluate <br><br>(defun go-backwards ()<br>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 = "Go backward one word."<br>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (int= eractive)<br>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (backward-word 1))<br> (global-unset-key [mouse-3])<br>(defvar my-map (make-sparse-keymap))<br>(de= fine-key my-map [mouse-2] 'go-backwards)<br><br></div>Now, C-h v my-map= gives clearly<br><br>my-map's value is (keymap<br>=A0(mouse-2 . go-bac= kwards))<br> <div><div><br>Then evaluating<br><br>(define-key global-map [mouse-3] my-ma= p)<br><br></div><div>gives <br><br>(keymap (mouse-2 . go-backwards))<br><br= ></div><div>at the bottom of the Emacs screen. However, again the right but= ton gives "Empty menu".<br> <br><br><br><br></div><div><br></div></div></div> --001a1132e5f66009f304e0b2b6f3--
Stefano Lodi <regularclockwork@HIDDEN>
:bug-gnu-emacs@HIDDEN
.
Full text available.bug-gnu-emacs@HIDDEN
:bug#14793
; Package emacs
.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.