From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.bugs Subject: bug#17482: args-out-of-range when visiting foo.todo Date: Tue, 13 May 2014 18:26:03 +0200 Message-ID: <87vbt9zlus.fsf@rosalinde.fritz.box> References: <87zjilzn73.fsf@rosalinde.fritz.box> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1399998541 10909 80.91.229.3 (13 May 2014 16:29:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 13 May 2014 16:29:01 +0000 (UTC) Cc: 17482@debbugs.gnu.org To: Glenn Morris Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue May 13 18:28:54 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WkFZW-000657-5l for geb-bug-gnu-emacs@m.gmane.org; Tue, 13 May 2014 18:28:54 +0200 Original-Received: from localhost ([::1]:46518 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WkFZV-0005se-OM for geb-bug-gnu-emacs@m.gmane.org; Tue, 13 May 2014 12:28:53 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57166) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WkFXp-000312-Je for bug-gnu-emacs@gnu.org; Tue, 13 May 2014 12:27:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WkFXi-0000Iz-Pi for bug-gnu-emacs@gnu.org; Tue, 13 May 2014 12:27:09 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:45078) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WkFXi-0000Id-E5 for bug-gnu-emacs@gnu.org; Tue, 13 May 2014 12:27:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WkFXh-0001DV-Sy for bug-gnu-emacs@gnu.org; Tue, 13 May 2014 12:27:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stephen Berman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 13 May 2014 16:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17482 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 17482-submit@debbugs.gnu.org id=B17482.13999984074653 (code B ref 17482); Tue, 13 May 2014 16:27:01 +0000 Original-Received: (at 17482) by debbugs.gnu.org; 13 May 2014 16:26:47 +0000 Original-Received: from localhost ([127.0.0.1]:34196 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WkFXS-0001Cz-M5 for submit@debbugs.gnu.org; Tue, 13 May 2014 12:26:47 -0400 Original-Received: from mout.gmx.net ([212.227.17.20]:55239) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WkFXP-0001Cg-EG for 17482@debbugs.gnu.org; Tue, 13 May 2014 12:26:44 -0400 Original-Received: from rosalinde.fritz.box ([89.245.115.4]) by mail.gmx.com (mrgmx101) with ESMTPSA (Nemesis) id 0MC8iq-1WbU5r12jw-008rZM; Tue, 13 May 2014 18:26:35 +0200 In-Reply-To: (Glenn Morris's message of "Tue, 13 May 2014 12:02:51 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.90 (gnu/linux) X-Provags-ID: V03:K0:1QqSiKsb+yJQxYwV3B1WkWYo4nQ67fa+iaiNfRYcpFt5nbdtYqY qKdGAshmVX08JUb3ZJTHi/FvczgfyRFDh+IHU2ejYXPH61wPYRtXVtC/j2R+Tih8GninE0o ujmdqEfj8+RY9gyRVpvAHzlQ1enIt0EkaBWmDDo8GRYS/31lku7sfY4lwlFB1rz/FwS+Goy 7GchXl/qOloQpHHkapwuw== X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:89022 Archived-At: On Tue, 13 May 2014 12:02:51 -0400 Glenn Morris 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