Rewrite org-format-outline-path
commit1c740023f7856ad01bcbdfd54f04f0ed448a9aee
authorKyle Meyer <kyle@kyleam.com>
Tue, 27 Oct 2015 02:49:45 +0000 (26 22:49 -0400)
committerKyle Meyer <kyle@kyleam.com>
Wed, 28 Oct 2015 05:26:16 +0000 (28 01:26 -0400)
treeabc91819e292000f5a294b242d3223a2ecae77f5
parent3efb519ff5116e34588d7d03111b0bfe47cf0bc6
Rewrite org-format-outline-path

* lisp/org.el (org-format-outline-path): Avoid out-of-range error when
  the length of PREFIX is greater than the value given for WIDTH.
  Prevent result from extending beyond WIDTH.  Simplify code.
* testing/lisp/test-org.el (test-org/format-outline-path): Add tests.

Reported-by: Simon Thum <simon.thum@gmx.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/102241>
lisp/org.el
testing/lisp/test-org.el