-
Notifications
You must be signed in to change notification settings - Fork 131
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
Export happens even when EXPORT_FILE_NAME is empty #211
Comments
That is a bug, but not what you think :) The posts are always exported. If the state is DONE, they are exported with The bug is that export is happening even when Thanks for catching this, and also providing a test. I'll fix it. |
Also, you will not face this bug if you derive your Org capture template from the ox-hugo documentation. I use |
Yep. But I didn't follow the template that you mentioned, and sometime I decide the title after |
Unrelated question: I am curious why you are using EXPORT_HUGO_TAGS instead of the normal Org tags. If you use Org tags, you can "collect" tags from the parent hierarchy too.
|
That's interesting. But I want to keep my all posts in the second level of org headings. In order to that, if I put all tags to the headings, the headings will be messed up. Since I want to keep the heading line clean and simple, I usually put only one category to the heading line like |
Hmm, that first C-c C-c after capture shouldn't have caused the export in any case. I'll investigate. |
@takaxp OK, after that last commit, now at least the ".md" files won't export. If you attempt to export, you will get:
So that resolved one part of the problem. Let's resolve part 2 of the problem (why C-c C-c attempts to export in Org Capture) in #212. Thanks for reporting such issues! |
Hi!
When I use the latest ox-hugo with
ox-hugo-auto-export
andauto-save-buffers.el
, unexpected files were exported during writing a new post in an org file.For example, my org file is organized as:
Then I create a new post via org-capture, the file will be the following and automatically saved by
auto-save-buffer.el
.In this case, the second post will be immediately exported as
2018/.md
becauseorg-hugo--parse-draft-state
always returnt
. Moreover,2018/a-new-.md
could be exported during thinking the blog title becauseauto-save-buffers.el
will be activated after going by an idle time, e.g. 1.5[s].My proposal is refining the behavior of
org-hugo--parse-draft-state
. The function should returnt
only when the org state isDRAFT
or specifyingHUGO_DRAFT
in the post.Something like this:
The text was updated successfully, but these errors were encountered: