pangu-spacing icon indicating copy to clipboard operation
pangu-spacing copied to clipboard

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

Open kuanyui opened this issue 9 years ago • 2 comments

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.

kuanyui avatar Nov 23 '14 13:11 kuanyui

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 avatar Nov 23 '14 13:11 coldnew

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

coldnew avatar Feb 10 '15 16:02 coldnew