Re: [BUG] Shift-up/down move the cursor to end of timestamp

2023-01-13 Thread Ihor Radchenko
Johannes Dahl  writes:

> ... However, the same problem (cursor is positioned
> after closing bracket) occurs with the related commands org-shiftcontrolup and
> org-shiftcontroldown. (For completeness: in 9.6.0 they were even slightly more
> broken in that they shifted the timestamps in different directions.)

Thanks!
This is a bit annoying, because the problem lies within
`org-timestamp-change' logic.
I now fixed the particular problem with `org-shiftcontrolup' on bugfix,
but I am afraid that similar issues may pop up in future.

Fix: https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=97a235cf1

Ideally, we need to patch `org-timestamp-change' logic. See
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=76f9a3c2c

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: [BUG] Shift-up/down move the cursor to end of timestamp

2023-01-12 Thread Johannes Dahl
On Wed, 7 Dec 2022 at 12:54, Ihor Radchenko  wrote:
>
> Daniel Clemente  writes:
>
> > Using a file with just one header:
> >
> > * something
> >   :CLOCK:
> >   CLOCK: [2022-12-01 Thu 17:15]--[2022-12-01 Thu 17:30] =>  0:15
> >   :END:
> >
> > If I put the cursor on the end timestamp (on the 3 of 17:30) and press
> > shift+up or shift-down, the timestamp is correctly adjusted by 5 minutes,
> > but the cursor jumps some characters to the right and stays at the right of
> > ]
> > It should stay on the same character (the 3), so that I can keep adjusting
> > the minutes with shift-up/down
>
> Thanks for reporting!
> Fixed on bugfix.
> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=4dddbc143

I, too, was affected by this bug, and, with the release of org-mode 9.6.1, can
confirm that it has been fixed. However, the same problem (cursor is positioned
after closing bracket) occurs with the related commands org-shiftcontrolup and
org-shiftcontroldown. (For completeness: in 9.6.0 they were even slightly more
broken in that they shifted the timestamps in different directions.)

Johannes



Re: [BUG] Shift-up/down move the cursor to end of timestamp

2022-12-07 Thread Daniel Clemente
It works now, thanks!

On Wed, 7 Dec 2022 at 10:53, Ihor Radchenko  wrote:

> Daniel Clemente  writes:
>
> > Using a file with just one header:
> >
> > * something
> >   :CLOCK:
> >   CLOCK: [2022-12-01 Thu 17:15]--[2022-12-01 Thu 17:30] =>  0:15
> >   :END:
> >
> > If I put the cursor on the end timestamp (on the 3 of 17:30) and press
> > shift+up or shift-down, the timestamp is correctly adjusted by 5 minutes,
> > but the cursor jumps some characters to the right and stays at the right
> of
> > ]
> > It should stay on the same character (the 3), so that I can keep
> adjusting
> > the minutes with shift-up/down
>
> Thanks for reporting!
> Fixed on bugfix.
> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=4dddbc143
>
> --
> Ihor Radchenko // yantar92,
> Org mode contributor,
> Learn more about Org mode at .
> Support Org development at ,
> or support my work at 
>


Re: [BUG] Shift-up/down move the cursor to end of timestamp

2022-12-07 Thread Ihor Radchenko
Daniel Clemente  writes:

> Using a file with just one header:
>
> * something
>   :CLOCK:
>   CLOCK: [2022-12-01 Thu 17:15]--[2022-12-01 Thu 17:30] =>  0:15
>   :END:
>
> If I put the cursor on the end timestamp (on the 3 of 17:30) and press
> shift+up or shift-down, the timestamp is correctly adjusted by 5 minutes,
> but the cursor jumps some characters to the right and stays at the right of
> ]
> It should stay on the same character (the 3), so that I can keep adjusting
> the minutes with shift-up/down

Thanks for reporting!
Fixed on bugfix.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=4dddbc143

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: [BUG] Shift-up/down move the cursor to end of timestamp

2022-12-07 Thread Ihor Radchenko
Daniel Clemente  writes:

> Using a file with just one header:
>
> * something
>   :CLOCK:
>   CLOCK: [2022-12-01 Thu 17:15]--[2022-12-01 Thu 17:30] =>  0:15
>   :END:
>
> If I put the cursor on the end timestamp (on the 3 of 17:30) and press
> shift+up or shift-down, the timestamp is correctly adjusted by 5 minutes,
> but the cursor jumps some characters to the right and stays at the right of
> ]
> It should stay on the same character (the 3), so that I can keep adjusting
> the minutes with shift-up/down

Thanks for reporting!
Fixed on bugfix.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=4dddbc143

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: [BUG] Shift-up/down move the cursor to end of timestamp

2022-12-02 Thread Christopher M. Miles

I meet this bug too.

-- 

[ stardiviner ]
I try to make every word tell the meaning that I want to express without 
misunderstanding.

Blog: https://stardiviner.github.io/
IRC(libera.chat, freenode): stardiviner, Matrix: stardiviner
GPG: F09F650D7D674819892591401B5DF1C95AE89AC3


signature.asc
Description: PGP signature


[BUG] Shift-up/down move the cursor to end of timestamp

2022-12-01 Thread Daniel Clemente
Hi.

Using a file with just one header:

* something
  :CLOCK:
  CLOCK: [2022-12-01 Thu 17:15]--[2022-12-01 Thu 17:30] =>  0:15
  :END:

If I put the cursor on the end timestamp (on the 3 of 17:30) and press
shift+up or shift-down, the timestamp is correctly adjusted by 5 minutes,
but the cursor jumps some characters to the right and stays at the right of
]
It should stay on the same character (the 3), so that I can keep adjusting
the minutes with shift-up/down

Tested on: GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit,
cairo version 1.16.0, Xaw scroll bars) of 2022-11-18
No other settings needed in your .emacs

I bisected the tree until I found in which commit this started. Copying
from git bisect:

5bc6741a5abd42e8305bb0fcfe78801813309640 is the first bad commit
commit 5bc6741a5abd42e8305bb0fcfe78801813309640
Author: Ihor Radchenko 
Date:   Tue Nov 1 15:52:25 2022 +0800

org-clock-update-time-maybe: Update the containing timestamps as well

* lisp/org-clock.el (org-clock-update-time-maybe): Update the
containing timestamps inside the clock, not only the clock sum.

Reported-by: Bruce E. Robertson 
Link: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=53393

 lisp/org-clock.el | 35 ---
 1 file changed, 24 insertions(+), 11 deletions(-)