From: Tobias Getzner <tobias.getzner@gmx.de>
To: emacs-orgmode@gnu.org
Subject: [PATCH] org.el: fix org--get-outline-path-1
Date: Mon, 29 Feb 2016 15:35:28 +0100 [thread overview]
Message-ID: <1456756528.23339.2.camel@gmx.de> (raw)
Headline titles may be empty, in which case the respective match group
will be nil. This would throw an error when trying to regexp-replace
checkbox cookies.
TODO: Depending on preference, a place-holder string might be a better
choice (for user-display) rather than leaving the outline-path element empty.
---
lisp/org.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lisp/org.el b/lisp/org.el
index 3e2f1c1..f45b9fc 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -11611,7 +11611,7 @@ (defun org--get-outline-path-1 (&optional use-cache)
;; Remove statistical/checkboxes cookies.
(replace-regexp-in-string
"\\[[0-9]+%\\]\\|\\[[0-9]+/[0-9]+\\]" ""
- (org-match-string-no-properties 4))))))
+ (or (org-match-string-no-properties 4) ""))))))
(if (org-up-heading-safe)
(let ((path (cons heading (org--get-outline-path-1 use-cache))))
(when use-cache
--
2.7.2
next reply other threads:[~2016-02-29 14:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-29 14:35 Tobias Getzner [this message]
2016-02-29 15:32 ` [PATCH] org.el: fix org--get-outline-path-1 Nicolas Goaziou
2016-02-29 19:04 ` Tobias Getzner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1456756528.23339.2.camel@gmx.de \
--to=tobias.getzner@gmx.de \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).