From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: [BUG] Infinite loop in org-agenda-show-new-time Date: Mon, 05 Aug 2013 18:05:07 -0400 Message-ID: <87ob9bkd4c.fsf@gmail.com> References: <87zjswb0vq.fsf@fastmail.fm> <87siyojc2c.fsf@gmail.com> <87fvun6gku.fsf@fastmail.fm> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39217) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V6Su6-0008Jt-Co for emacs-orgmode@gnu.org; Mon, 05 Aug 2013 18:05:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V6Su0-0000hM-Tz for emacs-orgmode@gnu.org; Mon, 05 Aug 2013 18:05:26 -0400 Received: from plane.gmane.org ([80.91.229.3]:34362) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V6Su0-0000h8-OS for emacs-orgmode@gnu.org; Mon, 05 Aug 2013 18:05:20 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1V6Sty-0007Uj-Ck for emacs-orgmode@gnu.org; Tue, 06 Aug 2013 00:05:18 +0200 Received: from pool-108-7-96-134.bstnma.fios.verizon.net ([108.7.96.134]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 06 Aug 2013 00:05:18 +0200 Received: from ndokos by pool-108-7-96-134.bstnma.fios.verizon.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 06 Aug 2013 00:05:18 +0200 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 Matt Lundin writes: > Nick Dokos writes: > >> Matt Lundin writes: >> >> My one feeble attempt to reproduce this failed. Looking at the code > > Here are the steps to reproduce the problem: > Thanks for the recipe: I still can't reproduce it - it just works for me. Org-mode version 8.0.7 (release_8.0.7-367-gd1d918 @ /home/nick/elisp/org-mode/lisp/) GNU Emacs 24.3.50.2 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.10) of 2013-07-14 on pierrot > > Thanks for the pointers. Running edebug with the file above reveals that > org-move-to-column is not working with the invisible sections of the > buffer. > > With the sample file above, I filter the agenda to display only items > tagged :home:. > > Day-agenda (W32): > Monday 5 August 2013 W32 > test: Scheduled: TODO A :home: > test: Scheduled: TODO D :home: > test: Scheduled: TODO G :home: > > When stepping through org-agenda-do-date-later, edebug reveals that the > point goes to the end of the buffer, as expected and then works its way > backward. When it arrives at the beginning of the line with task "G", it > finds and match and executes the following functions: > > (org-move-to-column (- (window-width) (length stamp)) t) > (org-agenda-fix-tags-filter-overlays-at (point)) > > The problem is that org-move-to-column shifts the point several lines > forward. In fact, if I make all contents of the agenda buffer visible > after edebug executes org-move-to-column, I find that the point is now > all the way at the end of line "I," which, of course, will trigger an > endless loop. In other words, org-move-to-column moves the point to the > end of the entire invisible section. > org-move-to-column is just a compatibility function that calls move-to-column whose doc says: Move point to column COLUMN in the current line. So I'm not sure why it ends up on a different line. > This bug was introduced with the following commit: > > commit fafb5f3429c41cba1eddb9fc78d9f9e0980acbe2 > Author: Bastien Guerry > Date: Mon Feb 11 14:56:38 2013 +0100 > > org-agenda.el: Fix bug when displaying a temporary overlay > > * org-agenda.el (org-agenda-schedule, org-agenda-deadline): > Cosmetic changes. > (org-agenda-show-new-time): Fix bug when displaying a > temporary overlay with the scheduled/deadline information. > > Thanks to Thomas Morgan for reporting this bug and testing the patch. > > This commit removed the local binding of buffer-invisibility-spec to > nil in org-agenda-show-new-time. > > Here is the bug this change was meant to fix: > > http://permalink.gmane.org/gmane.emacs.orgmode/52667 > > Might we revert this change? The original bug was cosmetic. This bug, > however, interferes in an essential way with the functioning of agenda > buffers. > So you revert that commit and the infloop goes away? I looked at the functions briefly and I don't understand how this commit could affect what move-to-column does. Can you provide emacs and org versions? Maybe there is something weird in what you use. -- Nick