emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [dev] org-indent-mode patch
@ 2011-03-13 16:21 Nicolas
  2011-03-14  7:51 ` Carsten Dominik
  0 siblings, 1 reply; 11+ messages in thread
From: Nicolas @ 2011-03-13 16:21 UTC (permalink / raw)
  To: Org Mode List

Hello,

I'd like to submit the following org-indent-mode patch for testing.

     git://github.com/ngz/org-mode-lists.git indent-patch-no-timer

It implements two things:

1. It indents correctly text when using visual-line-mode;
2. It removes the idle timer previous implementation was using, which
   means it won't refresh indentation more often than necessary.

Unfortunately, there is a price to pay:

1. Initialization will be much longer for large Org files, but I've
   added a message to the user saying so.
2. It is a bit slower, as the algorithm has more things to check.


Last point is obviously my main concern. Although not noticeable on my
not-so-recent laptop, I don't know how it behaves on old machines.

That's why a testing is necessary to determine (bugs and) if it is
usable. Any help welcome.

Regards,


-- 
Nicolas

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

* Re: [dev] org-indent-mode patch
  2011-03-13 16:21 [dev] org-indent-mode patch Nicolas
@ 2011-03-14  7:51 ` Carsten Dominik
  2011-03-19  6:33   ` Linus Arver
  2011-07-21 15:14   ` Nicolas Goaziou
  0 siblings, 2 replies; 11+ messages in thread
From: Carsten Dominik @ 2011-03-14  7:51 UTC (permalink / raw)
  To: Nicolas; +Cc: Org Mode List

Hi Nicolas,

On 13.3.2011, at 17:21, Nicolas wrote:

> Hello,
> 
> I'd like to submit the following org-indent-mode patch for testing.
> 
>     git://github.com/ngz/org-mode-lists.git indent-patch-no-timer
> 
> It implements two things:
> 
> 1. It indents correctly text when using visual-line-mode;
> 2. It removes the idle timer previous implementation was using, which
>   means it won't refresh indentation more often than necessary.
> 
> Unfortunately, there is a price to pay:
> 
> 1. Initialization will be much longer for large Org files, but I've
>   added a message to the user saying so.
> 2. It is a bit slower, as the algorithm has more things to check.
> 
> 
> Last point is obviously my main concern. Although not noticeable on my
> not-so-recent laptop, I don't know how it behaves on old machines.
> 
> That's why a testing is necessary to determine (bugs and) if it is
> usable. Any help welcome.
> initial testing seems to show that this works well, very nice.

The delay at the beginning is long, and it might be annoying
when org pulls in a buffer just to look something up,
without org-inhibit-startup scoped into the file loading.

Maybe one could arrange for the initialization to happen just
before the buffer is first *displayed* (I do not know if that
is possible).

Just one nitpicking:  The idle timer may force updating when
not necessary - but using after-change-functions will update after
each character inserted.  So in fact your code might be updating
more often at least while typing - maybe not while looking at
the buffer and jumping around.  I am not a fast typist, but maybe
fast typists will notice significant delays, in particular
while writing inside a very long section?

Regards

- Carsten

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

