all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* org-agenda-do-date-late and emacs freeze
@ 2014-02-18 12:38 Igor Sosa Mayor
  2014-02-18 13:09 ` Nick Dokos
  2014-03-03  4:21 ` Matt Lundin
  0 siblings, 2 replies; 15+ messages in thread
From: Igor Sosa Mayor @ 2014-02-18 12:38 UTC (permalink / raw)
  To: emacs-orgmode

Hi,

is there a way to debug what is happening after pressing some key
combination. 

I have the problem that in the agenda view when I press M-+ to run the
function org-agenda-do-date-late, sometimes (and this is the problme: it
happens randomly, not always), emacs gets freezed and I have to press
C-g to cancel. Interestingly when I press C-g I see the date on the
right side updated and everything continues working OK...

Many thanks in advance!

-- 
:: Igor Sosa Mayor     :: joseleopoldo1792@gmail.com ::
:: GnuPG: 0x1C1E2890   :: http://www.gnupg.org/      ::
:: jabberid: rogorido  ::                            ::

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: org-agenda-do-date-late and emacs freeze
  2014-02-18 12:38 org-agenda-do-date-late and emacs freeze Igor Sosa Mayor
@ 2014-02-18 13:09 ` Nick Dokos
  2014-02-18 14:00   ` Igor Sosa Mayor
  2014-02-18 14:29   ` Igor Sosa Mayor
  2014-03-03  4:21 ` Matt Lundin
  1 sibling, 2 replies; 15+ messages in thread
From: Nick Dokos @ 2014-02-18 13:09 UTC (permalink / raw)
  To: emacs-orgmode

Igor Sosa Mayor <joseleopoldo1792@gmail.com> writes:

> Hi,
>
> is there a way to debug what is happening after pressing some key
> combination. 
>
> I have the problem that in the agenda view when I press M-+ to run the
> function org-agenda-do-date-late, sometimes (and this is the problme: it
> happens randomly, not always), emacs gets freezed and I have to press
> C-g to cancel. Interestingly when I press C-g I see the date on the
> right side updated and everything continues working OK...
>
> Many thanks in advance!

(setq debug-on-quit t)

You will get backtraces every time that you press C-g even for unrelated
reasons (you can just press q in the backtrace buffer to continue), but at least
you'll get one also when the problem happens.

I assume that "emacs freezes" means that it is using lots of CPU (which
you can test independently by using "top" on linux, or something similar
on other OSes).

-- 
Nick

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: org-agenda-do-date-late and emacs freeze
  2014-02-18 13:09 ` Nick Dokos
@ 2014-02-18 14:00   ` Igor Sosa Mayor
  2014-02-18 14:29   ` Igor Sosa Mayor
  1 sibling, 0 replies; 15+ messages in thread
From: Igor Sosa Mayor @ 2014-02-18 14:00 UTC (permalink / raw)
  To: emacs-orgmode

Am Tue, Feb 18, 2014 at 08:09:24AM -0500, Nick Dokos schrieb:
> (setq debug-on-quit t)
> 
> You will get backtraces every time that you press C-g even for unrelated
> reasons (you can just press q in the backtrace buffer to continue), but at least
> you'll get one also when the problem happens.

thanks. I will try it. 

> I assume that "emacs freezes" means that it is using lots of CPU (which
> you can test independently by using "top" on linux, or something similar

yes, high CPU consumption, no response of emacs, etc.

-- 
:: Igor Sosa Mayor     :: joseleopoldo1792@gmail.com ::
:: GnuPG: 0x1C1E2890   :: http://www.gnupg.org/      ::
:: jabberid: rogorido  ::                            ::

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: org-agenda-do-date-late and emacs freeze
  2014-02-18 13:09 ` Nick Dokos
  2014-02-18 14:00   ` Igor Sosa Mayor
@ 2014-02-18 14:29   ` Igor Sosa Mayor
  2014-03-01  8:39     ` Bastien
  1 sibling, 1 reply; 15+ messages in thread
From: Igor Sosa Mayor @ 2014-02-18 14:29 UTC (permalink / raw)
  To: emacs-orgmode

Am Tue, Feb 18, 2014 at 08:09:24AM -0500, Nick Dokos schrieb:
> (setq debug-on-quit t)
> 
> You will get backtraces every time that you press C-g even for unrelated
> reasons (you can just press q in the backtrace buffer to continue), but at least
> you'll get one also when the problem happens.

If I try to reproduce the error, I get this message:

Debugger entered--Lisp error: (quit)
  org-agenda-fix-tags-filter-overlays-at(5696)
  org-agenda-show-new-time(#<marker at 5932 in privat.org> "<2014-02-19 mié>")
  org-agenda-date-later(1)
  org-agenda-do-date-later(nil)
  call-interactively(org-agenda-do-date-later nil nil)


-- 
:: Igor Sosa Mayor     :: joseleopoldo1792@gmail.com ::
:: GnuPG: 0x1C1E2890   :: http://www.gnupg.org/      ::
:: jabberid: rogorido  ::                            ::

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: org-agenda-do-date-late and emacs freeze
  2014-02-18 14:29   ` Igor Sosa Mayor
