gregsexton / origami.el

A folding minor mode for Emacs
516 stars 41 forks source link

Backtrace when `M-x origami-recursively-toggle-node` on xdisp.c@Emacs 26.2 #86

Open emacksnotes opened 5 years ago

emacksnotes commented 5 years ago

Visit xdisp.c@Emacs 26.2

With point at the beginning of buffer, do M-x origami-recursively-toggle-node. I get the following backtrace which goes like this. (See attachment for the full backtrace)

Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
  <=(nil 2305843009213693951)
  (and (>= beg (origami-fold-beg node)) (<= end (origami-fold-end node)))
  (closure ((end) (beg . 832498) (tree . [1 2305843009213693951 0 t nil root]) t) (node) (and (>= beg (origami-fold-beg node)) (<= end (origami-fold-end node))))([1 2305843009213693951 0 t nil root])
  funcall((closure ((end) (beg . 832498) (tree . [1 2305843009213693951 0 t nil root]) t) (node) (and (>= beg (origami-fold-beg node)) (<= end (origami-fold-end node)))) [1 2305843009213693951 0 t nil root])
  (if (funcall pred tree) (progn (let ((child (-first pred (origami-fold-children tree)))) (if child (cons tree (origami-fold-find-deepest child pred)) (list tree)))))
  (progn (if (funcall pred tree) (progn (let ((child (-first pred (origami-fold-children tree)))) (if child (cons tree (origami-fold-find-deepest child pred)) (list tree))))))
  (if tree (progn (if (funcall pred tree) (progn (let ((child (-first pred (origami-fold-children tree)))) (if child (cons tree (origami-fold-find-deepest child pred)) (list tree)))))))
  origami-fold-find-deepest([1 2305843009213693951 0 t nil root] (closure ((end) (beg . 832498) (tree . [1 2305843009213693951 0 t nil root]) t) (node) (and (>= beg (origami-fold-beg node)) (<= end (origami-fold-end node)))))
  origami-fold-find-path-containing-range([1 2305843009213693951 0 t nil root] 832498 nil)
  (let ((path (origami-fold-find-path-containing-range tree beg end))) (if path (progn (let ((last (-last-item path))) (if (and (= beg (origami-fold-beg last)) (= end (origami-fold-end last))) (progn path))))))
  origami-fold-find-path-with-range([1 2305843009213693951 0 t nil root] 832498 nil)

I have loaded uncompiled origami source from the commit 1f38085c8f9af7842765ed63f7d6dfe4dab59366 Merge pull request #37 from purcell/master

Attachment

origami-recursively-toggle-node-backtrace.txt