bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#10289: 24.0.92; Sneaky clobbering of user key binding


From: Stefan Monnier
Subject: bug#10289: 24.0.92; Sneaky clobbering of user key binding
Date: Tue, 13 Dec 2011 14:38:24 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux)

> I think it's a bug to clobber a user setting in this sneaky way: I don't

Agreed.

> I think the best solution to this problem from the user's POV would be

There indeed various ways to solve this problem.  One convention which
Emacs mandates (but doesn't enforce, obviously) is that loading a file
should not have any other (visible) side effect than providing new
behavior (e.g. defining new commands and variables) without affecting
existing behavior.

Obviously it's a fuzzy convention, but from this point of view, the
problem is that loading Org (well, one of its files) changed the
calendar keymap.

> perhaps by unloading the libraries after the processing (unless they

That's pretty much impossible to do reliably given the way Elisp works
right now (it's not sufficiently declarative for that).

> throttle Emacs too much?  If so, a less desirable solution could be for
> defcustoms like org-calendar-agenda-action-key to check whether the key
> is bound and in that case require (as nonintrusively as possible) user
> intervention.

I think a good solution should be along these lines: only add the `k'
binding if the `k' key is currently "unbound" (or more generally does
nothing more than signal an error, since `k' is probably bound to
something like `undefined').  Of course, this care should only
be used if org-calendar-agenda-action-key was not set explicitly by
the user.


        Stefan





reply via email to

[Prev in Thread] Current Thread [Next in Thread]