alphapapa / outshine

Org-mode for non-Org buffers
GNU General Public License v2.0
212 stars 23 forks source link

Wrong type argument: number-or-marker-p, nil when calling outshine-cycle-buffer on a headline #72

Closed cyrus-and closed 5 years ago

cyrus-and commented 5 years ago

The issue

outshine-cycle-buffer (bound by default to <M-TAB>) doesn't work when the point is on headings.

How to reproduce

  1. Create and open the following outshine-issue.el file:

    ;;; Foo
    
    ;; Local Variables:
    ;; eval: (outshine-mode)
    ;; End:
  2. Move the point to the line where Foo is (anywhere but column 0, it works there);

  3. Press <M-tab> or M-x outshine-cycle-buffer.

At this point the error is triggered and the visibility is not cycled:

 Wrong type argument: number-or-marker-p, nil

Versions

thblt commented 5 years ago

Thanks for your report, please pull HEAD and confirm the issue is solved, reopen if not. You may also wait until Melpa distributes 4c6107da8fd6119ba1b2379cd2f68c8c7374e8d5, in a few hours.

cyrus-and commented 5 years ago

Awesome! Thanks for the immediate fix, I can confirm that the problem is now solved.