all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Args out of range when creating TODOs
@ 2007-10-25  9:05 Tassilo Horn
  2007-10-25  9:21 ` Carsten Dominik
  2007-10-25 10:40 ` Bastien
  0 siblings, 2 replies; 9+ messages in thread
From: Tassilo Horn @ 2007-10-25  9:05 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 2630 bytes --]

Hi,

I didn't follow the org development for the last few weeks, so maybe
this is no bug but a misconfiguration by me.  Anyway, I've set

    org-use-fast-todo-selection t
    org-todo-keywords '((sequence "TODO(t)" "STARTED(s)" "WAITING(w)"
                         "|" "DONE(d)" "DEFERRED(f)" "CANCELLED(c)"))

When I want to create a new TODO headline I do

    *** C-c C-t

which pops up the *Org Tags* buffer with my todo keywords.  Now I select
`t' and get (control letters in byte-code deleted)

Debugger entered--Lisp error: (args-out-of-range 0 1)
  replace-match(#(" TODO " 0 1 nil 1 5 (face org-todo) 5 6 nil) t t)
  byte-code("Æ .Ç\b!.\x0e.È.Sb.ÇÉ	ÊQ!.^[.ÇÊ!.Ë .Ì .Í.ÎÏÐÑ#*.Ò\fÅ\".Ò\fÓ\".\x13ÔÕ!.@È.\x1eAÖ.@!.B×.B.C\".\x1eDA@.EØ.D8.FÙ.D8.G.@.c.Ú.HÑ.I.@.J.‰.KA.L.M.œ.\x0eNÛ.ƒ.\0.OÜ=.—.\x0eN.œ.\x0eO.œ.\x0eOÜ=.œ.Ý .î.\x0eNÞ.ƒº.\x0eO.­.\x0eM.º.ßàáâ.J\"ÏÑ$.î.\x0eNã=.×.\x0e@.Ñ.\x0eL.î.\x0eL@.î.\x0eJ@.î.\x0eNä=.\b.\x0eK.J.?.î.\x0e@.û.\x0eJG.LGZåZ.J8.î.\x0eJ.Pæ.P!@).î.\x0eOÑ=.\x1d.\x0eNç.ƒ.\x01Ï.\x16N.î.\x0eN.“.\x0eNÚ.ƒ-.Ï.î.\x0eNè=.8.Ï.î.\x0eNé=.J.\x0eF.î.\x0eQ@.î.\x0eNê=.a.\x0eB.R.A@.î.\x0eR@.î.\x0eNë=.\x7f.ì.R!.R.B.R.A@.{.\x0eR@).î.\x0eN.J.@.î.í.N!S.J8.î.\x0eK.£.\x0eB.î.\x0eJ@.î.\x0e@.G.ƒ¯.Ï.î.\x0eL.¸.Ï.î.\x0eEî=.Å.\x0eL@.î.\x0eEï>.í.\x0eS.T=.Ú.\x0eL@.î.\x0eLGÈV.î.\x0eF.î.\x0eQ@.î.Ï.\x1eU.ü.ð.UðQ.ý.ð.Vñòó.@ô.Uõ\n¯\b.WÏ.X.8.@.ŠÌ .ö.÷ø.W\"+.@.t.3.ùú.@.U#.‚@.ûú.@.U#.üýÏ\".þ.VÑ.#.ÿ.A!.Z.û.a.b.\x0eV!\".\x0eB.~.Ö.U!.B×.B.C\".\x16DA@.EØ.D8.FÙ.D8.G.N.c.>.°.û.d.\x0eYG×.U.Y\".Y>GZ.e.Z.YG.f.g.×.U.Y\"ð#$.\x0eU.Q.?.Z.ƒT.\x0eN.h.>.T.\r<.Ý.U.\r>.Ý.\x0e[?.Ý.\x0eU.[.\x16X.U.\x13.\x0eU.\\.ƒ.\x03.@.\\.„.\x03.i.Ï.j.#.\x0eX.T.k.U.\x0eU.l.#.‚T.\x0eU.-.\x0eX.-.k.U.\x0eU.l.#.‚T.\x0eU.Q.ƒT.\x0e@.Q.„T.i.j.m. \".k.é.U.l.#.\x0e].e.\x0e^.e.n.ÏÑ\".o.p.!.\x0eU.Q.ƒz.q. .\x0eN..\x0eU.Q.„.\x03Ö.U!.B.r.s. .t. .u.\x0eB$.v. .Õ.n.Õ.Š.w.Õ!.Ç._!).Õ.`å.†Á.Õ.å\\W.Õ.å.†Î.Õ.b.x. .\x0e`.å.Š.y.`.\x0eW\")..‡" [outline-regexp org-todo-regexp startpos save-match-data-internal logging org-log-done org-back-to-heading looking-at 0 " +" " *" line-beginning-position match-data ((byte-code "Á\bÂ\"." [save-match-data-internal set-match-data evaporate] 3)) org-entry-get nil "LOGGING" t org-parse-local-options org-log-repeat match-string 1 org-get-todo-sequence-head assoc 3 4 "" (4) prefix org-fast-todo-selection (4) completing-read "State: " mapcar #[(x) "\bC." [x] 1] right left 2 last (4) none done nextset previousset reverse prefix-numeric-value sequence (type priority) " " :type ...] 10)
  org-todo(nil)
  call-interactively(org-todo)

When I write the TODO manually I can switch between states with C-c C-t
without problems.

Bye,
Tassilo

[-- Attachment #2: Type: text/plain, Size: 204 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Args out of range when creating TODOs
  2007-10-25  9:05 Args out of range when creating TODOs Tassilo Horn
@ 2007-10-25  9:21 ` Carsten Dominik
  2007-10-25  9:45   ` Tassilo Horn
  2007-10-25 10:40 ` Bastien
  1 sibling, 1 reply; 9+ messages in thread
From: Carsten Dominik @ 2007-10-25  9:21 UTC (permalink / raw)
  To: Tassilo Horn; +Cc: emacs-orgmode

I cannot reproduce this.

- Carsten

On Oct 25, 2007, at 11:05 AM, Tassilo Horn wrote:

> Hi,
>
> I didn't follow the org development for the last few weeks, so maybe
> this is no bug but a misconfiguration by me.  Anyway, I've set
>
>     org-use-fast-todo-selection t
>     org-todo-keywords '((sequence "TODO(t)" "STARTED(s)" "WAITING(w)"
>                          "|" "DONE(d)" "DEFERRED(f)" "CANCELLED(c)"))
>
> When I want to create a new TODO headline I do
>
>     *** C-c C-t
>
> which pops up the *Org Tags* buffer with my todo keywords.  Now I  
> select
> `t' and get (control letters in byte-code deleted)
>
> Debugger entered--Lisp error: (args-out-of-range 0 1)
>   replace-match(#(" TODO " 0 1 nil 1 5 (face org-todo) 5 6 nil) t t)
>   byte-code("Æ .Ç\b!.\x0e.È.Sb.ÇÉ	 
> ÊQ!.^[.ÇÊ!.Ë .Ì .Í.ÎÏÐÑ#*.Ò\fÅ\".Ò\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ý.\x0e[?.Ý.\x0eU.[.\x16X.U.\x13.\x0eU.\\.ƒ.\x03.@.\\. 
>> „.\x03.i.Ï.j.#.\x0eX.T.k.U.\x0eU.l.#. 
>> ‚T.\x0eU.-.\x0eX.-.k.U.\x0eU.l.#.‚T.\x0eU.Q.ƒT.\x0e@.Q.„T.i.j.m.  
>> \".k.é.U.l.#.\x0e].e.\x0e^.e.n.ÏÑ 
>> \".o.p.!.\x0eU.Q.ƒz.q. .\x0eN..\x0eU.Q.„.\x03Ö.U!.B.r.s. .t. .u.\x0eB 
>> $.v. .Õ.n.Õ.Š.w.Õ!.Ç._!).Õ.`å.†Á.Õ.å\ 
>> \W.Õ.å.†Î.Õ.b.x. .\x0e`.å.Š.y.`.\x0eW\")..‡" [outline- 
>> regexp org-todo-regexp startpos save-match-data-internal logging  
>> org-log-done org-back-to-heading looking-at 0 " +" " *" line- 
>> beginning-position match-data ((byte-code "Á\bÂ\"." [save-match- 
>> data-internal set-match-data evaporate] 3)) org-entry-get nil  
>> "LOGGING" t org-parse-local-options org-log-repeat match-string 1  
>> org-get-todo-sequence-head assoc 3 4 "" (4) prefix org-fast-todo- 
>> selection (4) completing-read "State: " mapcar #[(x) "\bC." [x] 1]  
>> right left 2 last (4) none done nextset previousset reverse prefix- 
>> numeric-value sequence (type priority) " " :type ...] 10)
>   org-todo(nil)
>   call-interactively(org-todo)
>
> When I write the TODO manually I can switch between states with C-c  
> C-t
> without problems.
>
> Bye,
> Tassilo
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Args out of range when creating TODOs
  2007-10-25  9:21 ` Carsten Dominik
@ 2007-10-25  9:45   ` Tassilo Horn
  0 siblings, 0 replies; 9+ messages in thread
From: Tassilo Horn @ 2007-10-25  9:45 UTC (permalink / raw)
  To: emacs-orgmode

Carsten Dominik <carsten.dominik@gmail.com> writes:

Hi Carsten,

> I cannot reproduce this.

Hm, I use a Emacs checkout from this morning which comes with org 5.13e,
but I noticed that behavior earlier.

I can reproduce the problem like this:

1. emacs -Q

2. Switch to *scratch* and eval

   (setq org-use-fast-todo-selection t
         org-todo-keywords '((sequence "TODO(t)" "STARTED(s)" "WAITING(w)"
                              "|" "DONE(d)" "DEFERRED(f)" "CANCELLED(c)")))

3. C-x C-f ~/foo.org (that file is new)

4. M-x org-mode RET

5. Write "* <C-c C-t>" which opens the tags buffer and now hitting `t'
   results in the error I posted in my first message, but this time with
   (args-out-of-range 24 40).

Bye,
Tassilo

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Args out of range when creating TODOs
  2007-10-25 10:40 ` Bastien
@ 2007-10-25  9:50   ` Tassilo Horn
  2007-10-25 11:10     ` Bastien
  0 siblings, 1 reply; 9+ messages in thread
From: Tassilo Horn @ 2007-10-25  9:50 UTC (permalink / raw)
  To: emacs-orgmode

Bastien <bzg@altern.org> writes:

Hi Bastien,

>> I didn't follow the org development for the last few weeks, so maybe
>> this is no bug but a misconfiguration by me.
>
> What version of Org are you using?
>
> I cannot reproduce your problem here with latest Org 5.13e.

Same here.

>> When I want to create a new TODO headline I do
>>
>>     *** C-c C-t
>
> I got an error only if I try to C-c C-t *immediatly* after the three
> asterisks, without the mandatory space.

Yeah, then I get

Debugger entered--Lisp error: (error "before first heading")
  signal(error ("before first heading"))
  error("before first heading")
  org-back-to-heading()
  byte-code(...)
  org-todo(nil)
  call-interactively(org-todo)

which is different and the error indicates what I'm doing wrong.

> But your error is different, am I right?

Yes.  I even get it with emacs -Q and only the two settings

(setq org-use-fast-todo-selection t
      org-todo-keywords '((sequence "TODO(t)" "STARTED(s)" "WAITING(w)"
                                    "|" "DONE(d)" "DEFERRED(f)" "CANCELLED(c)")))

evaled.

Bye,
Tassilo
-- 
The  First Law  of  Thermodynamics  states that  energy  can neither  be
created nor destroyed... unless it meets Chuck Norris.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Args out of range when creating TODOs
  2007-10-25 11:10     ` Bastien
@ 2007-10-25 10:25       ` Tassilo Horn
  2007-10-25 10:57         ` Carsten Dominik
  0 siblings, 1 reply; 9+ messages in thread
From: Tassilo Horn @ 2007-10-25 10:25 UTC (permalink / raw)
  To: emacs-orgmode

Bastien <bzg@altern.org> writes:

Hi Bastien,

> Mhh... strange, I still cannot reproduce here with a minimal config.
> Can you debug <C-c C-t> step by step in this case?

It fails in line 13497 of org.el (the call to replace-match).  Here's
the edebug output so far.

--8<---------------cut here---------------start------------->8---
Edebug: edebug-anon0
Edebug: org-todo
org-todo
Result: t
Result: "\\*+ "
Result: t
Result: 3 (#o3, #x3, ?\C-c)
Result: 2 (#o2, #x2, ?\C-b) [3 times]
Result: "\\<\\(TODO\\|STARTED\\|WAITING\\|DONE\\|DEFERRED\\|CANCELLED\\)\\>"
Result: " +\\<\\(TODO\\|STARTED\\|WAITING\\|DONE\\|DEFERRED\\|CANCELLED\\)\\> *"
Result: nil
Result: t [2 times]
Result: 1 (#o1, #x1, ?\C-a)
Result: nil [5 times]
Result: t
Result: nil
Result: 2 (#o2, #x2, ?\C-b)
Result: nil [3 times]
Result: ((#1=#("TODO" 0 4 (face org-todo)) . #2=(sequence #1# "DONE" "CANCELLED")) (#("STARTED" 0 7 (face org-todo)) . #2#) (#("WAITING" 0 7 (face org-todo)) . #2#) (#("DONE" 0 4 (face org-done)) . #2#) (#("DEFERRED" 0 8 (face org-done)) . #2#) (#("CANCELLED" 0 9 (face org-done)) . #2#))
Result: nil [8 times]
Result: ""
Result: nil
Result: (#("TODO" 0 4 (face org-todo)) #("STARTED" 0 7 (face org-todo)) #("WAITING" 0 7 (face org-todo)) #("DONE" 0 4 (face org-done)) #("DEFERRED" 0 8 (face org-done)) #("CANCELLED" 0 9 (face org-done)))
Result: nil [3 times]
Result: (116 115 119 100 102 99)
Result: nil [4 times]
Result: t [3 times]
Result: nil
Result: t [4 times]
[a-z..]:Set [SPC]:clear
Result: #("TODO" 0 4 (face org-todo)) [4 times]
Result: #(" TODO " 0 1 nil 1 5 (face org-todo) 5 6 nil) [2 times]
Result: nil
Result: #("TODO" 0 4 (face org-todo))
Result: 1 (#o1, #x1, ?\C-a)
Result: (:type todo-state-change :from nil :to #("TODO" 0 4 (face org-todo)) :position 1)
Result: nil [2 times]
Result: #(" TODO " 0 1 nil 1 5 (face org-todo) 5 6 nil)
Args out of range: 24, 40
--8<---------------cut here---------------end--------------->8---


> PS: I'm using Emacs 23.0.0, not latest Emacs CVS (as you do), but I
> don't think the error might come from here.

I don't know.  Maybe someone with a recent 23.0.50 Emacs can check if he
can reproduce the error.  And what does Carsten use?

Bye,
Tassilo
-- 
Chuck Norris has 12 moons. One of those moons is the Earth. 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Args out of range when creating TODOs
  2007-10-25  9:05 Args out of range when creating TODOs Tassilo Horn
  2007-10-25  9:21 ` Carsten Dominik
@ 2007-10-25 10:40 ` Bastien
  2007-10-25  9:50   ` Tassilo Horn
  1 sibling, 1 reply; 9+ messages in thread
From: Bastien @ 2007-10-25 10:40 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: tassilo

Hi Tassilo,

Tassilo Horn <tassilo@member.fsf.org> writes:

> I didn't follow the org development for the last few weeks, so maybe
> this is no bug but a misconfiguration by me.  

What version of Org are you using?

I cannot reproduce your problem here with latest Org 5.13e.

> When I want to create a new TODO headline I do
>
>     *** C-c C-t

I got an error only if I try to C-c C-t *immediatly* after the three
asterisks, without the mandatory space. But your error is different,
am I right?

Best,

-- 
Bastien

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Re: Args out of range when creating TODOs
  2007-10-25 10:25       ` Tassilo Horn
@ 2007-10-25 10:57         ` Carsten Dominik
  2007-10-25 11:16           ` Tassilo Horn
  0 siblings, 1 reply; 9+ messages in thread
From: Carsten Dominik @ 2007-10-25 10:57 UTC (permalink / raw)
  To: Tassilo Horn; +Cc: emacs-orgmode

There is a lot of code happening between the moment of the match, and  
the
replacement.  So far none of this code seems to have had the effect of
changing the match data, I have been careful to avoid this.  However,
in your case it seems that some internal code does change it.

I believe the following patch should fix this, can you please try it?

- Carsten


--- org.el.orig	2007-10-25 12:45:25.000000000 +0200
+++ org.el	2007-10-25 12:45:38.000000000 +0200
@@ -13412,7 +13412,8 @@
        (if (looking-at outline-regexp) (goto-char (1- (match-end 0))))
        (or (looking-at (concat " +" org-todo-regexp " *"))
	  (looking-at " *"))
-      (let* ((startpos (line-beginning-position))
+      (let* ((match-data (match-data))
+	     (startpos (line-beginning-position))
	     (logging (save-match-data (org-entry-get nil "LOGGING" t)))
	     (org-log-done (org-parse-local-options logging 'org-log-done))
	     (org-log-repeat (org-parse-local-options logging 'org-log-repeat))
@@ -13496,6 +13497,7 @@
	      ;; fail silently
	      (message "TODO state change from %s to %s blocked" this state)
	      (throw 'exit nil))))
+	(store-match-data match-data)
	(replace-match next t t)
	(unless (pos-visible-in-window-p hl-pos)
	  (message "TODO state changed to %s" (org-trim next)))

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Re: Args out of range when creating TODOs
  2007-10-25  9:50   ` Tassilo Horn
@ 2007-10-25 11:10     ` Bastien
  2007-10-25 10:25       ` Tassilo Horn
  0 siblings, 1 reply; 9+ messages in thread
From: Bastien @ 2007-10-25 11:10 UTC (permalink / raw)
  To: emacs-orgmode

Tassilo Horn <tassilo@member.fsf.org> writes:

> Yes.  I even get it with emacs -Q and only the two settings
>
> (setq org-use-fast-todo-selection t
>       org-todo-keywords '((sequence "TODO(t)" "STARTED(s)" "WAITING(w)"
>                                     "|" "DONE(d)" "DEFERRED(f)" "CANCELLED(c)")))

Mhh... strange, I still cannot reproduce here with a minimal config.
Can you debug <C-c C-t> step by step in this case?

PS: I'm using Emacs 23.0.0, not latest Emacs CVS (as you do), but I
don't think the error might come from here.

-- 
Bastien

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Args out of range when creating TODOs
  2007-10-25 10:57         ` Carsten Dominik
@ 2007-10-25 11:16           ` Tassilo Horn
  0 siblings, 0 replies; 9+ messages in thread
From: Tassilo Horn @ 2007-10-25 11:16 UTC (permalink / raw)
  To: emacs-orgmode

Carsten Dominik <carsten.dominik@gmail.com> writes:

Hi Carsten,

> There is a lot of code happening between the moment of the match, and
> the replacement.  So far none of this code seems to have had the
> effect of changing the match data, I have been careful to avoid this.
> However, in your case it seems that some internal code does change it.
>
> I believe the following patch should fix this, can you please try it?

Indeed, it fixes my problem.  Thanks a lot for your fast help.  I'll
vote for you at the best maintainer of the world championship. ;-)

Bye,
Tassilo
-- 
My opinions may have changed, but not the fact that I am right.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2007-10-25 11:17 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-25  9:05 Args out of range when creating TODOs Tassilo Horn
2007-10-25  9:21 ` Carsten Dominik
2007-10-25  9:45   ` Tassilo Horn
2007-10-25 10:40 ` Bastien
2007-10-25  9:50   ` Tassilo Horn
2007-10-25 11:10     ` Bastien
2007-10-25 10:25       ` Tassilo Horn
2007-10-25 10:57         ` Carsten Dominik
2007-10-25 11:16           ` Tassilo Horn

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.