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

From: Stefan Monnier <[email-masked]>
Date: Wed, 14 May 2014 12:55:22 -0400

> Unfortunately, I didn't pay heed to your design goals while implementing
> todo-mode (I wasn't aware of them).  But there's a fairly easy way to
> accommodate them, and as a side effect avoid the bug Glenn reported and
> also accommodate his wish to do `M-x find-file foo.todo' without putting
> the file in Todo mode: by simply foregoing use of auto-mode-alist.
> Really, it was misguided of me to want to use it, because by design and
> intent all Todo files reside in `todo-directory', so on the one hand
> auto-mode-alist isn't necessary, and on the other hand any file foo.todo
> located elsewhere but put in Todo mode can be problematic.

Maybe a quick way to "reach" the design goal is to wrap the body of
todo-mode in a `with-demoted-errors'.

        Stefan