emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nick Dokos <ndokos@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: [BUG] Infinite loop in org-agenda-show-new-time
Date: Mon, 05 Aug 2013 18:05:07 -0400	[thread overview]
Message-ID: <87ob9bkd4c.fsf@gmail.com> (raw)
In-Reply-To: 87fvun6gku.fsf@fastmail.fm

Matt Lundin <mdl@imapmail.org> writes:

> Nick Dokos <ndokos@gmail.com> writes:
>
>> Matt Lundin <mdl@imapmail.org> 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 <bzg@altern.org>
> 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

  reply	other threads:[~2013-08-05 22:05 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-05 15:42 [BUG] Infinite loop in org-agenda-show-new-time Matt Lundin
2013-08-05 17:13 ` Nick Dokos
2013-08-05 20:14   ` Matt Lundin
2013-08-05 22:05     ` Nick Dokos [this message]
2013-08-06 17:36       ` Matt Lundin
2013-08-06 21:35         ` Nick Dokos
2013-08-06 22:45           ` Nick Dokos
2013-08-14 15:19             ` Matt Lundin
2013-08-14 15:38               ` Nick Dokos
2013-08-10 15:06         ` Nick Dokos
2013-08-14 15:15           ` Matt Lundin
2013-08-14 15:45             ` Nick Dokos
2013-08-23  9:58               ` Carsten Dominik
2013-08-23 12:07                 ` Nick Dokos
2019-12-26 19:37                   ` Andrew Hyatt
2020-02-01  9:32                     ` Bastien
2020-02-02 15:19                       ` Andrew Hyatt
2020-02-03 19:04                         ` Bastien
2020-02-04 19:25                           ` Andrew Hyatt
2020-02-04 23:38                             ` Bastien
2020-02-05 16:34                               ` Andrew Hyatt
2020-02-05 19:50                               ` Matthew Lundin
2020-02-11  7:56                                 ` Bastien
2020-02-14  3:27                                   ` Andrew Hyatt
2020-02-14 10:02                                     ` Bastien
2020-02-17 19:20                                       ` Andrew Hyatt
2020-02-17 22:53                                         ` Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ob9bkd4c.fsf@gmail.com \
    --to=ndokos@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).