@ 2014-03-01  8:39     ` Bastien
  0 siblings, 0 replies; 15+ messages in thread
From: Bastien @ 2014-03-01  8:39 UTC (permalink / raw)
  To: Igor Sosa Mayor; +Cc: emacs-orgmode

Hi Igor,

Igor Sosa Mayor <joseleopoldo1792@gmail.com> writes:

> If I try to reproduce the error, I get this message:
>
> Debugger entered--Lisp error: (quit)
>   org-agenda-fix-tags-filter-overlays-at(5696)
>   org-agenda-show-new-time(#<marker at 5932 in privat.org> "<2014-02-19 mié>")
>   org-agenda-date-later(1)
>   org-agenda-do-date-later(nil)
>   call-interactively(org-agenda-do-date-later nil nil)

Thanks -- can't reproduce this... but make sure to tell us what
version of Org and Emacs you are using

M-x org-version RET
M-x emacs-version RET

-- 
 Bastien

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: org-agenda-do-date-late and emacs freeze
  2014-02-18 12:38 org-agenda-do-date-late and emacs freeze Igor Sosa Mayor
  2014-02-18 13:09 ` Nick Dokos
@ 2014-03-03  4:21 ` Matt Lundin
  2014-03-03  4:25   ` Matt Lundin
  2014-03-03 14:51   ` Igor Sosa Mayor
  1 sibling, 2 replies; 15+ messages in thread
From: Matt Lundin @ 2014-03-03  4:21 UTC (permalink / raw)
  To: emacs-orgmode

Igor Sosa Mayor <joseleopoldo1792@gmail.com> writes:

> Hi,
>
> is there a way to debug what is happening after pressing some key
> combination. 
>
> I have the problem that in the agenda view when I press M-+ to run the
> function org-agenda-do-date-late, sometimes (and this is the problme: it
> happens randomly, not always), emacs gets freezed and I have to press
> C-g to cancel. Interestingly when I press C-g I see the date on the
> right side updated and everything continues working OK...

Does it happen when you have filtered the agenda? If so, then I can
confirm this bug... 

I am using...

 - emacs 24.3.1
 - org 8.2.5h

...on...

Linux box 3.13.5-1-ARCH #1 SMP PREEMPT Sun Feb 23 00:10:07 CET 2014 i686 GNU/Linux

Emacs freezes as you describe when whenever I attempt to reschedule an
item in a *filtered* agenda that has invisible lines between it and the
next visible agenda item. This is the crucial condition: there must be
invisible text in the agenda buffer immediately following the agenda
item being rescheduled. Take the following agenda:

--8<---------------cut here---------------start------------->8---
Day-agenda (W09):
Sunday      2 March 2014
  inbox:      Scheduled:  Call Jack                                      :phone:
  inbox:      Scheduled:  Call Jill                                      :phone:
  inbox:      Scheduled:  Run up a hill                                :errands:
  inbox:      Scheduled:  Call the hospital                              :phone:
--8<---------------cut here---------------end--------------->8---

So long as the agenda is unfiltered, then org-agenda-do-date-later works
fine.

If I filter the agenda by the tag "phone"... 

--8<---------------cut here---------------start------------->8---
Day-agenda (W09):
Sunday      2 March 2014
  inbox:      Scheduled:  Call Jack                                      :phone:
  inbox:      Scheduled:  Call Jill                                      :phone:
  inbox:      Scheduled:  Call the hospital                              :phone:
--8<---------------cut here---------------end--------------->8---

...then org-agenda-do-date-later causes Emacs to go into an infinite
loop on "Call Jill" but *not* on the other phone items. This is because
of the invisible "Run up a hill" that comes after "Call Jill."

I have tested this several times with emacs -Q and can replicate it each
time.

I previously documented the issue in this thread:

 - http://comments.gmane.org/gmane.emacs.orgmode/75288

Matt

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: org-agenda-do-date-late and emacs freeze
  2014-03-03  4:21 ` Matt Lundin
