emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: the_wurfkreuz <the_wurfkreuz@proton.me>
To: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Incorrect cursor placement after using 'undo'
Date: Mon, 01 Jul 2024 07:08:24 +0000	[thread overview]
Message-ID: <XF_7mLNCUN8XKtnd7G-NUoAF5Vq0DDafaDdF0v53eFlhQ35N-H3bPA0VkYyDrbEWE-0PEQg8iiyB7NatUtvPEQe6SQyJaTE5vW0CwoUKzqs=@proton.me> (raw)

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

When i comment something inside a source block but then decide to undo
the commenting, the cursor ends up on the very first line of the block.

Steps to reproduce:

1. emacs -Q
2. In a scratch buffer activate org-mode and paste this:

#+begin_src fundamental
aoisretnoairsetn
oarisetnoairse
aorsoietnoairsent
arsnthi

arisentnhairsnht

aoirsetnaoi

oairsetnoarisetn
#+end_src

3. Apply commenting using 'comment-region' with any characters of you
choice on the lines on the bottom half of the block:

#+begin_src fundamental
aoisretnoairsetn
oarisetnoairse
aorsoietnoairsent
arsnthi

;; arisentnhairsnht

;; aoirsetnaoi

;; oairsetnoarisetn
#+end_src

4. After that press 'C-x u' to execute 'undo'. The cursor will end up at
the start of the block. I expect it to be somewhere within the commented
lines: on the line where the commenting initially applied or on the line where
the commenting ended.

Emacs : GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.41, cairo version 1.18.0)
of 2024-04-23
Package: Org mode version 9.8-pre (release_9.7.6-86-g571f1c @ /home/wurfkreuz/.emacs.d/straight/build/org/)

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

             reply	other threads:[~2024-07-08 14:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-01  7:08 the_wurfkreuz [this message]
2024-07-09 18:53 ` Incorrect cursor placement after using 'undo' Ihor Radchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='XF_7mLNCUN8XKtnd7G-NUoAF5Vq0DDafaDdF0v53eFlhQ35N-H3bPA0VkYyDrbEWE-0PEQg8iiyB7NatUtvPEQe6SQyJaTE5vW0CwoUKzqs=@proton.me' \
    --to=the_wurfkreuz@proton.me \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).