ardumont / org2jekyll

Blogging with org-mode and jekyll without alien yaml headers.
GNU General Public License v2.0
71 stars 19 forks source link

about the org2jekyll-create-draft #20

Closed gttiankai closed 9 years ago

gttiankai commented 9 years ago

Hi! Firstly, thank you for your org2jekyll. I like it very much. Now, I have one quesstion. when I use the function org2jekeyll-create-draft, then input some information about the blog. the file's default path is /my-project-path/_post/nil. Can I change it ? if yes, then how to change it ? thank you very much.

ardumont commented 9 years ago

Hello,

Hi! Firstly, thank you for your org2jekyll. I like it very much.

Cool.

Now, I have one quesstion. when I use the function org2jekeyll-create-draft, then input some information about the blog. the file's default path is /my-project-path/_post/nil.

Aha!

This is surprising as this should not happen... since: https://github.com/ardumont/org2jekyll/blob/master/org2jekyll.el#L117

(Do you know the version you are using?)

Can I change it ?

Anyway, yes, you can. (Beware that's a relative path from your org2jekyll home path though)

if yes, then how to change it ?

Something like:

  (custom-set-variables  '(org2jekyll-jekyll-drafts-dir ""))

Here is my configuration https://github.com/ardumont/blog-pack/blob/master/blog-pack.el#L18

thank you very much.

Thanks!

Cheers,

gttiankai commented 9 years ago

Thank you for your reply.

I noticed that the custom-set-varibales takes effiects only when input "M+x eval-buffer".

My solution is that input " M+x customize-group ", then change the state of org2jekyll.

ardumont commented 9 years ago

Thank you for your reply.

I noticed that the custom-set-varibales takes effiects only when input "M+x eval-buffer".

Every snippet of emacs-lisp (elisp) is like that (so much that I forgot to tell you to do it...)

You need to tell emacs to evaluate the elisp so M-x eval-buffer or any other eval functions call.

To make it persistent (after next reboot that is), you need to save it inside either ~/.emacs or ~/.emacs.d/init.el or inside files you know are loaded at your emacs' startup.

My solution is that input " M+x customize-group ", then change the state of org2jekyll.

It's because customize-group evaluate that expression. And also generates the bits and pieces needed for it to be persisted on emacs' next reboot (probably inside your ~/.emacs.d/init.el).

Cheers,

gttiankai commented 9 years ago

when I use the function "org2jekyll-create-draft", then input the tile name whit English plus Chinese. but the created file's name is only constains Englis. example: when I input the tile whith "你好test" is test.org ,is not "你好test.org"

(plus: my org2jekyll version : 0.1.5)

Thanks a lot.

在 2015年6月25日,下午10:34,Antoine R. Dumont notifications@github.com 写道:

Thank you for your reply.

I noticed that the custom-set-varibales takes effiects only when input "M+x eval-buffer".

Every snippet of emacs-lisp (elisp) is like that (so much that I forgot to tell you to do it...)

You need to tell emacs to evaluate the elisp so M-x eval-buffer or any other eval functions call.

To make it persistent (after next reboot that is), you need to save it inside either ~/.emacs or ~/.emacs.d/init.el or inside files you know are loaded at your emacs' startup.

My solution is that input " M+x customize-group ", then change the state of org2jekyll.

It's because customize-group evaluate that expression. And also generates the bits and pieces needed for it to be persisted on emacs' next reboot (probably inside your ~/.emacs.d/init.el).

Cheers,

— Reply to this email directly or view it on GitHub https://github.com/ardumont/org2jekyll/issues/20#issuecomment-115277531.

ardumont commented 9 years ago

when I use the function "org2jekyll-create-draft", then input the tile name whit English plus Chinese. but the created file's name is only constains Englis. example: when I input the tile whith "你好test" is test.org ,is not "你好test.org"

Please, try to be more thoughtful before sending a message. There are lots of typos. It's painful to read.

Also, I did not understood right away what you meant (I read it multiple times).

The culprit function is https://github.com/ardumont/org2jekyll/blob/master/org2jekyll.el#L127-L132. It's filtering naively on unknown symbols that could prevent the file's persistence on disk and maybe later preventing jekyll to work.

I'm nowhere near being an expert on those. I'm open to pull request for improving this.

Thanks.

Cheers,

gttiankai commented 9 years ago

Hi. I modify the function https://github.com/ardumont/org2jekyll/blob/master/org2jekyll.el#L166-168.

my function is here:

(let ((draft-file (concat (org2jekyll-input-directory org2jekyll-jekyll-drafts-dir)
                              title
                              org2jekyll-jekyll-post-ext)))

I delete the filter.

ardumont commented 9 years ago

Hello,

I modify the function https://github.com/ardumont/org2jekyll/blob/master/org2jekyll.el#L166-168. my function is here:

(let ((draft-file (concat (org2jekyll-input-directory org2jekyll-jekyll-drafts-dir)
                              title
                              org2jekyll-jekyll-post-ext)))

I delete the filter.

Ok. Have you tried to publish the draft after that?

I do not remember the details but I remember having problems about drafts without the fllter.

Also, you could propose a pull request (easier discussion on code for one benefit).

Cheers,

gttiankai commented 9 years ago

Yes I had tried to publish the draft. I did not get any error. I will be very carefully about the blog title. Cheers.

ardumont commented 9 years ago

Ok, then.

I'll see what I can do based on this thread's discussion.

Cheers,

ardumont commented 9 years ago

Done!

Cheers,