diff options
author | Rasmus <rasmus@gmx.us> | 2015-05-21 00:44:06 +0200 |
---|---|---|
committer | Rasmus <rasmus@gmx.us> | 2015-05-21 00:45:24 +0200 |
commit | 8ddb844d277e5b5e59745e4151443be2019f26f4 (patch) | |
tree | daedd365f8ac2899064d0a74493b8266490df459 | |
parent | 248266e560e60559c72e1817747880ea36da1040 (diff) | |
download | org-mode-8ddb844d277e5b5e59745e4151443be2019f26f4.tar.gz |
org.el: Fix bug in af6fdf30718158f
* org.el (org-return): Fix bug when headline title is empty.
-rwxr-xr-x | lisp/org.el | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/lisp/org.el b/lisp/org.el index 5c54125..f10412f 100755 --- a/lisp/org.el +++ b/lisp/org.el @@ -21227,15 +21227,16 @@ object (e.g., within a comment). In these case, you need to use (save-excursion (goto-char (match-beginning 5)) (current-column)))) ;; Test if before or after headline title. - (string (when (not (or (< (point) - (or (match-end 3) - (match-end 2) - (save-excursion - (goto-char (match-beginning 4)) - (skip-chars-backward " \t") - (point)))) - (and (match-beginning 5) - (>= (point) (match-beginning 5))))) + (string (when (and (match-end 4) + (not (or (< (point) + (or (match-end 3) + (match-end 2) + (save-excursion + (goto-char (match-beginning 4)) + (skip-chars-backward " \t") + (point)))) + (and (match-beginning 5) + (>= (point) (match-beginning 5)))))) ;; Point is on headline keywords, tags or cookies. Do not break ;; them: add a newline after the headline instead. (org-string-nw-p |