Skip to content

Instantly share code, notes, and snippets.

@letoh
Created July 21, 2015 18:14
Show Gist options
  • Save letoh/ac5a5c0cd99a64be3682 to your computer and use it in GitHub Desktop.
Save letoh/ac5a5c0cd99a64be3682 to your computer and use it in GitHub Desktop.
some tweaks on org-emphasis syntax
;;; 只在 Org 8.2.10 測試過
;;; 應該可以放到 org-load-hook 之類的地方吧...
;; 允許中文全形標點緊接在 emphasis marker 前後 (i.e. pre-, post-match)
;; 例: ,*中文* 或 +測試+。
(setcar (nthcdr 0 org-emphasis-regexp-components) " \t('\"{、,。:;?「」『』〈〉《》>【】﹝﹞")
(setcar (nthcdr 1 org-emphasis-regexp-components) "- \t.,:!?;'\")}\\、,。:;?「」『』〈〉《》【】﹝﹞")
;; 允許 , ' " 這三個標點出現在緊臨 emmphasis marker 內側的位置
;; 例: ="= 或 =123"=
(setcar (nthcdr 2 org-emphasis-regexp-components) " \t\r\n")
(custom-set-variables `(org-emphasis-alist ',org-emphasis-alist))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment