diff options
author | Carsten Dominik <carsten.dominik@gmail.com> | 2010-08-21 07:09:20 +0200 |
---|---|---|
committer | Carsten Dominik <carsten.dominik@gmail.com> | 2010-08-21 07:09:20 +0200 |
commit | 96bacc020bef95861543b34985c2cc1190fb918c (patch) | |
tree | 9ed031c9c190a44b11b7a42b9f661b09fbaea96a | |
parent | e50657d7cb33b3778a74b6864c1a4ebe8fc55d4d (diff) | |
download | org-mode-96bacc020bef95861543b34985c2cc1190fb918c.tar.gz |
Fix adding context lines in agenda
* lisp/org-agenda.el (org-agenda-add-entry-text): Make sure we move
forward even if there is no text to be added.
Adding entry text with org-agenda-add-entry-text-maxlines greater than
0 could result in an infinite loop.
-rw-r--r-- | lisp/org-agenda.el | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 117b0bb..4bf38c6 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -2627,7 +2627,9 @@ Drawers will be excluded, also the line with scheduling/deadline info." (setq txt (org-agenda-get-some-entry-text m org-agenda-add-entry-text-maxlines " > ")) (end-of-line 1) - (if (string-match "\\S-" txt) (insert "\n" txt))))))) + (if (string-match "\\S-" txt) + (insert "\n" txt) + (or (eobp (forward-char 1))))))))) (defun org-agenda-get-some-entry-text (marker n-lines &optional indent &rest keep) |