From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#29599: 26.0; `dframe.el' binds keys unconditionally when loaded Date: Mon, 18 Dec 2017 18:15:10 -0800 (PST) Message-ID: <161e969d-1b2b-4bcc-9e24-a932fe6a2655@default> References: <878tdzbimi.fsf@users.sourceforge.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1513649660 4671 195.159.176.226 (19 Dec 2017 02:14:20 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 19 Dec 2017 02:14:20 +0000 (UTC) Cc: 29599@debbugs.gnu.org To: Noam Postavsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Dec 19 03:14:15 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 1eR7Q7-0000oQ-Gn for geb-bug-gnu-emacs@m.gmane.org; Tue, 19 Dec 2017 03:14:15 +0100 Original-Received: from localhost ([::1]:37106 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eR7S5-0005hh-FC for geb-bug-gnu-emacs@m.gmane.org; Mon, 18 Dec 2017 21:16:17 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47368) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eR7Rv-0005h8-KU for bug-gnu-emacs@gnu.org; Mon, 18 Dec 2017 21:16:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eR7Rq-0006Vi-Kg for bug-gnu-emacs@gnu.org; Mon, 18 Dec 2017 21:16:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:60529) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eR7Rq-0006VN-GP for bug-gnu-emacs@gnu.org; Mon, 18 Dec 2017 21:16:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eR7Rq-00042c-7M for bug-gnu-emacs@gnu.org; Mon, 18 Dec 2017 21:16:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 19 Dec 2017 02:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 29599 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 29599-submit@debbugs.gnu.org id=B29599.151364972415487 (code B ref 29599); Tue, 19 Dec 2017 02:16:02 +0000 Original-Received: (at 29599) by debbugs.gnu.org; 19 Dec 2017 02:15:24 +0000 Original-Received: from localhost ([127.0.0.1]:40976 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eR7RE-00041i-K1 for submit@debbugs.gnu.org; Mon, 18 Dec 2017 21:15:24 -0500 Original-Received: from aserp2120.oracle.com ([141.146.126.78]:50796) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eR7RD-00041W-3A for 29599@debbugs.gnu.org; Mon, 18 Dec 2017 21:15:23 -0500 Original-Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.21/8.16.0.21) with SMTP id vBJ2BTee071222; Tue, 19 Dec 2017 02:15:17 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2017-10-26; bh=+jZjUA0P+i4NpjzoScAE08qpIxcO/HuWGGUsCktYaKQ=; b=FUz0BxyqroH2DIn1uBAs5ldo/bCmmlAFnfn87OP0pCAvSWiSk9e0ze/qi0Li36D6ST76 DdPsuu7Q4uI/b8witG60QAF0uGF2eOcXebbXbrr++w8CRNpldaSAwhrmmZQ+inwEySZV Q7JPe/JAvKkDyKfVdgt1Ng6QZmr0ku8KBNLPsrYKtxA/B4phoVvQXNyK7Ub+pMcxTQXR s8y3QgwMdb8WEwJ5ryC/vkmq6FYQebfomvTTX/JQtlkgCl8EPSvfTQc2QF1Fh4UW23tn IoxpaJxhE332XLrVtoV0bIYj0DJpeNIHzu5X15pxnUn25yUHtfb2dnRiYwcsbMEv5PnZ qw== Original-Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp2120.oracle.com with ESMTP id 2exsnvr434-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 19 Dec 2017 02:15:17 +0000 Original-Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id vBJ2FG6U028914 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 19 Dec 2017 02:15:16 GMT Original-Received: from abhmp0004.oracle.com (abhmp0004.oracle.com [141.146.116.10]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id vBJ2FFJc011941; Tue, 19 Dec 2017 02:15:16 GMT In-Reply-To: <878tdzbimi.fsf@users.sourceforge.net> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4627.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8749 signatures=668649 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=953 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1712190027 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:141239 Archived-At: > > I must have done something after my init file was loaded that required > > `dframe.elc' to be loaded, and that load overwrote bindings I made in > > my init file. > > > > I don't know what I did that caused dframe to be loaded, but that > > shouldn't matter. I don't think it should overwrite key bindings > > just by being loaded. >=20 > Yeah (it's probably the loading-on-completion thing again). I don't think I know (or didn't know or at least don't recall) anything about such a thing. Is it something new? > > Shouldn't dframe.el bind its own commands to `special-event-map' keys > > only if those keys are not already bound? >=20 > > I don't know what it's doing or why, but this doesn't seem very polite > > of it. Why should it think that just by being loaded it should > > (re-)bind keys? >=20 > The root problem is that there is no easy way to share the bindings. Dunno what you mean by that ("share the bindings"). But maybe if I knew what "loading-on-completion" is then I would understand "share the bindings" (?). > I think those keys should be bound to a function which calls runs a hook, > like focus-in and focus-out events are. Maybe so, but then the question would be whether and why dframe.el (or anything else) would initialize the hook to have one or more functions on it. In my case, I'm pretty sure I don't want anything other than my replacement for iconification to be on the hook. So I would probably empty the hook before using `add-hook' for my function. Maybe that's only out of ignorance of what the deframe functions are for or do. > Actually, it sort of looks like > dframe is trying to install such a hook; the functions it puts don't do > anything except call `dframe-make-frame-{visible,iconify,delete}- > function'. But (without looking at them), those sound like specific replacements for the standard iconify etc. If so, it's great to provide such functions, but they shouldn't be bound to special events by default (i.e., upon loading). > Anyway, at a minimum, we can't have keybindings being modified by just a > load. Yes, thank you. > Here's a patch which moves the keybinding to dframe-frame-mode > activation instead. I can't speak to the value of the patch (I know nothing about this), but thanks for working on this.