summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2015-10-31 12:49:59 -0400
committerKyle Meyer <kyle@kyleam.com>2015-10-31 12:49:59 -0400
commit59468ab2d85a9e53320c09310051bcf2a6c0ac1a (patch)
treeb4479b5300363c1161662bffb024af1874ad51ce
parent0b78c71cd5337bf44a8e9933fe65c2ab74109fcc (diff)
parent59d706219bf0434cceacda18e3d291c241648199 (diff)
downloadorg-mode-59468ab2d85a9e53320c09310051bcf2a6c0ac1a.tar.gz
Merge branch 'maint'
-rwxr-xr-xlisp/org.el3
-rw-r--r--testing/lisp/test-org.el3
2 files changed, 5 insertions, 1 deletions
diff --git a/lisp/org.el b/lisp/org.el
index a368cd2..30c27d3 100755
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -11749,6 +11749,7 @@ such as the file name.
SEPARATOR is inserted between the different parts of the path,
the default is \"/\"."
(setq width (or width 79))
+ (setq path (delq nil path))
(unless (> width 0)
(user-error "Argument `width' must be positive"))
(setq separator (or separator "/"))
@@ -11758,7 +11759,7 @@ the default is \"/\"."
(mapconcat
(lambda (s) (replace-regexp-in-string "[ \t]+\\'" "" s))
(loop for head in path
- for n upto (length path)
+ for n from 0
collect (org-add-props
head nil 'face
(nth (% n org-n-level-faces) org-level-faces)))
diff --git a/testing/lisp/test-org.el b/testing/lisp/test-org.el
index 9dcccd0..269c804 100644
--- a/testing/lisp/test-org.el
+++ b/testing/lisp/test-org.el
@@ -1397,6 +1397,9 @@
(should
(string= (org-format-outline-path '())
""))
+ (should
+ (string= (org-format-outline-path '(nil))
+ ""))
;; Empty path and prefix.
(should
(string= (org-format-outline-path '() nil ">>")