alphapapa / org-sticky-header

Show off-screen Org heading at top of window
145 stars 9 forks source link

Possible bug in Emacs, org-inlinetask, and/or org-sticky-header #8

Closed alphapapa closed 5 years ago

alphapapa commented 7 years ago

Charles C. Berry reported: https://lists.gnu.org/archive/html/emacs-orgmode/2017-04/msg00261.html

chasberry commented 7 years ago

I think this issue can be resolved by changing org-sticky-header--fetch-stickyline as follows:

Add (not (bobp)) to the (while (and conditions that skip inlinetasks. This prevents unending looping on (forward-line -1) when an inlinetask is at the top of a buffer or the visible part of a narrowed buffer.

Change save-excursion to org-with-wide-buffer. This allows access to the headers above the visible portion of a narrowed buffer so they may be included in the sticky line.

alphapapa commented 7 years ago

Thanks, Charles, I'll try your suggestions soon.

alphapapa commented 5 years ago

@chasberry Sorry for the long delay. This should fix the infinite loop when narrowed.

I wasn't able to reproduce the export problem. I tried exporting both buffer and subtree context with LaTeX. There may be a configuration difference between us, as I pressed l L, and there was no prompt at which to press y.

If you have the time and interest, please try to reproduce the export problem again with the latest version of org-sticky-header. If you can, please try also to reproduce with emacs -q. If it still happens then, please let me know which version of Org you're using.

Thanks.

chasberry commented 5 years ago

org-mode has had many changes since 2017. I just updated to 9.2.3.

Trying my ECM, I found that it worked as it should for both export and narrowing with a version of org-sticky-header.el from 2017.

Your new version works fine, too. And it handles inlinetasks that in the old 2017 version sometimes showed up as sticky headlines, I think.

alphapapa commented 5 years ago

Great, thank you very much.