From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Jonathan Ganc Newsgroups: gmane.emacs.bugs Subject: bug#26104: 26.0.50; In Ubuntu, having mouse over other frame cause Alt key to produce a event Date: Fri, 17 Mar 2017 21:04:57 -0400 Message-ID: References: <3517ed20-78a5-f7ea-7594-eeb18c95e90e@gmail.com> <58CB8E1C.7080104@gmx.at> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1489799179 8969 195.159.176.226 (18 Mar 2017 01:06:19 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 18 Mar 2017 01:06:19 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 To: martin rudalics , 26104@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Mar 18 02:06:13 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cp2oo-00012F-Cn for geb-bug-gnu-emacs@m.gmane.org; Sat, 18 Mar 2017 02:06:06 +0100 Original-Received: from localhost ([::1]:51466 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cp2ou-0005d1-8o for geb-bug-gnu-emacs@m.gmane.org; Fri, 17 Mar 2017 21:06:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55289) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cp2oo-0005cv-6o for bug-gnu-emacs@gnu.org; Fri, 17 Mar 2017 21:06:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cp2ok-0007sj-PI for bug-gnu-emacs@gnu.org; Fri, 17 Mar 2017 21:06:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:34867) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cp2ok-0007se-L0 for bug-gnu-emacs@gnu.org; Fri, 17 Mar 2017 21:06:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cp2ok-0007fH-Be for bug-gnu-emacs@gnu.org; Fri, 17 Mar 2017 21:06:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jonathan Ganc Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 18 Mar 2017 01:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 26104 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 26104-submit@debbugs.gnu.org id=B26104.148979910729394 (code B ref 26104); Sat, 18 Mar 2017 01:06:02 +0000 Original-Received: (at 26104) by debbugs.gnu.org; 18 Mar 2017 01:05:07 +0000 Original-Received: from localhost ([127.0.0.1]:33066 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cp2nq-0007e2-SV for submit@debbugs.gnu.org; Fri, 17 Mar 2017 21:05:07 -0400 Original-Received: from mail-qt0-f170.google.com ([209.85.216.170]:32777) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cp2no-0007dU-S5 for 26104@debbugs.gnu.org; Fri, 17 Mar 2017 21:05:05 -0400 Original-Received: by mail-qt0-f170.google.com with SMTP id i34so75485028qtc.0 for <26104@debbugs.gnu.org>; Fri, 17 Mar 2017 18:05:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=XLz0j5T1TZ79cc5YBHyyMDP20sZjAFEINO8ABA9Hhi4=; b=e6Fxhan54XqpaoGrFViM9SNt0IUO2e+a3YxbuCoxKkg2XnkcA8Fw8KwC3AKMz4UKK3 2+ABDQ/LZFvEPK+G9wCndPYMpNUIhalXW3FL1fsVrfdserYXKIyvT72hwIkGji/rLVXk jEJvMqRINQKTX6IZaRDdnQhF7wankFwnC5Evv4N23hIlvcMqvdeTt+nAfsul8Gc9AJz4 r7xTUDaflhSst6PLqfeXmyVXv1UHMSVDXyl/G6yiXaJgVn8PnAMOtF2OUoVEDwVyksmz TT2qLe9jdG+TGkLHXbMUTa6I5HruRRKv63a+JGTjFkAMkMZSuOv1CWoevOK4k3U59V8N rNMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=XLz0j5T1TZ79cc5YBHyyMDP20sZjAFEINO8ABA9Hhi4=; b=S2zru9UlHo2+RT/DL4EoM4YCtOroxZWdJnW4yx7fXO8So5ObdIszMqtpR6W40WAHAH otBOtPoDps3FKAM76zBF9u402+8tB+HOSY2Jj6r+rxmrqZPjPvEj1fLSELfLaWrZkwMg xbWf0PFr/ggiF9Urkiu2zIZ9uTMOqUa2cMOZNqfeZJttrmFXTdZKB8S/NvehWBSyJ9q6 gTtlapuL6fRaOmwlRDPH/dSeUOWR5XhwH8owl5/tdSYiQOKycJoPHkJKWAO9JdWz3QVS DeV1Z2Ee0jiYQYmhgSugvWK2pRY1hIfvaB5dR0v0c4Catbd8LxEVNK5K5TceQ+kBpWsI 28YA== X-Gm-Message-State: AFeK/H3ubEECn8LSl5X+RW0GWyHod8cnRLIa4iahqql/HnWw3odkhm0WJBk43L92Ci7yAw== X-Received: by 10.237.36.212 with SMTP id u20mr16089746qtc.290.1489799099077; Fri, 17 Mar 2017 18:04:59 -0700 (PDT) Original-Received: from [192.168.1.198] (static-98-118-34-152.bstnma.fios.verizon.net. [98.118.34.152]) by smtp.gmail.com with ESMTPSA id 37sm7146464qto.43.2017.03.17.18.04.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Mar 2017 18:04:58 -0700 (PDT) In-Reply-To: <58CB8E1C.7080104@gmx.at> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:130684 Archived-At: Hi. That does fix the problem for yank-pop, but I don't think it's a good fix. For example, it let's someone use yank-pop without having used yank if they use handle-switch-frame before. Also, the same issue happens with other commands like dabbrev-expand, which relies on checking what the previous command was. What is the purpose of executing `handle-switch-frame` at all? Maybe there's some way of excluding it from last-command. But again, I don't really understand x-windows well or why that command is being sent. Jonathan On 03/17/2017 03:19 AM, martin rudalics wrote: > > In Ubuntu, if I have two frames open and the mouse is positioned > over the other frame (i.e. not over the active one), pressing the Alt > key produces a event. > > > > While this event does nothing in itself, it disrupts things like > yank-pop, which no longer works if it is bound to M-y as usual > (because instead of the command sequence yank -> yank-pop, we now have > yank -> handle-switch-frame -> yank-pop, which gives an error > "user-error: Previous command was not a yank"). > > > > To be honest, I don't know enough about X-Windows to know if this is > emacs' fault or x-windows fault. But it's very annoying. > > > > [Tried on Emacs versions 24.5, 25.1, and the 26.0 and Ubuntu 16.10.] > > Could you try in simple.el to replace > > (if (not (eq last-command 'yank)) > (user-error "Previous command was not a yank")) > > with > > (if (not (memq last-command '(yank handle-switch-frame))) > (user-error "Previous command was not a yank")) > > Thanks, martin