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

Pangu-spacing will cause Org-Capture's file-datetree rotten. #5

Open
kuanyui opened this issue Nov 23, 2014 · 2 comments
Open

Pangu-spacing will cause Org-Capture's file-datetree rotten. #5

kuanyui opened this issue Nov 23, 2014 · 2 comments
Labels

Comments

@kuanyui
Copy link

kuanyui commented Nov 23, 2014

I have to report an important issue of Org-mode + Pangu-Spacing to avoid another mad user like me...

When using Org built-in Capture, pangu-spacing with pangu-spacing-real-insert-separtor set to t may cause the rot of file+datetree format, result in the duplicated outlines. Please read:
http://lists.gnu.org/archive/html/emacs-orgmode/2014-11/msg00536.html

(setq org-directory "~/org")
(setq org-default-notes-file (concat org-directory "/notes.org"))
(define-key global-map "\C-cc" 'org-capture)

(setq org-capture-templates
      '(("d" "Diary" entry
     (file+datetree (concat org-directory "/diary/diary.org"))
     "* %? %U")
    ))

In short, Capture generate a outline like this:

** 2014-11 11月

But pangu-spacing will add a space before "月":

** 2014-11 11 月

This behavior cause Capture cannot recognize which is the correct corresponding sub-tree, and create another after another new sub-trees whenever a file+datetree Capture is called.

Anyway, I think this issue should be informed in README.


The possible solutions...

  1. Customize the date format tree of datetree of Capture to avoid any possible lack of space between CJK/latin characters. (I don't know if this can be done.)
  2. Don't set pangu-spacing-real-insert-separtor to t when using org-mode.
  3. Write a hook to check if current buffer CAPTURE-.* or the file in list (well...pre-set manually...) to decide if set pangu-spacing-real-insert-separtor to `t.
@coldnew
Copy link
Owner

coldnew commented Nov 23, 2014

I didn't notic about this issue, but I can give you another workround, set date-format to english format.

(setq system-time-locale "en_US" )

I'll try to fix this issue in next release, but I don't know when...

@coldnew
Copy link
Owner

coldnew commented Feb 10, 2015

Is skip datetime in outline enough ? Or I need to care more ?
I'm planing to write a unit test to make sure everything ok then release v0.5

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

No branches or pull requests

2 participants