From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.help Subject: RE: bind a hotkey to toggle variable Date: Sun, 12 Jul 2009 23:50:22 -0700 Message-ID: <00EDDADB1DF84973BE9BE9A6FC7D31A2@us.oracle.com> References: <4314c1f70907110928j2b12bc95v51e4c785a9fee6f2@mail.gmail.com><428DAEDA942B4A9B8ABBD00EF40F54DB@us.oracle.com><4314c1f70907121936r6a74003aya2bb42b1bfb56d35@mail.gmail.com> <4314c1f70907122012j638e717cw984a0defd893455f@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1247467860 31596 80.91.229.12 (13 Jul 2009 06:51:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 13 Jul 2009 06:51:00 +0000 (UTC) To: "'tiefeng wu'" , Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jul 13 08:50:53 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MQFNE-0002vZ-5u for geh-help-gnu-emacs@m.gmane.org; Mon, 13 Jul 2009 08:50:52 +0200 Original-Received: from localhost ([127.0.0.1]:43716 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MQFND-0003rk-80 for geh-help-gnu-emacs@m.gmane.org; Mon, 13 Jul 2009 02:50:51 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MQFMo-0003pq-Jb for help-gnu-emacs@gnu.org; Mon, 13 Jul 2009 02:50:26 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MQFMi-0003oQ-Si for help-gnu-emacs@gnu.org; Mon, 13 Jul 2009 02:50:25 -0400 Original-Received: from [199.232.76.173] (port=50167 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MQFMi-0003oN-KB for help-gnu-emacs@gnu.org; Mon, 13 Jul 2009 02:50:20 -0400 Original-Received: from acsinet12.oracle.com ([141.146.126.234]:44215) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MQFMh-0005W7-R7 for help-gnu-emacs@gnu.org; Mon, 13 Jul 2009 02:50:20 -0400 Original-Received: from rgminet15.oracle.com (rcsinet15.oracle.com [148.87.113.117]) by acsinet12.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n6D6o36j009761 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 13 Jul 2009 06:50:04 GMT Original-Received: from abhmt010.oracle.com (abhmt010.oracle.com [141.146.116.19]) by rgminet15.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n6D6oNca008901; Mon, 13 Jul 2009 06:50:23 GMT Original-Received: from dradamslap1 (/24.5.190.74) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 12 Jul 2009 23:50:13 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <4314c1f70907122012j638e717cw984a0defd893455f@mail.gmail.com> Thread-Index: AcoDdMWdA20GVfTDS2K4ofVZYCllqgAC5p/w X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-Source-IP: abhmt010.oracle.com [141.146.116.19] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A010204.4A5AD926.016E:SCFSTAT5015188,ss=1,fgs=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:66005 Archived-At: > > See the Elisp manual, node `Defining Commands'. > > thanks Adams, I'll read the manual carefully. > > btw, I'm using your elisp library and having my pop-up-frames variable > default setting to t, Recently I'm trying IDE-like 'nav' mode from > google code, and the setting of pop-up-frames starts conflict with > nav, because for 'nav' it's better open files in same frame. So this > question occured. I'm not familiar with `nav' mode, and I don't know which of my libraries you mean. But I'm not surprised that some other code (e.g. `nav') has some problems with non-nil `pop-up-frames'. Unfortunately, it's all too common that code, including some vanilla Emacs distribution code, does not play well with non-nil `pop-up-frames'. Developers who use nil `pop-up-frames' seem too often not to test their code also with the value non-nil. (And they especially seem not to test it using a standalone minibuffer frame.) To be able to use non-nil `pop-up-frames', users really have to jump through quite a few hoops, and few actually bother. One-On-One Emacs helps make life with non-nil `pop-up-frames' easier, but you can still run into other code that can't handle it. Frankly, I'm always surprised that, 20-30 years after the introduction of graphic displays and window managers, most people still use Emacs windows, not frames, for most buffers. That Emacs doesn't play very well with non-nil `pop-up-frames' could explain that in part, but why people still use Emacs windows so much is generally a mystery to me. I've preferred frames over Emacs windows ever since frames became available, but we're a tiny minority in that camp. And my impression is that each of us tames the attendant problems slightly differently. Wrt working with `nav': I know nothing about it, but perhaps there is an easy way (e.g., using a mode hook or `same-window-*'), to use nil `pop-up-frames' for `nav' buffers only. That should be doable, I would think. BTW, googling a bit for `emacs nav' gives me the impression that `nav' is used in particular with a terminal, not necessarily with a window manager. In that case (i.e., if you are not using a window manager), is there much value in having non-nil `pop-up-frames'? Dunno.