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

Call org-back-to-heading with INVISIBLE-OK set to true #51

Merged

Conversation

punchagan
Copy link
Contributor

The point can end up on the wrong headline, causing the export to
fail, when org-back-to-heading isn't called without INVISIBLE-OK.

@kaushalmodi
Copy link
Owner

It looks fine to me. Though, I haven't yet faced that error. Can you describe a workflow for which this fix is being made? When would you need to make top portion of a tree-to-be-exported invisible?

Also, as a nitpick, can you update the commit to say (org-back-to-heading :invisible-ok)? I just like the arg to be self-explaining (basically match the name of the actual arg with a colon prefix.. because t or :invisible-ok would work the same way :)

Can you also put an explanation of a scenario where using :invisible-ok would be necessary in the commit message itself?

From the commit message of the current PR:

The point can end up on the wrong headline,

Wouldn't that export the wrong tree then?

@punchagan
Copy link
Contributor Author

Use the all-posts.org file in the example-site

  1. cycle visibility of headings, until all the headings in the buffer are collapsed.
  2. C-c e H A to export all the posts
    The export fails with an error indicating that HUGO_EXPORT_FILE_NAME is mandatory, with the point at the * Image subtree. The export was actually exporting the first child ** Image links, but org-back-to-heading leaves the point at the wrong location.

The `point` can end up on the wrong headline, causing the export to
fail, when org-back-to-heading isn't called without `INVISIBLE-OK`.
@punchagan punchagan force-pushed the fix-export-with-invisible-trees branch from 2c629c1 to 2606f79 Compare July 27, 2017 05:44
@kaushalmodi kaushalmodi merged commit 98c50ac into kaushalmodi:master Jul 27, 2017
@kaushalmodi
Copy link
Owner

Makes sense. Thanks!

@punchagan punchagan deleted the fix-export-with-invisible-trees branch July 27, 2017 07:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants