unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stephen Berman <stephen.berman@gmx.net>
To: Glenn Morris <rgm@gnu.org>
Cc: 17482@debbugs.gnu.org
Subject: bug#17482: args-out-of-range when visiting foo.todo
Date: Tue, 13 May 2014 18:26:03 +0200	[thread overview]
Message-ID: <87vbt9zlus.fsf@rosalinde.fritz.box> (raw)
In-Reply-To: <deppjhoedw.fsf@fencepost.gnu.org> (Glenn Morris's message of "Tue, 13 May 2014 12:02:51 -0400")

On Tue, 13 May 2014 12:02:51 -0400 Glenn Morris <rgm@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





  reply	other threads:[~2014-05-13 16:26 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-13  6:22 bug#17482: args-out-of-range when visiting foo.todo Glenn Morris
2014-05-13 15:57 ` Stephen Berman
2014-05-13 16:02   ` Glenn Morris
2014-05-13 16:26     ` Stephen Berman [this message]
2014-05-13 19:40   ` Stefan Monnier
2014-05-13 22:33     ` Stephen Berman
2014-05-14  3:22       ` Stefan Monnier
2014-05-14 15:10         ` Stephen Berman
2014-05-14 16:55           ` Stefan Monnier
2014-05-14 17:46             ` Glenn Morris
2014-05-14 19:57               ` Stephen Berman
2014-05-14 20:01                 ` Glenn Morris
2014-05-14 20:34                   ` Stephen Berman
2014-05-14 21:44                     ` Stefan Monnier
2014-05-14 21:58                       ` Stephen Berman
2014-05-15  2:24                         ` Stefan Monnier
2014-05-23 16:59                 ` Stephen Berman
2014-05-23 17:32                   ` Glenn Morris
2014-05-23 19:12                     ` 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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87vbt9zlus.fsf@rosalinde.fritz.box \
    --to=stephen.berman@gmx.net \
    --cc=17482@debbugs.gnu.org \
    --cc=rgm@gnu.org \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).