From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Alex Schroeder Newsgroups: gmane.emacs.help Subject: Re: elisp mouse programming problems Date: Thu, 21 Aug 2003 14:19:58 +0200 Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <87y8xnfbip.fsf@emacswiki.org> References: <8SidnSEhNIsRpdmiRTvUpQ@texas.net> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1061472129 27995 80.91.224.253 (21 Aug 2003 13:22:09 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 21 Aug 2003 13:22:09 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Aug 21 15:22:06 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19ppOA-0000WY-00 for ; Thu, 21 Aug 2003 15:22:06 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19pp6e-0007YF-Aq for geh-help-gnu-emacs@m.gmane.org; Thu, 21 Aug 2003 09:04:00 -0400 Original-Newsgroups: gnu.emacs.help Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAACkElEQVR42s1a0bLsIAgzjv// y7kPd9pVKxKVdk6fzux2C4EAwR6QZBpcQEopIf3Fq3a52Lfh0Mjjk99zcWYBwA2ihEen9jVxfAf/ u0+Y2HQwNoVw4Dx34trRV6NSjiLPmfPt77jwiBxB/3PnZ3B2AGxzHnGu0wcBwAIAyQwZGvQhiFcy YLOFQcSB/MS82n3ec37vykNqRFTX9rVWR2U5+pZNIggll0CUOQN9BDdm1LfBmcZxIEqjL6r2JU/D galaB7Zg4jlY2ulnIx9OR4iMRl38CAFyKaA8jAxE7lNn650VKMULZ/54crqn0YQCJGQliebXkFIK hwqmGm28cgsSjz/hzRCMneQEwMjVoH3gWTtMPgIslJUV5uIluvUEkyzU+gUGQO62e9NuSdZCzNOM fDPC87iCqfE9gHinsIrSL16TPBfrYIeHzqKU90a50jCh54EcrgAUFo5ibzvebgr/I66USQ0CspQp IVSoBQK3WswDDIndIraHxoglqOjM1d044PQvu1NY0EHtqQR/XwJ+PeCs0x2dSlApZVw4MPER23PD 7JekoHxrqTRod/2Gx5nhx5dfAJhqPt7tDMIZxNN/7lOIaparPn7ZQ88drlORC2eLWXowxIq4gHTh VN1BSmsHoxYAbPWDTuGQuuecS+aYQUYpfr0YqPQOuuUk5tApK077+2xfOYP+XyWEIwPcE49lvT9N y2+wU2KylGGp4yxlALcm6fSlmgk62yfSsfNunDl5d6W91MBUoZw679YAJoMMkhijuXdFOL+khaL2 s+g3zy4APQuQvSc/BNAYnkl6E8ivYtEHJXa1dihE3zgnKMdNgN8DiIwgA17NykUMvFDQ+LALvXXI BuBLAHv/DvBmc/0HzR03PqXmLcQAAAAASUVORK5CYII= User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:Ef5RdaKuApqNlLceDwL2vAfvpSs= Original-NNTP-Posting-Host: 80.218.88.6 Original-X-Trace: news.swissonline.ch 1061468398 80.218.88.6 (21 Aug 2003 14:19:58 +0200) Original-Lines: 37 Original-X-Complaints-To: abuse@swissonline.ch Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!solnet.ch!solnet.ch!news.imp.ch!news.imp.ch!news-zh.switch.ch!switch.ch!news.swissonline.ch!not-for-mail Original-Xref: shelby.stanford.edu gnu.emacs.help:116041 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:11951 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:11951 "David Vanderschel" writes: > But why would a binding for a minor mode take precedence when I had > attempted to bind the same event in my major mode? I think the reasons are irrelevant, because either precedence makes sense. Therefore the Emacs maintainers just had to choose one and document it. I guess that they felt that minor modes are somewhat "more specific" etc., but in truth, it doesn't really matter. > How can a general purpose program like I am trying to make know, in > general, which minor modes it must disable in order to work > properly? I feel that I must still be missing something here. I think you have just discovered one of the weaker points in the Emacs user interface design. The problem is, nobody knows what to do about it. :) People have even written code to rearrange local keymaps in order to solve some of these problems, but those are ugly hacks, in my humble opinion. The only practical solution is to document it: "My mode uses the mouse to achieve certain things -- dragging objects, recognizing gestures, etc. If you are using another minor mode that also uses the mouse, then you are in trouble: You will either have to disable that other minor mode, or you have to remap the conflicting keybindings of that other mode's mode-map. Unfortunately it is rather difficult to give better advice than this, unless I know exactly what other mode you want to use in conjunction with mine." Something like that. Alex. -- http://www.emacswiki.org/alex/ There is no substitute for experience.