unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Alex Schroeder <alex@emacswiki.org>
Subject: Re: elisp mouse programming problems
Date: Thu, 21 Aug 2003 14:19:58 +0200	[thread overview]
Message-ID: <87y8xnfbip.fsf@emacswiki.org> (raw)
In-Reply-To: 8SidnSEhNIsRpdmiRTvUpQ@texas.net

"David Vanderschel" <DJV1@Austin.RR.com> 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.

  reply	other threads:[~2003-08-21 12:19 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-20  3:17 elisp mouse programming problems David Vanderschel
2003-08-20 10:34 ` Alex Schroeder
2003-08-21  1:46   ` David Vanderschel
2003-08-21  2:37     ` Johan Bockgård
2003-08-21  3:24       ` David Vanderschel
2003-08-21 17:44     ` Kevin Rodgers
2003-08-22  0:50       ` David Vanderschel
2003-08-22 15:24         ` Kevin Rodgers
2003-08-20 11:40 ` Eli Zaretskii
     [not found] ` <mailman.542.1061395718.29551.help-gnu-emacs@gnu.org>
2003-08-21  3:12   ` David Vanderschel
2003-08-21 12:19     ` Alex Schroeder [this message]
2003-08-22  0:34       ` David Vanderschel
2003-08-22 15:20         ` Kevin Rodgers
2003-08-27 17:45         ` Kai Großjohann
2003-08-27 20:27           ` Kai Großjohann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y8xnfbip.fsf@emacswiki.org \
    --to=alex@emacswiki.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).