[Top][All Lists]

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

Re: Making `interactive' conditional

From: Lars Magne Ingebrigtsen
Subject: Re: Making `interactive' conditional
Date: Tue, 19 Jan 2016 12:17:14 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

And to sum up the (basically) two proposals to make `M-x di TAB' not
list `diary-chinese-insert-entry', first there is Stefan's "add a global
directive and then mark exceptions".

This would mean that a mode like diary would say something like

(new-magic-declare (mode "diary-" diary-mode))

at (top-level?) somewhere.  The few actual non-diary-mode commands would
then say

   (declare (mode nil))

in the command definition.  This means that a typical mode would have
two lines added to them.  This is very attractive.

My proposal was to mark all mode-specific commands explicitly:

  (declare (mode diary-mode))


  (command 'diary-mode "p")

This is because I kinda have a distaste for "magic" global settings, and
would prefer things to be explicit.  The advantage here is that nothing
would change except for things that have explicitly been changed.  For
instance, if I (as a user) has defined a command called `diary-lars',
then it would be removed from TAB completion until the user adds a
declaration to it.

So either minimal churn, but possibly some unexpected fall-out for some
users, or more churn, but no unexpected fall-out for anybody.

I'm fine with either.  I just want my `M-x' to be useful, because I can
never remember what keys commands are on, or what they're called,

`M-x diTAB' in my Emacs today lists 180 commands.  Eyeballing them, I
would say about six of them are things that `M-x diTAB' should be
listing, and you'd be able to discover nice commands like `dict',
`diary', `dig' and `diff'.

(I kinda think the discussion took the normal "one simple functionality
improvement" to "let's do ALL THE THINGS" to "well, ALL THE THINGS isn't
really practical or what we want" to "well, then LET'S DO NOTHING" turn.

(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no

reply via email to

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