Re: [O] org-agenda-do-date-late and emacs freeze

2014-03-28 Thread Igor Sosa Mayor
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 :: joseleopoldo1...@gmail.com ::
:: GnuPG: 0x1C1E2890   :: http://www.gnupg.org/  ::
:: jabberid: rogorido  ::::



Re: [O] org-agenda-do-date-late and emacs freeze

2014-03-25 Thread Matt Lundin
Hi Bastien,

Matt Lundin m...@imapmail.org writes:

 Bastien b...@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-later1   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-later1   0.010506186   0.010506186
org-agenda-date-later   1   0.010447660.01044766
beginning-of-line   93  0.001790849   1.925...e-05
--8---cut here---end---8---

Thanks,
Matt



Re: [O] org-agenda-do-date-late and emacs freeze

2014-03-25 Thread Bastien
Hi Matt,

Matt Lundin m...@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



Re: [O] org-agenda-do-date-late and emacs freeze

2014-03-21 Thread Matt Lundin
Bastien b...@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



Re: [O] org-agenda-do-date-late and emacs freeze

2014-03-20 Thread Bastien
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



Re: [O] org-agenda-do-date-late and emacs freeze

2014-03-17 Thread Igor Sosa Mayor
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 :: joseleopoldo1...@gmail.com ::
:: GnuPG: 0x1C1E2890   :: http://www.gnupg.org/  ::
:: jabberid: rogorido  ::::



Re: [O] org-agenda-do-date-late and emacs freeze

2014-03-16 Thread Bastien
Hi Matt,

Matt Lundin m...@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



Re: [O] org-agenda-do-date-late and emacs freeze

2014-03-03 Thread Igor Sosa Mayor
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.



Re: [O] org-agenda-do-date-late and emacs freeze

2014-03-02 Thread Matt Lundin
Igor Sosa Mayor joseleopoldo1...@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



Re: [O] org-agenda-do-date-late and emacs freeze

2014-03-02 Thread Matt Lundin
Matt Lundin m...@imapmail.org writes:

 Igor Sosa Mayor joseleopoldo1...@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 b...@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.domi...@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 b...@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



Re: [O] org-agenda-do-date-late and emacs freeze

2014-03-01 Thread Bastien
Hi Igor,

Igor Sosa Mayor joseleopoldo1...@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



Re: [O] org-agenda-do-date-late and emacs freeze

2014-02-18 Thread Nick Dokos
Igor Sosa Mayor joseleopoldo1...@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




Re: [O] org-agenda-do-date-late and emacs freeze

2014-02-18 Thread Igor Sosa Mayor
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 :: joseleopoldo1...@gmail.com ::
:: GnuPG: 0x1C1E2890   :: http://www.gnupg.org/  ::
:: jabberid: rogorido  ::::



Re: [O] org-agenda-do-date-late and emacs freeze

2014-02-18 Thread Igor Sosa Mayor
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 :: joseleopoldo1...@gmail.com ::
:: GnuPG: 0x1C1E2890   :: http://www.gnupg.org/  ::
:: jabberid: rogorido  ::::