From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Morgan Subject: Clock-in in agenda makes some headings with links disappear Date: Wed, 14 May 2014 03:41:31 -0400 Message-ID: <87egzw24es.fsf@algol.ziiuu.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36440) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WkTop-0001aY-SE for emacs-orgmode@gnu.org; Wed, 14 May 2014 03:41:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WkToj-000761-PI for emacs-orgmode@gnu.org; Wed, 14 May 2014 03:41:39 -0400 Received: from mail-qc0-f175.google.com ([209.85.216.175]:43769) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WkToj-00075v-Lo for emacs-orgmode@gnu.org; Wed, 14 May 2014 03:41:33 -0400 Received: by mail-qc0-f175.google.com with SMTP id w7so2125887qcr.6 for ; Wed, 14 May 2014 00:41:33 -0700 (PDT) Received: from algol.ziiuu.com (cpe-68-173-37-126.nyc.res.rr.com. [68.173.37.126]) by mx.google.com with ESMTPSA id g74sm672318qge.26.2014.05.14.00.41.32 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 May 2014 00:41:32 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain 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 --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Fix-bug-mading-agenda-line-disappear-on-clock-in.patch >From 06cde5027e8ca93d82d14c5c0b46deb3e1c80b25 Mon Sep 17 00:00:00 2001 From: Thomas Morgan 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 --=-=-=--