diff --git a/lisp/org-macro.el b/lisp/org-macro.el index f914a33d6..311eaf9a5 100644 --- a/lisp/org-macro.el +++ b/lisp/org-macro.el @@ -82,6 +82,8 @@ directly, use instead: #+MACRO: name template") +(defvar org-macro-arg-sep-other "'@") + ;;; Functions (defun org-macro--set-template (name value templates) @@ -277,15 +279,19 @@ Return a list of arguments, as strings. This is the opposite of `org-macro-escape-arguments'." ;; Do not use `org-split-string' since empty strings are ;; meaningful here. + (let ((sep (cond ((eq org-startup-macro-arg-sep 'comma) + ",") + ((eq org-startup-macro-arg-sep 'other) + org-macro-arg-sep-other)))) (split-string (replace-regexp-in-string - "\\(\\\\*\\)," + (format "\\(\\\\*\\)%s" sep) (lambda (str) (let ((len (length (match-string 1 str)))) (concat (make-string (/ len 2) ?\\) - (if (zerop (mod len 2)) "\000" ",")))) + (if (zerop (mod len 2)) "\000" (format "%s" sep))))) s nil t) - "\000")) + "\000"))) ;;; Helper functions and variables for internal macros diff --git a/lisp/org.el b/lisp/org.el index 7d8733448..a51893ed3 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -974,6 +974,15 @@ case it is too late to set the variable `org-startup-truncated'." :group 'org-startup :type 'boolean) +(defcustom org-startup-macro-arg-sep 'comma + "TODO" + :group 'org-startup + :package-version '(Org . "9.0") + :version "26.1" + :type '(choice + (const :tag "comma" comma) + (const :tag "other" other))) + (defcustom org-startup-indented nil "Non-nil means turn on `org-indent-mode' on startup. This can also be configured on a per-file basis by adding one of @@ -4187,7 +4196,8 @@ After a match, the following groups carry important information: ("nohideblocks" org-hide-block-startup nil) ("beamer" org-startup-with-beamer-mode t) ("entitiespretty" org-pretty-entities t) - ("entitiesplain" org-pretty-entities nil)) + ("entitiesplain" org-pretty-entities nil) + ("macro-arg-sep-other" org-startup-macro-arg-sep other)) "Variable associated with STARTUP options for Org. Each element is a list of three items: the startup options (as written in the #+STARTUP line), the corresponding variable, and the value to set