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

FR: Option to not export "title" and "author" #7

Open
sandinmyjoints opened this issue Dec 1, 2021 · 4 comments
Open

FR: Option to not export "title" and "author" #7

sandinmyjoints opened this issue Dec 1, 2021 · 4 comments
Assignees

Comments

@sandinmyjoints
Copy link

Similar to kawabata#83. When I export to gfm, my name is being rendered at the top of the output, like:

---
author: William Bert
---

It's not in the output if I run pandoc directly with the same flags that ox-pandoc says it's using. I'm not sure where ox-pandoc is getting it from, perhaps from user-full-name. I'd like to be able to suppress it.

@a-fent a-fent self-assigned this Dec 1, 2021
@a-fent
Copy link
Collaborator

a-fent commented Dec 1, 2021

Thanks for the report. Could you point me to the flags that you use with pandoc to suppress this? Can you use these in #+PANDOC_OPTIONS:?

@sandinmyjoints
Copy link
Author

I haven't used/found any flags to suppress it. When I run org-pandoc-export-as-gfm, it prints a message to the *Messages* buffer saying Running pandoc with args: (-f org -t gfm --wrap=preserve --standalone /Users/william/notes/stories/new-stories.tmphFfty8.org).

So then I tried running that command myself. I ran it against the original file, not the temp file that ox-pandoc created, since that's gone:

$ pandoc -f org -t gfm --wrap=preserve --standalone new-stories.org

The output from the ox-pandoc command has the author metadata in it. The output from running pandoc directly does not. So I'm stumped as to where it's coming from.

@a-fent
Copy link
Collaborator

a-fent commented Dec 1, 2021

Yes, it's coming from user-full-name, which Org Mode's built-in exporters add as #+AUTHOR: even if not explicitly given in the file. If you do, for example C-c C-e h H you'll see your name is added as author to an HTML export.

The solution is to either globally set the variable org-export-with-author to nil or in the specific file you want to suppress author information adding #+OPTIONS: author:nil. I hope this clears it up.

@sandinmyjoints
Copy link
Author

Yeah, that makes sense, thanks. I tried both of those and they did remove the author value, though the metadata section (for lack of a better term) is still there at the top of the file, just empty now:

---
---

Perhaps I can do some post-processing in a hook to remove that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants