emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [BUG] Shift-up/down move the cursor to end of timestamp
@ 2022-12-02  5:17 Daniel Clemente
  2022-12-03  3:08 ` Christopher M. Miles
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Daniel Clemente @ 2022-12-02  5:17 UTC (permalink / raw)
  To: Org-mode Org-Mode

[-- Attachment #1: Type: text/plain, Size: 1360 bytes --]

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 <yantar92@posteo.net>
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 <brucer42@gmail.com>
    Link: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=53393

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

[-- Attachment #2: Type: text/html, Size: 1853 bytes --]

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

* Re: [BUG] Shift-up/down move the cursor to end of timestamp
  2022-12-02  5:17 [BUG] Shift-up/down move the cursor to end of timestamp Daniel Clemente
@ 2022-12-03  3:08 ` Christopher M. Miles
  2022-12-07 10:52 ` Ihor Radchenko
  2022-12-07 10:53 ` Ihor Radchenko
  2 siblings, 0 replies; 7+ messages in thread
From: Christopher M. Miles @ 2022-12-03  3:08 UTC (permalink / raw)
  To: Daniel Clemente; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 291 bytes --]


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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

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

* Re: [BUG] Shift-up/down move the cursor to end of timestamp
  2022-12-02  5:17 [BUG] Shift-up/down move the cursor to end of timestamp Daniel Clemente
  2022-12-03  3:08 ` Christopher M. Miles
@ 2022-12-07 10:52 ` Ihor Radchenko
  2022-12-07 10:53 ` Ihor Radchenko
  2 siblings, 0 replies; 7+ messages in thread
From: Ihor Radchenko @ 2022-12-07 10:52 UTC (permalink / raw)
  To: Daniel Clemente; +Cc: Org-mode Org-Mode

Daniel Clemente <n142857@gmail.com> 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 <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


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

* Re: [BUG] Shift-up/down move the cursor to end of timestamp
  2022-12-02  5:17 [BUG] Shift-up/down move the cursor to end of timestamp Daniel Clemente
  2022-12-03  3:08 ` Christopher M. Miles
  2022-12-07 10:52 ` Ihor Radchenko
@ 2022-12-07 10:53 ` Ihor Radchenko
  2022-12-07 19:34   ` Daniel Clemente
  2023-01-12  9:23   ` Johannes Dahl
  2 siblings, 2 replies; 7+ messages in thread
From: Ihor Radchenko @ 2022-12-07 10:53 UTC (permalink / raw)
  To: Daniel Clemente; +Cc: Org-mode Org-Mode

Daniel Clemente <n142857@gmail.com> 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 <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


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

* Re: [BUG] Shift-up/down move the cursor to end of timestamp
  2022-12-07 10:53 ` Ihor Radchenko
@ 2022-12-07 19:34   ` Daniel Clemente
  2023-01-12  9:23   ` Johannes Dahl
  1 sibling, 0 replies; 7+ messages in thread
From: Daniel Clemente @ 2022-12-07 19:34 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Org-mode Org-Mode

[-- Attachment #1: Type: text/plain, Size: 1019 bytes --]

It works now, thanks!

On Wed, 7 Dec 2022 at 10:53, Ihor Radchenko <yantar92@posteo.net> wrote:

> Daniel Clemente <n142857@gmail.com> 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 <https://orgmode.org/>.
> Support Org development at <https://liberapay.com/org-mode>,
> or support my work at <https://liberapay.com/yantar92>
>

[-- Attachment #2: Type: text/html, Size: 1851 bytes --]

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

* Re: [BUG] Shift-up/down move the cursor to end of timestamp
  2022-12-07 10:53 ` Ihor Radchenko
  2022-12-07 19:34   ` Daniel Clemente
@ 2023-01-12  9:23   ` Johannes Dahl
  2023-01-13  9:11     ` Ihor Radchenko
  1 sibling, 1 reply; 7+ messages in thread
From: Johannes Dahl @ 2023-01-12  9:23 UTC (permalink / raw)
  To: Org-mode Org-Mode

On Wed, 7 Dec 2022 at 12:54, Ihor Radchenko <yantar92@posteo.net> wrote:
>
> Daniel Clemente <n142857@gmail.com> 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


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

* Re: [BUG] Shift-up/down move the cursor to end of timestamp
  2023-01-12  9:23   ` Johannes Dahl
@ 2023-01-13  9:11     ` Ihor Radchenko
  0 siblings, 0 replies; 7+ messages in thread
From: Ihor Radchenko @ 2023-01-13  9:11 UTC (permalink / raw)
  To: Johannes Dahl; +Cc: Org-mode Org-Mode

Johannes Dahl <muusik@gmail.com> 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 <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


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

end of thread, other threads:[~2023-01-13  9:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-02  5:17 [BUG] Shift-up/down move the cursor to end of timestamp Daniel Clemente
2022-12-03  3:08 ` Christopher M. Miles
2022-12-07 10:52 ` Ihor Radchenko
2022-12-07 10:53 ` Ihor Radchenko
2022-12-07 19:34   ` Daniel Clemente
2023-01-12  9:23   ` Johannes Dahl
2023-01-13  9:11     ` Ihor Radchenko

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