gregsexton / origami.el

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

Using dabbrev-expand in fold jumps forward #34

Open Loosefish opened 8 years ago

Loosefish commented 8 years ago

When using dabbrev-expand inside a fold, the word is expanded and the cursor jumps forward to what looks like the end of the node.

Example with origami-fold-style set to triple braces (| marks the cursor position):

;;; {{{
(defun foo ()
  (con|
  (concat "foo" "bar"))
;;; }}}

Pressing M-/ produces:

;;; {{{
(defun foo ()
  (concat
  (concat "foo" "bar"))
;;; }}|}

It works fine outside the fold.

It also happens with other folding-styles, but it's trickier to reproduce. I tested this with a minimal .emacs and a fresh install from melpa.

Any ideas what's happening there? Thanks!

gregsexton commented 8 years ago

Which version of emacs are you running? This is odd but I have been able to repro.

Loosefish commented 8 years ago

I'm on 24.5.1 running on linux.

gregsexton commented 8 years ago

Thanks. When I try and debug this it hangs up Emacs, which is fun! Not sure yet what's going on. Thanks for pointing out the problem though.