unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>,
	 Tassilo Horn <tassilo@member.fsf.org>
Cc: emacs-devel@gnu.org
Subject: Re: A simple implementation of context-sensitive keys
Date: Thu, 11 Sep 2008 15:41:56 +0200	[thread overview]
Message-ID: <48C92024.6080804@gmail.com> (raw)
In-Reply-To: <jwvsks7sbn6.fsf-monnier+emacs@gnu.org>

Stefan Monnier wrote:
>>> In any case, the main problem with such things (whichever way they're
>>> implemented) is that the rest of Emacs doesn't know and/or expect such
>>> condition bindings, so C-h k gives only partial information, and
>>> similarly where-is doesn't know how to tell the whole story.
> 
>> Sure, so I'd say that in general modes shouldn't use such facilities by
>> default.  Which commands should be executed depending on which context
>> is a quite subjective decision anyway.  But to have the possibilities
>> right at hand is great, whichever one you use.
> 
> I hope we can do better than that, i.e. come up with a way to do
> something like what you proposed, but still have where-is, C-h k,
> etc... take it into account.


I am starting to wonder whether this is the right way to go.

As I said something reminding of this is done in smart-tab, tabkey2 and
hippie-expand. But all these are kind of brute force method to handle
the frustrating situations with the many uncoordinated completion
alternatives there are. And actually I find that special use useful.

However before doing what Tassilo suggest I think it would be better to
look at the background for it.

If I understand it correctly the problem is at least partly how the
keymaps for minor modes cooperates. If they do have the same key binding
then we have the question which one should be used.

And that may very well happen since their is no mechanism at all to
prevent it.

Currently the problem of which minor mode gets the key press is resolved
just by the corresponding minor mode's position in minor-mode-map-alist.
The first one gets it.

There is no notion in where-is, C-h k, etc that there is any key binding
conflict. There is no easy way for users to reorder minor-mode-map-alist.

I think this is where we should start. And after that come back to
Tassilo's suggestion.




  parent reply	other threads:[~2008-09-11 13:41 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-10  7:17 A simple implementation of context-sensitive keys Tassilo Horn
2008-09-10 10:36 ` Lennart Borgman (gmail)
2008-09-10 10:57   ` Tassilo Horn
2008-09-10 16:43     ` Ted Zlatanov
2008-09-10 14:14 ` Sean O'Rourke
2008-09-10 14:48   ` Miles Bader
2008-09-10 14:53     ` Juanma Barranquero
2008-09-10 15:17       ` Sean O'Rourke
2008-09-10 15:32         ` Juanma Barranquero
2008-09-11  7:35     ` Tassilo Horn
2008-09-11  8:17       ` Miles Bader
2008-09-11  8:48         ` Tassilo Horn
2008-09-10 17:49 ` Stefan Monnier
2008-09-10 19:21   ` Tassilo Horn
2008-09-11  1:41     ` Stefan Monnier
2008-09-11  7:17       ` Tassilo Horn
2008-09-11 14:40         ` Ted Zlatanov
2008-09-11 15:53           ` Tassilo Horn
2008-09-11 13:41       ` Lennart Borgman (gmail) [this message]
2008-09-11 13:48         ` Lennart Borgman (gmail)
2008-09-11 14:22           ` Tassilo Horn
2008-09-11 20:38             ` Lennart Borgman (gmail)
2008-09-12  6:58               ` Tassilo Horn
2008-09-12  8:34                 ` Lennart Borgman (gmail)
2008-09-12  9:47                   ` Tassilo Horn
2008-09-12 11:00                     ` Lennart Borgman
2008-09-12 16:13                       ` Tassilo Horn
2008-09-12 23:46                         ` Lennart Borgman (gmail)
2008-09-13  7:28                           ` Tassilo Horn
2008-09-13  9:32                             ` Lennart Borgman (gmail)
2008-09-15  7:26                               ` Tassilo Horn
2008-09-15 22:39                                 ` Lennart Borgman (gmail)
2008-09-11 20:44         ` Stefan Monnier
2008-09-11 21:14           ` Lennart Borgman (gmail)
2008-09-12  1:33             ` Stefan Monnier
2008-09-12  8:29               ` Lennart Borgman (gmail)

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=48C92024.6080804@gmail.com \
    --to=lennart.borgman@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=tassilo@member.fsf.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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).