From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: Stephen Berman <stephen.berman@gmx.net>
Cc: emacs-devel@gnu.org
Subject: Re: Undesired interactive call of major mode command
Date: Sat, 22 Nov 2014 11:15:15 -0500 [thread overview]
Message-ID: <jwvegsvw6ya.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87lhn3gvq8.fsf@rosalinde.fritz.box> (Stephen Berman's message of "Sat, 22 Nov 2014 15:23:27 +0100")
> Bug#19112 reports an error resulting from typing `M-x todo-mode RET'.
> The real issue (at least for me, as the maintainer of Todo mode) is not
> the error but that todo-mode, although it is the "major mode command",
> is not intended to be invoked interactively.
There are several such major-modes. It's OK if doing M-x foo-mode RET
doesn't really "do the right thing" in that case, as long as it doesn't
burp loudly.
> deal with this. Three alternatives have occurred to me.
> (i) Tell users: "Don't do that."
That's a good first step.
> (ii) Add to todo-mode the condition
> (called-interactively-p 'any) and if it returns t either show a message
> saying how to enter todo mode or simply call the intended (and
> documented) Todo mode entry command (todo-show).
Better just emit a message.
> But this has the problem that, as soon as todo-mode is invoked, the
> current buffer changes to Todo mode;
Why is it a problem that the current buffer changed to todo-mode?
Stefan
next prev parent reply other threads:[~2014-11-22 16:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-22 14:23 Undesired interactive call of major mode command Stephen Berman
2014-11-22 16:15 ` Stefan Monnier [this message]
2014-11-22 22:19 ` Stephen Berman
2014-11-24 3:56 ` Stefan Monnier
2014-11-25 21:58 ` Stephen Berman
2014-11-26 2:16 ` Stefan Monnier
2014-11-26 13:39 ` Stephen Berman
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvegsvw6ya.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@gnu.org \
--cc=stephen.berman@gmx.net \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.