* Re: [dev] org-indent-mode patch
  2011-03-14  7:51 ` Carsten Dominik
@ 2011-03-19  6:33   ` Linus Arver
  2011-07-21 15:14   ` Nicolas Goaziou
  1 sibling, 0 replies; 11+ messages in thread
From: Linus Arver @ 2011-03-19  6:33 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: Org Mode List, Nicolas

Hello,

On Mon, Mar 14, 2011 at 08:51:27AM +0100, Carsten Dominik wrote:
> Hi Nicolas,
> 
> On 13.3.2011, at 17:21, Nicolas wrote:
> 
> > Hello,
> > 
> > I'd like to submit the following org-indent-mode patch for testing.
> > 
> >     git://github.com/ngz/org-mode-lists.git indent-patch-no-timer
> > 
> > It implements two things:
> > 
> > 1. It indents correctly text when using visual-line-mode;
> > 2. It removes the idle timer previous implementation was using, which
> >   means it won't refresh indentation more often than necessary.
> > 
> > Unfortunately, there is a price to pay:
> > 
> > 1. Initialization will be much longer for large Org files, but I've
> >   added a message to the user saying so.
> > 2. It is a bit slower, as the algorithm has more things to check.
> > 
> > 
> > Last point is obviously my main concern. Although not noticeable on my
> > not-so-recent laptop, I don't know how it behaves on old machines.
> > 
> > That's why a testing is necessary to determine (bugs and) if it is
> > usable. Any help welcome.
> > initial testing seems to show that this works well, very nice.
> 
> The delay at the beginning is long, and it might be annoying
> when org pulls in a buffer just to look something up,
> without org-inhibit-startup scoped into the file loading.
> 
> Maybe one could arrange for the initialization to happen just
> before the buffer is first *displayed* (I do not know if that
> is possible).

From my tests, the delay at the beginning is only long for a file with
unreasonably long lists. I tested a sample file with 1000 lists each
with 1140 characters and it took me roughly 12 seconds on an Intel Q6600
2.4Ghz. On the other hand, 1000 lists with 304 characters took me a
little over 3 seconds. Lastly, 1000 lists with only 102 characters each
took me just over a second. So, I think the startup delay is very
reasonable, since only very long list lines slow down the startup time,
and such list items are almost always rarer than shorter list items.

> Just one nitpicking:  The idle timer may force updating when
> not necessary - but using after-change-functions will update after
> each character inserted.  So in fact your code might be updating
> more often at least while typing - maybe not while looking at
> the buffer and jumping around.  I am not a fast typist, but maybe
> fast typists will notice significant delays, in particular
> while writing inside a very long section?

In my 1000 list (1140-characters per list) file, I smashed my keys as
fast as I could inside one of those lists, and there was no slowdown at
all. The only time there was a slowdown was when I held down a key to
let it repeat (although I have an unusually fast key repeat rate on my
keyboard --- I have "xset r rate 250 80" in my ~/.xinitrc). According to
the xset man page this means 80 characters per second.

-Linus

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

* Re: [dev] org-indent-mode patch
  2011-03-14  7:51 ` Carsten Dominik
  2011-03-19  6:33   ` Linus Arver
@ 2011-07-21 15:14   ` Nicolas Goaziou
  2011-08-18  8:38     ` Carsten Dominik
  1 sibling, 1 reply; 11+ messages in thread
From: Nicolas Goaziou @ 2011-07-21 15:14 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: Org Mode List

Hello,

Carsten Dominik <carsten.dominik@gmail.com> writes:

> On 13.3.2011, at 17:21, Nicolas wrote:
>
>> I'd like to submit the following org-indent-mode patch for testing.
>> 
>> 
>> It implements two things:
>> 
>> 1. It indents correctly text when using visual-line-mode;
>> 2. It removes the idle timer previous implementation was using, which
>>   means it won't refresh indentation more often than necessary.
>> 
>> Unfortunately, there is a price to pay:
>> 
>> 1. Initialization will be much longer for large Org files, but I've
>>   added a message to the user saying so.
>> 2. It is a bit slower, as the algorithm has more things to check.
>> 
>> 
>> Last point is obviously my main concern. Although not noticeable on my
>> not-so-recent laptop, I don't know how it behaves on old machines.
>> 

> Initial testing seems to show that this works well, very nice.
>
> The delay at the beginning is long, and it might be annoying
> when org pulls in a buffer just to look something up,
> without org-inhibit-startup scoped into the file loading.
>
> Maybe one could arrange for the initialization to happen just
> before the buffer is first *displayed* (I do not know if that
> is possible).
>
> Just one nitpicking:  The idle timer may force updating when
> not necessary - but using after-change-functions will update after
> each character inserted.  So in fact your code might be updating
> more often at least while typing - maybe not while looking at
> the buffer and jumping around.  I am not a fast typist, but maybe
> fast typists will notice significant delays, in particular
> while writing inside a very long section?

In order to circumvent the slow process at initialization, I've
implemented an asynchronous initialization. Thus, one can open the
buffer and start to write in it before initialization is complete. Once
it is done, everything else is synchronous again.

I think it is a good compromise. It needs testing though. Thus, if
anyone is interested, I'll gladly hear his feedback.

The branch is located at :

     git://github.com/ngz/org-mode-lists.git indent-patch-no-timer


Regards,

-- 
Nicolas Goaziou

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

* Re: [dev] org-indent-mode patch
  2011-07-21 15:14   ` Nicolas Goaziou
@ 2011-08-18  8:38     ` Carsten Dominik
  2011-08-18 10:19       ` Nicolas Goaziou
  0 siblings, 1 reply; 11+ messages in thread
From: Carsten Dominik @ 2011-08-18  8:38 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Org Mode List

Hi Nicolas,

what has happened to this patch?  Did you stop it due to my questions?
That was not my intention - so if you are convinced that it works well,
it might be a good solution.

- Carsten

On Jul 21, 2011, at 5:14 PM, Nicolas Goaziou wrote:

> Hello,
> 
> Carsten Dominik <carsten.dominik@gmail.com> writes:
> 
>> On 13.3.2011, at 17:21, Nicolas wrote:
>> 
>>> I'd like to submit the following org-indent-mode patch for testing.
>>> 
>>> 
>>> It implements two things:
>>> 
>>> 1. It indents correctly text when using visual-line-mode;
>>> 2. It removes the idle timer previous implementation was using, which
>>>  means it won't refresh indentation more often than necessary.
>>> 
>>> Unfortunately, there is a price to pay:
>>> 
>>> 1. Initialization will be much longer for large Org files, but I've
>>>  added a message to the user saying so.
>>> 2. It is a bit slower, as the algorithm has more things to check.
>>> 
>>> 
>>> Last point is obviously my main concern. Although not noticeable on my
>>> not-so-recent laptop, I don't know how it behaves on old machines.
>>> 
> 
>> Initial testing seems to show that this works well, very nice.
>> 
>> The delay at the beginning is long, and it might be annoying
>> when org pulls in a buffer just to look something up,
>> without org-inhibit-startup scoped into the file loading.
>> 
>> Maybe one could arrange for the initialization to happen just
>> before the buffer is first *displayed* (I do not know if that
>> is possible).
>> 
>> Just one nitpicking:  The idle timer may force updating when
>> not necessary - but using after-change-functions will update after
>> each character inserted.  So in fact your code might be updating
>> more often at least while typing - maybe not while looking at
>> the buffer and jumping around.  I am not a fast typist, but maybe
>> fast typists will notice significant delays, in particular
>> while writing inside a very long section?
> 
> In order to circumvent the slow process at initialization, I've
> implemented an asynchronous initialization. Thus, one can open the
> buffer and start to write in it before initialization is complete. Once
> it is done, everything else is synchronous again.
> 
> I think it is a good compromise. It needs testing though. Thus, if
> anyone is interested, I'll gladly hear his feedback.
> 
> The branch is located at :
> 
>     git://github.com/ngz/org-mode-lists.git indent-patch-no-timer
> 
> 
> Regards,
> 
> -- 
> Nicolas Goaziou

- Carsten

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

