From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Tab bar tabs landed on master Date: Sun, 06 Oct 2019 20:06:16 +0300 Message-ID: <83k19h3it3.fsf@gnu.org> References: <8736gci5jn.fsf@mail.linkov.net> <83muej8a0f.fsf@gnu.org> <87zhijqfys.fsf@mail.linkov.net> <834l0r84at.fsf@gnu.org> <87bluyj51u.fsf@mail.linkov.net> <838spz45zc.fsf@gnu.org> <87a7aex2v9.fsf@mail.linkov.net> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="123951"; mail-complaints-to="usenet@blaine.gmane.org" Cc: lekktu@gmail.com, emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Oct 06 19:07:12 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iH9zz-000W6G-N5 for ged-emacs-devel@m.gmane.org; Sun, 06 Oct 2019 19:07:11 +0200 Original-Received: from localhost ([::1]:35936 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iH9zx-0003z5-PT for ged-emacs-devel@m.gmane.org; Sun, 06 Oct 2019 13:07:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35717) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iH9zF-0003xi-A5 for emacs-devel@gnu.org; Sun, 06 Oct 2019 13:06:26 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:60007) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iH9zE-0003Eb-On; Sun, 06 Oct 2019 13:06:24 -0400 Original-Received: from [176.228.60.248] (port=4130 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iH9zD-0001Ry-RF; Sun, 06 Oct 2019 13:06:24 -0400 In-reply-to: <87a7aex2v9.fsf@mail.linkov.net> (message from Juri Linkov on Sun, 06 Oct 2019 01:07:54 +0300) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:240647 Archived-At: > From: Juri Linkov > Cc: lekktu@gmail.com, emacs-devel@gnu.org > Date: Sun, 06 Oct 2019 01:07:54 +0300 > > > Can you explain how tab-bar-handle-mouse is supposed to work on TTY > > frames with a mouse? It doesn't work for me on the MS-Windows > > console: I get " is undefined". Which makes sense to > > me, as I don't see any code which would generate a TAB_BAR_EVENT event > > on a TTY, so I thought I need to write code to implement that in the > > TTY case. However, the doc string of tab-bar-handle-mouse seems to > > imply that I'm missing something. > > tab-bar-make-keymap-1 binds '(keymap (mouse-1 . tab-bar-handle-mouse)) > that on TTY frames accepts mouse clicks anywhere on the tab bar, > and then tab-bar-handle-mouse finds the clicked tab. > > > Did you try the code on TTY frames with some mouse capability, and if > > so, what was your configuration? > > On TTY frames on GNU/Linux the code works well after enabling > xterm-mouse-mode. That means platforms that support TTY mouse on the C level (GPM and MS-Windows/MS-DOS) will not be able to invoke tab-bar commands with a mouse, because there's no code that would produce the relevant events Emacs expects. xt-mouse bypasses the normal channels of feeding mouse events to the event queue, so implementation that works with xt-mouse alone generally doesn't produce the infrastructure required by "real" mouse support on TTY frames. > I tried to test it on MS-Windows too, but can't figure out how to > enable mouse on the MS-Windows console. I was able to run 'emacs > -nw' only on winpty. Could you suggest how mouse could be enabled > on the MS-Windows console? It is enabled by default. Maybe your cmd window has the Quick Edit mode enabled, in which case mouse events are not reported to console applications, but instead handled by Windows. I have now installed code to disable Quick Edit when Emacs starts, so you shouldn't need to do that persistently (this option can be controlled in the Properties of the cmd window). I also installed support for mouse gestures on the tab bar on text-mode frames. It currently only works on MS-Windows, but should be easy to extend to GPM as well. Do you have access to a system with a GPM-capable console, and can compile Emacs with GPM support? If so, I will send a patch for you to try (I don't myself have access to such a system, so I cannot try it myself). Thanks.