Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

counsel.el (counsel-org-goto--get-headlines): Fix point-min bug #1011

Merged

Conversation

@fabacino
Copy link
Contributor

@fabacino fabacino commented May 17, 2017

outline-next-heading was always called once before starting the processing of the headlines, which resulted in the first headline to be excluded from the list if it was located at the very top of the file i.e. at (point-min).

The fixed function now checks if point is already on a heading and only calls outline-next-heading if this is not the case before starting the processing of the headlines.

outline-next-heading was always called once before starting the
processing of the headlines, which resulted in the first headline to
be excluded from the list if it was located at the very top of the
file i.e. at point-min.

The fixed function now checks if point is already on a heading and
only calls outline-next-heading if this is not the case before
starting the processing of the headlines.
@abo-abo abo-abo merged commit 16997d8 into abo-abo:master May 17, 2017
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@abo-abo
Copy link
Owner

@abo-abo abo-abo commented May 17, 2017

Thanks.

@@ -2386,7 +2389,8 @@ to custom."
(when (eq counsel-org-goto-display-style 'headline)
(setq name (concat (make-string level ?*) " " name)))
(setq name (counsel-org-goto--add-face name level))))
(push `(,name . ,(point-marker)) entries)))
(push `(,name . ,(point-marker)) entries))

This comment has been minimized.

@abo-abo

abo-abo May 17, 2017
Owner

This is simply cons, isn't it?

This comment has been minimized.

@fabacino

fabacino May 17, 2017
Author Contributor

That is correct, I'll simplify it.

@fabacino fabacino deleted the fabacino:bugfix/counsel-org-first-headline-is-ignored branch May 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants