org-download

a fork of abo-abo's org-download
git clone https://git.trogloxene.org/org-download.git
Log | Files | Refs | README

commit 46417e2bd30c9bcd1e8a1f4c554ad44543e869e6
parent b96fd7ba02cbdae95cc37970ebcfae8afa8b25d2
Author: Oleh Krehel <ohwoeowho@gmail.com>
Date:   Fri, 10 Apr 2020 16:44:41 +0200

org-download.el (org-download-get-heading): Work for empty headlines

Fixes #120

Diffstat:
Morg-download.el | 9++++++---
1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/org-download.el b/org-download.el @@ -221,9 +221,12 @@ For example: (progn (unless (= cur-lvl 1) (org-up-heading-all (- (1- (org-current-level)) lvl))) - (replace-regexp-in-string - " " "_" - (nth 4 (org-heading-components)))) + (let ((heading (nth 4 (org-heading-components)))) + (if heading + (replace-regexp-in-string + " " "_" + heading) + ""))) "")))) (defun org-download--dir-1 ()