emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] Clock-in in agenda makes some headings with links disappear


From: Thomas Morgan
Subject: [O] Clock-in in agenda makes some headings with links disappear
Date: Wed, 14 May 2014 03:41:31 -0400

Dear Org mode hackers,

I came across a bug in Org-mode 8.2.6.  I had an overdue
TODO item in the agenda with a link at the end of the heading
text.  I clocked it in with `I' and the heading text
disappeared; only the link remained visible on that line in
the agenda.

This bug was reproducible for a while and I made the attached
patch which fixed it, but I didn't succeed in making a minimal
test case, and now I'm not able to reproduce it at all.

The problem seemed to be that `(beginning-of-line 0)' was
not moving to the beginning of the line, but between closing
brackets in the link.  I thought this might be related to
`inhibit-field-text-motion', but enabling that didn't help,
nor did using `(forward-line -1)'.  What seemed to solve it
was adding `(beginning-of-line)' after `(forward-line -1)',
as in the patch.

I know this is not a very helpful bug report but thought I'd
send it anyway in case someone else has seen the same problem
and understands what's going on.

Best regards,
Thomas

>From 06cde5027e8ca93d82d14c5c0b46deb3e1c80b25 Mon Sep 17 00:00:00 2001
From: Thomas Morgan <address@hidden>
Date: Tue, 13 May 2014 23:52:48 -0400
Subject: [PATCH] Fix bug mading agenda line disappear on clock-in.

In some cases with a link at the end of the line,
`(beginning-of-line 0)' moves to a position within
the link (between the closing bracket of the link
description and the following closing bracket) and
not to the beginning of the line.

Then the properties at that position in the link
are made the properties of the whole line, and the
entire line disappears.

* lisp/org-agenda.el (org-agenda-change-all-lines): Move backward one
  line and to the beginning of that line as an explicit second step.

TINYCHANGE
---
 lisp/org-agenda.el |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index e2a0629..428d31f 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -8895,7 +8895,8 @@ If FORCE-TAGS is non nil, the car of it returns the new 
tags."
          (save-restriction
            (narrow-to-region (point-at-bol) (point-at-eol))
            (org-agenda-finalize)))
-       (beginning-of-line 0)))))
+       (forward-line -1)
+       (beginning-of-line)))))
 
 (defun org-agenda-align-tags (&optional line)
   "Align all tags in agenda items to `org-agenda-tags-column'."
-- 
1.7.10.4


reply via email to

[Prev in Thread] Current Thread [Next in Thread]