@ 2014-03-03  4:25   ` Matt Lundin
  2014-03-17  2:07     ` Bastien
  2014-03-20 16:08     ` Bastien
  2014-03-03 14:51   ` Igor Sosa Mayor
  1 sibling, 2 replies; 15+ messages in thread
From: Matt Lundin @ 2014-03-03  4:25 UTC (permalink / raw)
  To: emacs-orgmode

Matt Lundin <mdl@imapmail.org> writes:

> Igor Sosa Mayor <joseleopoldo1792@gmail.com> writes:
>
>> Hi,
>>
>> is there a way to debug what is happening after pressing some key
>> combination. 
>>
>> I have the problem that in the agenda view when I press M-+ to run the
>> function org-agenda-do-date-late, sometimes (and this is the problme: it
>> happens randomly, not always), emacs gets freezed and I have to press
>> C-g to cancel. Interestingly when I press C-g I see the date on the
>> right side updated and everything continues working OK...
>
> Does it happen when you have filtered the agenda? If so, then I can
> confirm this bug... 
>
...
> I previously documented the issue in this thread:
>
>  - http://comments.gmane.org/gmane.emacs.orgmode/75288

AFAICT, there is something of a ping-pong game going on between multiple
bugs whose solutions conflict with each other. 

1. The bug was first introduced with the following commit:

--8<---------------cut here---------------start------------->8---
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.
--8<---------------cut here---------------end--------------->8---

...which was a response to the following bug...

http://article.gmane.org/gmane.emacs.orgmode/65538/match=agenda

2. The bug was solved by the following patch.

--8<---------------cut here---------------start------------->8---
commit 7f9d0688d47140bcac7bea627474802adfce31ee
Author: Carsten Dominik <carsten.dominik@gmail.com>
Date:   Sat Aug 31 15:44:34 2013 +0200

    Fix cursor movement to a specific column
    
    * lisp/org-compat.el (org-move-to-column): Turn off invisibility stuff
    for moving the cursor to a column.
    
    Pathc by Nick Docks
--8<---------------cut here---------------end--------------->8---

3. However, the problem resurfaced with the following patch, which
effectively reversed the previous fix.

--8<---------------cut here---------------start------------->8---
commit 2911965bfef9072a3031d48dfe2ea50bcb3ff9df
Author: Bastien Guerry <bzg@altern.org>
Date:   Wed Nov 6 09:59:46 2013 +0100

    org-agenda: Fix bug when showing the new time
    
    * org-agenda.el (org-agenda-show-new-time): Ignore invisible
    text when inserting the new time as a text property.
    
    * org-compat.el (org-move-to-column): New argument
    `ignore-invisible' to turn on `buffer-invisibility-spec'.
    
    Thanks to Marcin Borkowski and Karl Voit for reporting this.
--8<---------------cut here---------------end--------------->8---

The timing of the patch leads me to believe that it was a solution to
the problems outlined in this thread. 

- http://comments.gmane.org/gmane.emacs.orgmode/69934

So, in summary, it seems we have different bugs whose solutions have
thus far conflicted with each other.

