emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Args out of range: #<buffer test.org>, 0, 1
@ 2015-01-13 15:05 Sebastien Vauban
  2015-01-13 15:52 ` Nicolas Richard
  2015-01-13 16:21 ` Nicolas Goaziou
  0 siblings, 2 replies; 6+ messages in thread
From: Sebastien Vauban @ 2015-01-13 15:05 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hello,

I sometimes (or often?) have the above error when pressing `C-c C-v C-d'
onto some region (to put it in a code block).

Org is supposed to ask me which language it is for, and then wrap my
selection with the right #+begin/end_src markers. Instead, I get the
"args out of range" error.

I tried to edebug the function `org-babel-demarcate-block' and the error
arises quite at the beginning: on the `match-string 0', on the second
line of the `let*'.

The error is generated because `org-babel-where-is-src-block-head'
returned nil...

I now have two problems at least:

- I can't reproduce it in a minimal Emacs, and there... edebug ends in
  an error (I wanted to compare the execution steps), as you can see on
  the right screen of http://screencast.com/t/A5ldV2yHNna.
  
  Why is edebug crashing?

- It seems normal that `org-babel-where-is-src-block-head' returns nil
  when we use `C-c C-v C-d' to create the first code block in a buffer
  which did not contain any... and it works in my minimal Emacs... (iff
  edebug is turned off)

Any idea of the problem, then?

Clearly, there is some extra cause I did not identify yet. Can you help?

Best regards,
  Seb

-- 
Sebastien Vauban

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

end of thread, other threads:[~2015-01-14  8:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-13 15:05 Args out of range: #<buffer test.org>, 0, 1 Sebastien Vauban
2015-01-13 15:52 ` Nicolas Richard
2015-01-13 20:40   ` Sebastien Vauban
2015-01-13 21:58     ` Nicolas Richard
2015-01-14  8:27       ` Sebastien Vauban
2015-01-13 16:21 ` Nicolas Goaziou

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.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).