* Re: [dev] org-indent-mode patch
  2011-08-18  8:38     ` Carsten Dominik
@ 2011-08-18 10:19       ` Nicolas Goaziou
  2011-08-18 10:26         ` Carsten Dominik
  0 siblings, 1 reply; 11+ messages in thread
From: Nicolas Goaziou @ 2011-08-18 10:19 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: Bernt Hansen, Org Mode List

Hello,

Carsten Dominik <carsten.dominik@gmail.com> writes:

> what has happened to this patch?  Did you stop it due to my questions?
> That was not my intention - so if you are convinced that it works well,
> it might be a good solution.
>
> On Jul 21, 2011, at 5:14 PM, Nicolas Goaziou wrote:
>
>> In order to circumvent the slow process at initialization, I've
>> implemented an asynchronous initialization. Thus, one can open the
>> buffer and start to write in it before initialization is complete. Once
>> it is done, everything else is synchronous again.
>> 
>> I think it is a good compromise. It needs testing though. Thus, if
>> anyone is interested, I'll gladly hear his feedback.
>> 
>> The branch is located at :
>> 
>>     git://github.com/ngz/org-mode-lists.git indent-patch-no-timer

It's still there. As I use neither Org indent mode nor Visual line mode,
feedback is important. Have you tried it since asynchronous
initialization implementation?  Does it solve the problems you raised?

Bernt Hansen has been testing it for a few weeks now. As far as I know,
he hasn't encountered any problem so far.

Regards,


-- 
Nicolas Goaziou

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

* Re: [dev] org-indent-mode patch
  2011-08-18 10:19       ` Nicolas Goaziou
@ 2011-08-18 10:26         ` Carsten Dominik
  2011-08-18 12:02           ` Bernt Hansen
  0 siblings, 1 reply; 11+ messages in thread
From: Carsten Dominik @ 2011-08-18 10:26 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Bernt Hansen, Org Mode List


On Aug 18, 2011, at 12:19 PM, Nicolas Goaziou wrote:

> Hello,
> 
> Carsten Dominik <carsten.dominik@gmail.com> writes:
> 
>> what has happened to this patch?  Did you stop it due to my questions?
>> That was not my intention - so if you are convinced that it works well,
>> it might be a good solution.
>> 
>> On Jul 21, 2011, at 5:14 PM, Nicolas Goaziou wrote:
>> 
>>> In order to circumvent the slow process at initialization, I've
>>> implemented an asynchronous initialization. Thus, one can open the
>>> buffer and start to write in it before initialization is complete. Once
>>> it is done, everything else is synchronous again.
>>> 
>>> I think it is a good compromise. It needs testing though. Thus, if
>>> anyone is interested, I'll gladly hear his feedback.
>>> 
>>> The branch is located at :
>>> 
>>>    git://github.com/ngz/org-mode-lists.git indent-patch-no-timer
> 
> It's still there. As I use neither Org indent mode nor Visual line mode,
> feedback is important. Have you tried it since asynchronous
> initialization implementation?  Does it solve the problems you raised?
> 
> Bernt Hansen has been testing it for a few weeks now. As far as I know,
> he hasn't encountered any problem so far.

Well, if Bernt has been testing is w/o problems, it probably works.
I propose you push it into master, to make everyone use it - this
will be a good way to find out if there are niches
where it causes problems.

- Carsten

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

