Merge branch 'maint'

This commit is contained in:
Nicolas Goaziou 2017-09-07 14:38:23 +02:00
commit ad1c0faa7e
11 changed files with 41 additions and 42 deletions

View File

@ -225,7 +225,7 @@ This does two different kinds of triggers:
;; Lets see if this entry has a TRIGGER property.
;; If yes, split it up on whitespace.
(setq trigger (org-entry-get pos "TRIGGER")
triggers (and trigger (org-split-string trigger "[ \t]+")))
triggers (and trigger (split-string trigger)))
;; Go through all the triggers
(while (setq tr (pop triggers))
@ -383,7 +383,7 @@ this ID property, that entry is also checked."
;; Lets see if we will allow it. Find the BLOCKER property
;; and split it on whitespace.
(setq blocker (org-entry-get pos "BLOCKER")
blockers (and blocker (org-split-string blocker "[ \t]+")))
blockers (and blocker (split-string blocker)))
;; go through all the blockers
(while (setq bl (pop blockers))

View File

@ -124,7 +124,7 @@ contains a list of strings to be passed as options to
(and value
(string-match "\\(\\S-+\\)[ \t]+\\(\\S-+\\)\\(.*\\)" value)
(let (options limit)
(dolist (arg (org-split-string (match-string 3 value))
(dolist (arg (split-string (match-string 3 value))
;; Return value.
(list :options (nreverse options) :limit limit))
(let* ((s (split-string arg ":"))

View File

@ -659,8 +659,8 @@ holding export options."
;; variables, then we insert LCO files, and, eventually, we insert
;; settings coming from buffer keywords.
(org-koma-letter--build-settings 'global info)
(mapconcat #'(lambda (file) (format "\\LoadLetterOption{%s}\n" file))
(org-split-string (or (plist-get info :lco) "") " ")
(mapconcat (lambda (file) (format "\\LoadLetterOption{%s}\n" file))
(split-string (or (plist-get info :lco) ""))
"")
(org-koma-letter--build-settings 'buffer info)
;; Date.
@ -717,7 +717,7 @@ holding export options."
(format "\\closing{%s}\n"
(org-koma-letter--keyword-or-headline
:closing (lambda (h i) (eq (org-koma-letter--special-tag h i)
'closing))
'closing))
info))
(org-koma-letter--special-contents-inline
(plist-get info :special-tags-after-closing) info)

View File

@ -520,7 +520,7 @@ headline or finally add more underscore characters (\"_\")."
(let ((id (org-string-nw-p (org-element-property :TASK_ID item))))
;; If an id is specified, use it, as long as it's unique.
(if (and id (not (member id unique-ids))) id
(let* ((parts (org-split-string (org-element-property :raw-value item)))
(let* ((parts (split-string (org-element-property :raw-value item)))
(id (org-taskjuggler--clean-id (downcase (pop parts)))))
;; Try to add more parts of the headline to make it unique.
(while (and (car parts) (member id unique-ids))
@ -554,8 +554,8 @@ channel."
(let ((deps (concat (org-element-property :BLOCKER task)
(org-element-property :DEPENDS task))))
(and deps
(org-split-string (replace-regexp-in-string "{.*?}" "" deps)
"[ ,]* +"))))
(split-string (replace-regexp-in-string "{.*?}" "" deps)
"[ ,]* +"))))
depends)
(when deps-ids
;; Find tasks with :task_id: property matching id in DEPS-IDS.

View File

@ -148,6 +148,8 @@ details.
Use "/!" markup when filtering TODO keywords to get only not-done TODO
keywords.
*** ~org-split-string~ returns ~("")~ when called on an empty string
It used to return nil.
*** Removal of =ob-scala.el=
See [[https://github.com/ensime/emacs-scala-mode/issues/114][this github issue]].

View File

@ -2355,7 +2355,7 @@ INFO may provide the values of these header arguments (in the
((assq :wrap (nth 2 info))
(let ((name (or (cdr (assq :wrap (nth 2 info))) "RESULTS")))
(funcall wrap (concat "#+BEGIN_" name)
(concat "#+END_" (car (org-split-string name)))
(concat "#+END_" (car (split-string name)))
nil nil (concat "{{{results(@@" name ":") "@@)}}}")))
((member "html" result-params)
(funcall wrap "#+BEGIN_EXPORT html" "#+END_EXPORT" nil nil

View File

@ -4438,7 +4438,7 @@ in `org-agenda-text-search-extra-files'."
(if (or org-agenda-search-view-always-boolean
(member (string-to-char words) '(?- ?+ ?\{)))
(setq boolean t))
(setq words (org-split-string words))
(setq words (split-string words))
(let (www w)
(while (setq w (pop words))
(while (and (string-match "\\\\\\'" w) words)

View File

@ -353,7 +353,7 @@ called with one argument, the key used for comparison."
(org-lint--collect-duplicates
ast
'target
(lambda (target) (org-split-string (org-element-property :value target)))
(lambda (target) (split-string (org-element-property :value target)))
(lambda (target _) (org-element-property :begin target))
(lambda (key)
(format "Duplicate target <<%s>>" (mapconcat #'identity key " ")))))
@ -1000,7 +1000,7 @@ Use \"export %s\" instead"
(unless (memq allowed-values '(:any nil))
(let ((values (cdr header))
groups-alist)
(dolist (v (if (stringp values) (org-split-string values)
(dolist (v (if (stringp values) (split-string values)
(list values)))
(let ((valid-value nil))
(catch 'exit

View File

@ -5095,7 +5095,7 @@ Return value contains the following keys: `archive', `category',
((equal key "CONSTANTS")
(let* ((constants (assq 'constants alist))
(store (cdr constants)))
(dolist (pair (org-split-string value))
(dolist (pair (split-string value))
(when (string-match "^\\([a-zA-Z0][_a-zA-Z0-9]*\\)=\\(.*\\)"
pair)
(let* ((name (match-string 1 pair))
@ -5110,7 +5110,7 @@ Return value contains the following keys: `archive', `category',
(let ((old (assq 'filetags alist))
(new (apply #'nconc
(mapcar (lambda (x) (org-split-string x ":"))
(org-split-string value)))))
(split-string value)))))
(if old (setcdr old (append new (cdr old)))
(push (cons 'filetags new) alist)))))
((equal key "LINK")
@ -5126,7 +5126,7 @@ Return value contains the following keys: `archive', `category',
(push (cons 'scripts (read (match-string 1 value))) alist)))
((equal key "PRIORITIES")
(push (cons 'priorities
(let ((prio (org-split-string value)))
(let ((prio (split-string value)))
(if (< (length prio) 3) '(?A ?C ?B)
(mapcar #'string-to-char prio))))
alist))
@ -5143,8 +5143,8 @@ Return value contains the following keys: `archive', `category',
(let ((startup (assq 'startup alist)))
(if startup
(setcdr startup
(append (cdr startup) (org-split-string value)))
(push (cons 'startup (org-split-string value)) alist))))
(append (cdr startup) (split-string value)))
(push (cons 'startup (split-string value)) alist))))
((equal key "TAGS")
(let ((tag-cell (assq 'tags alist)))
(if tag-cell
@ -5153,7 +5153,7 @@ Return value contains the following keys: `archive', `category',
((member key '("TODO" "SEQ_TODO" "TYP_TODO"))
(let ((todo (assq 'todo alist))
(value (cons (if (equal key "TYP_TODO") 'type 'sequence)
(org-split-string value))))
(split-string value))))
(if todo (push value (cdr todo))
(push (list 'todo value) alist))))
((equal key "SETUPFILE")
@ -9917,7 +9917,7 @@ according to FMT (default from `org-email-link-description-format')."
(org-back-to-heading t)
(org-element-property :raw-value (org-element-at-point))))))
(lines org-context-in-file-links))
(or string (setq s (concat "*" s))) ; Add * for headlines
(unless string (setq s (concat "*" s))) ;Add * for headlines
(setq s (replace-regexp-in-string "\\[[0-9]+%\\]\\|\\[[0-9]+/[0-9]+\\]" "" s))
(when (and string (integerp lines) (> lines 0))
(let ((slines (org-split-string s "\n")))
@ -9926,7 +9926,7 @@ according to FMT (default from `org-email-link-description-format')."
'identity
(reverse (nthcdr (- (length slines) lines)
(reverse slines))) "\n")))))
(mapconcat 'identity (org-split-string s "[ \t]+") " ")))
(mapconcat #'identity (split-string s) " ")))
(defun org-make-link-string (link &optional description)
"Make a link with brackets, consisting of LINK and DESCRIPTION."
@ -10818,7 +10818,7 @@ the window configuration before `org-open-at-point' was called using:
White spaces are not significant."
(let ((re (format "<<<%s>>>"
(mapconcat #'regexp-quote
(org-split-string target "[ \t\n]+")
(split-string target)
"[ \t]+\\(?:\n[ \t]*\\)?")))
(origin (point)))
(goto-char (point-min))
@ -12860,7 +12860,7 @@ This hook runs even if there is no statistics cookie present, in which case
(setq org-log-done nil
org-log-repeat nil
org-todo-log-states nil)
(dolist (w (org-split-string value))
(dolist (w (split-string value))
(let (a)
(cond
((setq a (assoc w org-startup-options))
@ -15832,44 +15832,41 @@ non-nil when a property was removed."
(defun org-entry-add-to-multivalued-property (pom property value)
"Add VALUE to the words in the PROPERTY in entry at point-or-marker POM."
(let* ((old (org-entry-get pom property))
(values (and old (org-split-string old "[ \t]"))))
(values (and old (split-string old))))
(setq value (org-entry-protect-space value))
(unless (member value values)
(setq values (append values (list value)))
(org-entry-put pom property
(mapconcat 'identity values " ")))))
(org-entry-put pom property (mapconcat #'identity values " ")))))
(defun org-entry-remove-from-multivalued-property (pom property value)
"Remove VALUE from words in the PROPERTY in entry at point-or-marker POM."
(let* ((old (org-entry-get pom property))
(values (and old (org-split-string old "[ \t]"))))
(values (and old (split-string old))))
(setq value (org-entry-protect-space value))
(when (member value values)
(setq values (delete value values))
(org-entry-put pom property
(mapconcat 'identity values " ")))))
(org-entry-put pom property (mapconcat #'identity values " ")))))
(defun org-entry-member-in-multivalued-property (pom property value)
"Is VALUE one of the words in the PROPERTY in entry at point-or-marker POM?"
(let* ((old (org-entry-get pom property))
(values (and old (org-split-string old "[ \t]"))))
(values (and old (split-string old))))
(setq value (org-entry-protect-space value))
(member value values)))
(defun org-entry-get-multivalued-property (pom property)
"Return a list of values in a multivalued property."
(let* ((value (org-entry-get pom property))
(values (and value (org-split-string value "[ \t]"))))
(mapcar 'org-entry-restore-space values)))
(values (and value (split-string value))))
(mapcar #'org-entry-restore-space values)))
(defun org-entry-put-multivalued-property (pom property &rest values)
"Set multivalued PROPERTY at point-or-marker POM to VALUES.
VALUES should be a list of strings. Spaces will be protected."
(org-entry-put pom property
(mapconcat 'org-entry-protect-space values " "))
(org-entry-put pom property (mapconcat #'org-entry-protect-space values " "))
(let* ((value (org-entry-get pom property))
(values (and value (org-split-string value "[ \t]"))))
(mapcar 'org-entry-restore-space values)))
(values (and value (split-string value))))
(mapcar #'org-entry-restore-space values)))
(defun org-entry-protect-space (s)
"Protect spaces and newline in string S."
@ -21870,7 +21867,7 @@ wrapped to the length of that word.
IF WIDTH is nil and LINES is non-nil, the string is forced into at most that
many lines, whatever width that takes.
The return value is a list of lines, without newlines at the end."
(let* ((words (org-split-string string "[ \t\n]+"))
(let* ((words (split-string string))
(maxword (apply 'max (mapcar 'org-string-width words)))
w ll)
(cond (width

View File

@ -935,9 +935,9 @@ value."
org-beamer-environments-default)))
((and (equal property "BEAMER_col")
(not (org-entry-get nil (concat property "_ALL") 'inherit)))
;; If no allowed values for BEAMER_col have been defined,
;; supply some
(org-split-string org-beamer-column-widths " "))))
;; If no allowed values for BEAMER_col have been defined, supply
;; some.
(split-string org-beamer-column-widths " "))))
(add-hook 'org-property-allowed-value-functions
'org-beamer-allowed-property-values)

View File

@ -1452,7 +1452,7 @@ for export. Return options as a plist."
(parse
(org-element-parse-secondary-string
value (org-element-restriction 'keyword)))
(split (org-split-string value))
(split (split-string value))
(t value))))))))))))
(defun org-export--get-inbuffer-options (&optional backend)
@ -1560,7 +1560,7 @@ Assume buffer is in Org mode. Narrowing, if any, is ignored."
"\n"
(org-trim val))))
(split `(,@(plist-get plist property)
,@(org-split-string val)))
,@(split-string val)))
((t) val)
(otherwise
(if (not (plist-member plist property)) val