Matt

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: org-agenda-do-date-late and emacs freeze
  2014-03-03  4:21 ` Matt Lundin
  2014-03-03  4:25   ` Matt Lundin
@ 2014-03-03 14:51   ` Igor Sosa Mayor
  1 sibling, 0 replies; 15+ messages in thread
From: Igor Sosa Mayor @ 2014-03-03 14:51 UTC (permalink / raw)
  To: emacs-orgmode

Am Sun, Mar 02, 2014 at 10:21:18PM -0600, Matt Lundin schrieb:
> Does it happen when you have filtered the agenda? If so, then I can
> confirm this bug... 
> 
> I am using...
> 
>  - emacs 24.3.1
>  - org 8.2.5h

yes. And I have the same versions as you.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: org-agenda-do-date-late and emacs freeze
  2014-03-03  4:25   ` Matt Lundin
@ 2014-03-17  2:07     ` Bastien
  2014-03-17  9:03       ` Igor Sosa Mayor
  2014-03-20 16:08     ` Bastien
  1 sibling, 1 reply; 15+ messages in thread
From: Bastien @ 2014-03-17  2:07 UTC (permalink / raw)
  To: Matt Lundin; +Cc: emacs-orgmode

Hi Matt,

Matt Lundin <mdl@imapmail.org> writes:

> AFAICT, there is something of a ping-pong game going on between multiple
> bugs whose solutions conflict with each other.

Yes -- and I recently removed the fix I sent to Michael about S-RET
not aligning properly in table because of this ping pong.  I'll
revisit this thoroughly and hopefully come up with a stable solution,
but the problems here are closely tangled together.

Thanks for pointing at this,

-- 
 Bastien

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: org-agenda-do-date-late and emacs freeze
  2014-03-17  2:07     ` Bastien
@ 2014-03-17  9:03       ` Igor Sosa Mayor
  0 siblings, 0 replies; 15+ messages in thread
From: Igor Sosa Mayor @ 2014-03-17  9:03 UTC (permalink / raw)
  To: emacs-orgmode

Am Mon, Mar 17, 2014 at 03:07:08AM +0100, Bastien schrieb:
> Yes -- and I recently removed the fix I sent to Michael about S-RET
> not aligning properly in table because of this ping pong.  I'll
> revisit this thoroughly and hopefully come up with a stable solution,
> but the problems here are closely tangled together.

thnaks!

-- 
:: Igor Sosa Mayor     :: joseleopoldo1792@gmail.com ::
:: GnuPG: 0x1C1E2890   :: http://www.gnupg.org/      ::
:: jabberid: rogorido  ::                            ::

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: org-agenda-do-date-late and emacs freeze
  2014-03-03  4:25   ` Matt Lundin
  2014-03-17  2:07     ` Bastien
@ 2014-03-20 16:08     ` Bastien
  2014-03-21 18:57       ` Matt Lundin
  2014-03-28 13:40       ` Igor Sosa Mayor
  1 sibling, 2 replies; 15+ messages in thread
From: Bastien @ 2014-03-20 16:08 UTC (permalink / raw)
  To: Matt Lundin; +Cc: emacs-orgmode

Hi Matt and all,

thanks a lot for the detailed investigation -- I revisited the
related problems and applied a fix.  Please let me know if you
encoutner some glitches.

All best,

-- 
 Bastien

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: org-agenda-do-date-late and emacs freeze
  2014-03-20 16:08     ` Bastien
@ 2014-03-21 18:57       ` Matt Lundin
  2014-03-25 18:37         ` Matt Lundin
  2014-03-28 13:40       ` Igor Sosa Mayor
  1 sibling, 1 reply; 15+ messages in thread
From: Matt Lundin @ 2014-03-21 18:57 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode

Bastien <bzg@gnu.org> writes:

> Hi Matt and all,
>
> thanks a lot for the detailed investigation -- I revisited the
> related problems and applied a fix.  Please let me know if you
> encoutner some glitches.

Seems to work fine now. Thanks!

