aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/org
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/org')
-rw-r--r--lisp/org/org-protocol.el15
1 files changed, 9 insertions, 6 deletions
diff --git a/lisp/org/org-protocol.el b/lisp/org/org-protocol.el
index 33957ee3269..bb88c2fe1fd 100644
--- a/lisp/org/org-protocol.el
+++ b/lisp/org/org-protocol.el
@@ -349,17 +349,20 @@ returned list."
349 ret) 349 ret)
350 l))) 350 l)))
351 351
352(defun org-protocol-flatten (list) 352(if (fboundp 'flatten-tree)
353 "Transform LIST into a flat list. 353 (defalias 'org-protocol-flatten 'flatten-tree)
354 (defun org-protocol-flatten (list)
355 "Transform LIST into a flat list.
354 356
355Greedy handlers might receive a list like this from emacsclient: 357Greedy handlers might receive a list like this from emacsclient:
356\((\"/dir/org-protocol:/greedy:/~/path1\" (23 . 12)) (\"/dir/param\")) 358\((\"/dir/org-protocol:/greedy:/~/path1\" (23 . 12)) (\"/dir/param\"))
357where \"/dir/\" is the absolute path to emacsclients working directory. 359where \"/dir/\" is the absolute path to emacsclients working directory.
358This function transforms it into a flat list." 360This function transforms it into a flat list."
359 (if (null list) () 361 (if (null list) ()
360 (if (listp list) 362 (if (listp list)
361 (append (org-protocol-flatten (car list)) (org-protocol-flatten (cdr list))) 363 (append (org-protocol-flatten (car list))
362 (list list)))) 364 (org-protocol-flatten (cdr list)))
365 (list list)))))
363 366
364(defun org-protocol-parse-parameters (info &optional new-style default-order) 367(defun org-protocol-parse-parameters (info &optional new-style default-order)
365 "Return a property list of parameters from INFO. 368 "Return a property list of parameters from INFO.