Subject: Re: bug#17482: args-out-of-range when visiting foo.todo

From: Stefan Monnier <[email-masked]>
Date: Tue, 13 May 2014 23:22:56 -0400

> Are you saying todo-mode.el should keep using auto-mode-alist in the
> standard way?

Yes.

> If so, then there are basically two cases to handle:

> (i) Trying to create a file foo.todo within Emacs but outside of Todo
> mode, e.g. with `M-x find-file foo.todo'.  It's no problem to make this
> raise an error and tell the user to add a new file in Todo mode, as part
> of my patch did; is that failing gracefully enough?

Why do you need to signal an error?

For me the driving design should be that code that doesn't use todo-mode
commands should be able to find-file any file with a ".todo" extension,
make changes to it via things like delete-region and insert and then
save the file.  And all this without errors.

As soon as the user actually uses a todo-mode command, you can signal
any error you like, of course.

        Stefan