Matt

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: org-agenda-do-date-late and emacs freeze
  2014-03-21 18:57       ` Matt Lundin
@ 2014-03-25 18:37         ` Matt Lundin
  2014-03-25 20:59           ` Bastien
  0 siblings, 1 reply; 15+ messages in thread
From: Matt Lundin @ 2014-03-25 18:37 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode

Hi Bastien,

Matt Lundin <mdl@imapmail.org> writes:

> Bastien <bzg@gnu.org> writes:
>
>> Hi Matt and all,
>>
>> thanks a lot for the detailed investigation -- I revisited the
>> related problems and applied a fix.  Please let me know if you
>> encoutner some glitches.
>
> Seems to work fine now. Thanks!

The only minor issue with the fix is that move-beginning-of-line (lines
9195-6 of org-agenda.el) is slower than beginning-of-line. It's not so
bad when you push an item one day forward, but it creates significant
lag when calling org-agenda-do-date-late several times in a row.

--8<---------------cut here---------------start------------->8---
org-agenda-do-date-later        1           0.289220361   0.289220361
org-agenda-date-later           1           0.289163161   0.289163161
move-beginning-of-line          84          0.2790279490  0.0033217612
--8<---------------cut here---------------end--------------->8---

vs. 

--8<---------------cut here---------------start------------->8---
org-agenda-do-date-later        1           0.010506186   0.010506186
org-agenda-date-later           1           0.01044766    0.01044766
beginning-of-line               93          0.001790849   1.925...e-05
--8<---------------cut here---------------end--------------->8---

Thanks,
Matt

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: org-agenda-do-date-late and emacs freeze
  2014-03-25 18:37         ` Matt Lundin
@ 2014-03-25 20:59           ` Bastien
  0 siblings, 0 replies; 15+ messages in thread
From: Bastien @ 2014-03-25 20:59 UTC (permalink / raw)
  To: Matt Lundin; +Cc: emacs-orgmode

Hi Matt,

Matt Lundin <mdl@imapmail.org> writes:

> The only minor issue with the fix is that move-beginning-of-line (lines
> 9195-6 of org-agenda.el) is slower than beginning-of-line. It's not so
> bad when you push an item one day forward, but it creates significant
> lag when calling org-agenda-do-date-late several times in a row.

Indeed, fixed, thanks,

-- 
 Bastien

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: org-agenda-do-date-late and emacs freeze
  2014-03-20 16:08     ` Bastien
  2014-03-21 18:57       ` Matt Lundin
@ 2014-03-28 13:40       ` Igor Sosa Mayor
  1 sibling, 0 replies; 15+ messages in thread
From: Igor Sosa Mayor @ 2014-03-28 13:40 UTC (permalink / raw)
  To: emacs-orgmode

Am Thu, Mar 20, 2014 at 05:08:24PM +0100, Bastien schrieb:
> Hi Matt and all,
> 
> thanks a lot for the detailed investigation -- I revisited the
> related problems and applied a fix.  Please let me know if you
> encoutner some glitches.

thanks  a lot. It seems to work perfectly!

-- 
:: Igor Sosa Mayor     :: joseleopoldo1792@gmail.com ::
:: GnuPG: 0x1C1E2890   :: http://www.gnupg.org/      ::
:: jabberid: rogorido  ::                            ::

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2014-03-28 13:40 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-18 12:38 org-agenda-do-date-late and emacs freeze Igor Sosa Mayor
2014-02-18 13:09 ` Nick Dokos
2014-02-18 14:00   ` Igor Sosa Mayor
2014-02-18 14:29   ` Igor Sosa Mayor
2014-03-01  8:39     ` Bastien
2014-03-03  4:21 ` Matt Lundin
2014-03-03  4:25   ` Matt Lundin
2014-03-17  2:07     ` Bastien
2014-03-17  9:03       ` Igor Sosa Mayor
2014-03-20 16:08     ` Bastien
2014-03-21 18:57       ` Matt Lundin
2014-03-25 18:37         ` Matt Lundin
2014-03-25 20:59           ` Bastien
2014-03-28 13:40       ` Igor Sosa Mayor
2014-03-03 14:51   ` Igor Sosa Mayor

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.