emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] org-timestamp-up/down broken in tip


From: Nicolas Goaziou
Subject: Re: [O] org-timestamp-up/down broken in tip
Date: Fri, 22 Jul 2011 10:47:14 +0200

Hello,

Bastien <address@hidden> writes:

> Bastien <address@hidden> writes:
>
>> I reverted this commit.
>>
>> We need a better solution for the problem this commit was trying to
>> solve.  
>
> I should add that I tested Nicolas' patch and it worked okay for me,
> but I should have tested it better.  So, my bad on this one.

In fact, the problem is that when a time-stamp is changed, the old one
is completely deleted (which is logical). A marker is useless when text
is removed under it.

So, saving point, saving marker, or even saving a line-column
combination can't help here.

Now, the good news are that we can tell exactly in which part of the
time-stamp the point was before. A general solution would be to keep
point before the new time-stamp, look at it, and move to the right part.

A refinement could be to try to keep the same position within the
part. If point was at year, month, day (number), the column will be the
same because they all have fixed size. But if it was past there, we have
to check how far it was from the beginning of the part, and put it
there, unless this happens to be after the end of that part, in which
case, it will simply be put at the last position in it.

I can't work on it before a dozen of hours, though. I will do it then
unless someone wants to take care of it before.

Regards,

-- 
Nicolas Goaziou



reply via email to

[Prev in Thread] Current Thread [Next in Thread]