1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2025-01-05 11:45:52 +00:00

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.
This commit is contained in:
Carsten Dominik 2010-08-21 07:09:20 +02:00
parent e50657d7cb
commit 96bacc020b

View File

@ -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)