GNU bug report logs - #17482
args-out-of-range when visiting foo.todo

Previous Next

Package: emacs;

Reported by: Glenn Morris <rgm <at> gnu.org>

Date: Tue, 13 May 2014 06:23:02 UTC

Severity: important

Found in version 24.3.91

Done: Stephen Berman <stephen.berman <at> gmx.net>

Bug is archived. No further changes may be made.

Full log


Message #12 received at 17482 <at> debbugs.gnu.org (full text, mbox):

From: Stephen Berman <stephen.berman <at> gmx.net>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 17482 <at> debbugs.gnu.org
Subject: Re: bug#17482: args-out-of-range when visiting foo.todo
Date: Tue, 13 May 2014 18:26:03 +0200
On Tue, 13 May 2014 12:02:51 -0400 Glenn Morris <rgm <at> gnu.org> wrote:

> Stephen Berman wrote:
>
>> Perhaps it was presumptuous of me to appropriate the .todo extension for
>> Todo mode.  I'm not aware of any policy about this, and I do see that a
>> number of modes add an extension to auto-mode-alist unconditionally,
>> while others merely suggest doing that in the user's init file.
>> However, I've come up with the following fix, which keeps automatic
>> recognition of Todo mode files located in `todo-directory', which is
>> where all Todo mode files are stored, but allows you to create and visit
>> foo.todo in the default major mode anywhere else.  If this works for you
>> and it's not an unacceptable abuse of auto-mode-alist, I'll commit it to
>> emacs-24.  Thanks for the report.
>
> Thanks. I'm not sure you need to go to that trouble.
> As I said, I don't feel strongly about it.
> It's something I'd be happy to just change in my .emacs.
> Maybe wait and see if anyone else has a strong opinion, otherwise
> leave as-is.
>
> The args-out-of-range thing was what I actually wanted to report! :)

Well, that error arose precisely because you tried to visit a file in
Todo mode (because of auto-mode-alist) that was not in todo-directory,
which lead to certain variables not getting set that should have been,
resulting in the error.  This was a situation I did not foresee (that
someone would want to have a *.todo file but not use Todo mode --
cheeky!).  I actually think this is the least invasive fix that would
avoid this problem.  If I untie the extensions from auto-mode-alist, I
think it will require quite a bit more alteration of todo-mode.el.  So,
if there are no serious objections, I'd just as soon apply this patch.

Steve Berman




This bug report was last modified 11 years and 60 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.