unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Glenn Morris <rgm@gnu.org>
To: 17482@debbugs.gnu.org
Subject: bug#17482: args-out-of-range when visiting foo.todo
Date: Tue, 13 May 2014 02:22:35 -0400	[thread overview]
Message-ID: <g461la19lg.fsf@fencepost.gnu.org> (raw)

Package: emacs
Version: 24.3.91
Severity: important

emacs -Q
C-x C-f /tmp/foo.todo
  -> args-out-of-range error

(.todo is a pretty generic extension for me. I don't want it to open a
specialized Emacs mode. I don't feel strongly about it though.
Perhaps the NEWS file should say that .todo files now open in todo-mode.
They didn't before.)

Debugger entered--Lisp error: (args-out-of-range 1 2)
  narrow-to-region(2 1)
  (let ((name (todo-current-category)) cat-begin cat-end done-start done-sep-start done-end) (widen) (goto-char (point-min)) (re-search-forward (concat "^" (regexp-quote (concat todo-category-beg name)) "$") nil t) (setq cat-begin (1+ (line-end-position))) (setq cat-end (if (re-search-forward (concat "^" (regexp-quote todo-category-beg)) nil t) (match-beginning 0) (point-max))) (setq mode-line-buffer-identification (funcall todo-mode-line-function name)) (narrow-to-region cat-begin cat-end) (todo-prefix-overlays) (goto-char (point-min)) (if (re-search-forward (concat "\n\\(" (regexp-quote todo-category-done) "\\)") nil t) (progn (setq done-start (match-beginning 0)) (setq done-sep-start (match-beginning 1)) (setq done-end (match-end 0))) (error "Category %s is missing todo-category-done string" name)) (if todo-show-done-only (narrow-to-region (1+ done-end) (point-max)) (if (and todo-show-with-done (re-search-forward todo-done-string-start nil t)) (progn (setq done-start cat-end) (let* ((done-sep todo-done-separator) (ov (progn ... ...))) (if ov nil (setq ov (make-overlay done-sep-start done-end)) (overlay-put ov (quote todo) (quote separator)) (overlay-put ov (quote display) done-sep))))) (narrow-to-region (point-min) done-start) (if todo-highlight-item (progn (require (quote hl-line)) (hl-line-mode 1)))))
  todo-category-select()
  (and (member this-command todo-visit-files-commands) (= (- (point-max) (point-min)) (buffer-size)) (member major-mode (quote (todo-mode todo-archive-mode))) (todo-category-select))
  todo-display-as-todo-file()
  run-hooks(find-file-hook)
  after-find-file(t t)
  find-file-noselect-1(#<buffer foo.todo> "/tmp/foo.todo" nil nil "/tmp/foo.todo" nil)
  find-file-noselect("/tmp/foo.todo" nil nil t)
  find-file("/tmp/foo.todo" t)
  call-interactively(find-file nil nil)
  command-execute(find-file)





             reply	other threads:[~2014-05-13  6:22 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-13  6:22 Glenn Morris [this message]
2014-05-13 15:57 ` bug#17482: args-out-of-range when visiting foo.todo Stephen Berman
2014-05-13 16:02   ` Glenn Morris
2014-05-13 16:26     ` Stephen Berman
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=g461la19lg.fsf@fencepost.gnu.org \
    --to=rgm@gnu.org \
    --cc=17482@debbugs.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).