* Re: [dev] org-indent-mode patch
  2011-08-18 10:26         ` Carsten Dominik
@ 2011-08-18 12:02           ` Bernt Hansen
  2011-08-18 12:55             ` Bastien
  0 siblings, 1 reply; 11+ messages in thread
From: Bernt Hansen @ 2011-08-18 12:02 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: Org Mode List, Nicolas Goaziou

Carsten Dominik <carsten.dominik@gmail.com> writes:

> On Aug 18, 2011, at 12:19 PM, Nicolas Goaziou wrote:
>
>> Hello,
>> 
>> Carsten Dominik <carsten.dominik@gmail.com> writes:
>> 
>>> what has happened to this patch?  Did you stop it due to my questions?
>>> That was not my intention - so if you are convinced that it works well,
>>> it might be a good solution.
>>> 
>>> On Jul 21, 2011, at 5:14 PM, Nicolas Goaziou wrote:
>>> 
>>>> In order to circumvent the slow process at initialization, I've
>>>> implemented an asynchronous initialization. Thus, one can open the
>>>> buffer and start to write in it before initialization is complete. Once
>>>> it is done, everything else is synchronous again.
>>>> 
>>>> I think it is a good compromise. It needs testing though. Thus, if
>>>> anyone is interested, I'll gladly hear his feedback.
>>>> 
>>>> The branch is located at :
>>>> 
>>>>    git://github.com/ngz/org-mode-lists.git indent-patch-no-timer
>> 
>> It's still there. As I use neither Org indent mode nor Visual line mode,
>> feedback is important. Have you tried it since asynchronous
>> initialization implementation?  Does it solve the problems you raised?
>> 
>> Bernt Hansen has been testing it for a few weeks now. As far as I know,
>> he hasn't encountered any problem so far.
>
> Well, if Bernt has been testing is w/o problems, it probably works.
> I propose you push it into master, to make everyone use it - this
> will be a good way to find out if there are niches
> where it causes problems.

I've been using it for awhile and haven't noticed any issues with it.  I
use org-indent mode but I don't use visual line mode.  I've switched
back and forth between this branch and master a few times during my
testing.

I think incorporating it in master so it gets more exposure for testing
is a good idea.

-Bernt

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

* Re: [dev] org-indent-mode patch
  2011-08-18 12:02           ` Bernt Hansen
@ 2011-08-18 12:55             ` Bastien
  2011-08-18 14:00               ` Nicolas Goaziou
  0 siblings, 1 reply; 11+ messages in thread
From: Bastien @ 2011-08-18 12:55 UTC (permalink / raw)
  To: Bernt Hansen; +Cc: Nicolas Goaziou, Org Mode List, Carsten Dominik

Hi Bernt,

Bernt Hansen <bernt@norang.ca> writes:

> I think incorporating it in master so it gets more exposure for
> testing is a good idea.

Thanks for the feedback.

Nicolas, feel free to merge this change so that more users can test it.

Thanks,

-- 
 Bastien

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

* Re: [dev] org-indent-mode patch
  2011-08-18 12:55             ` Bastien
@ 2011-08-18 14:00               ` Nicolas Goaziou
  2011-08-18 16:47                 ` Bastien
  0 siblings, 1 reply; 11+ messages in thread
From: Nicolas Goaziou @ 2011-08-18 14:00 UTC (permalink / raw)
  To: Bastien; +Cc: Bernt Hansen, Org Mode List, Carsten Dominik

Hello,

Bastien <bzg@altern.org> writes:

> Nicolas, feel free to merge this change so that more users can test
> it.

Done.

Regards,


-- 
Nicolas Goaziou

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

* Re: [dev] org-indent-mode patch
  2011-08-18 14:00               ` Nicolas Goaziou
@ 2011-08-18 16:47                 ` Bastien
  0 siblings, 0 replies; 11+ messages in thread
From: Bastien @ 2011-08-18 16:47 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Bernt Hansen, Org Mode List, Carsten Dominik

Nicolas Goaziou <n.goaziou@gmail.com> writes:

> Bastien <bzg@altern.org> writes:
>
>> Nicolas, feel free to merge this change so that more users can test
>> it.
>
> Done.

Great work, thanks!!

-- 
 Bastien

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

end of thread, other threads:[~2011-08-18 16:46 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-13 16:21 [dev] org-indent-mode patch Nicolas
2011-03-14  7:51 ` Carsten Dominik
2011-03-19  6:33   ` Linus Arver
2011-07-21 15:14   ` Nicolas Goaziou
2011-08-18  8:38     ` Carsten Dominik
2011-08-18 10:19       ` Nicolas Goaziou
2011-08-18 10:26         ` Carsten Dominik
2011-08-18 12:02           ` Bernt Hansen
2011-08-18 12:55             ` Bastien
2011-08-18 14:00               ` Nicolas Goaziou
2011-08-18 16:47                 ` Bastien

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).