[ERROR] IndexDefect: index 3 not in 0 .. 2
Any way to have a better way of understanding why it can't parse the file?
This error is not very helpful
[ERROR] IndexDefect: index 3 not in 0 .. 2
Can you please post a reproducible example?
Well, that's a problem, cause it's my 500 line org-mode file and it contains some secrets, but can't the program say anything about where it has problems, like what line number, etc?
I have to bisect the file?
I should be able to output the line number of the Org file when that unhandled exception happens, but I don't have that mechanism in place. When I fix this, I'll look into adding that feature.
I have to bisect the file?
That's the easiest way. Keep on commenting out your file in half until you stop getting that exception. Then uncomment in halves again until you reproduce this exception.
ok, here's a reproducible;)
* emacs
#+property: header-args :tangle yes
#+INCLUDE: early-init.el src emacs-lisp
#+INCLUDE: init.el src emacs-lisp
***** word
https://www.emacswiki.org/emacs/CopyWithoutSelection
#+begin_src elisp
(defun get-point (symbol &optional arg)
"get the point"
(funcall symbol arg)
(point)
)
(defun copy-thing (begin-of-thing end-of-thing &optional arg)
"copy thing between beg & end into kill ring"
(save-excursion
(let ((beg (get-point begin-of-thing 1))
(end (get-point end-of-thing arg)))
(copy-region-as-kill beg end)))
)
(defun paste-to-mark(&optional arg)
"Paste things to mark, or to the prompt in shell-mode"
(let ((pasteMe
(lambda()
(if (string= "shell-mode" major-mode)
(progn (comint-next-prompt 25535) (yank))
(progn (goto-char (mark)) (yank) )))))
(if arg
(if (= arg 1)
nil
(funcall pasteMe))
(funcall pasteMe))
))
;; now copy the god damn word
(defun copy-word (&optional arg)
"Copy words at point into kill-ring"
(interactive "P")
(copy-thing 'backward-word 'forward-word arg)
;;(paste-to-mark arg)
)
(define-key my-mode-map (kbd "C-M-w c") 'copy-word)
#+end_src
Any idea what this could be?;)