Org-mode mailing list
 help / color / mirror / Atom feed
* Bug: Unexpected movement of cursor when commenting code blocks
@ 2021-01-13 12:36 yoctocell
  2021-01-15 18:48 ` Sébastien Miquel
  0 siblings, 1 reply; 3+ messages in thread
From: yoctocell @ 2021-01-13 12:36 UTC (permalink / raw)
  To: emacs-orgmode


Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

     https://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org mailing list.
------------------------------------------------------------------------
When I am inside a code block like this:

#+begin_src emacs-lisp
(use-package org
  :defer
  :config
  (setq blahblah t)) ; cursor on this line
#+end_src

and I hit "C-x C-;" to comment the line, the cursor automatically jumps
to the second line of the code block after the comment is made.  I would
expect the cursor to move forward one line like it usually does and this
only happens in Org-mode, not when I edit the code block in a separate
buffer with "C-c C-'".

#+begin_src emacs-lisp
(use-package org
  :defer ; cursor jumps to this line
  :config
  ;; (setq blahblah t))
#+end_src

This happens no matter how big the code block is, and it always jumps to
the second line of the code block.  I was able to reproduce this with
the "minimal-org.el" file.


Emacs  : GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.23, cairo version 1.16.0)
Package: Org mode version 9.4.4 (9.4.4-3-gbd1c31-elpaplus @ /nix/store/ybfrs7h4byc03f963flgc845n3m1dkhi-emacs-packages-deps/share/emacs/site-lisp/elpa/org-plus-contrib-20201228/)


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

* Re: Bug: Unexpected movement of cursor when commenting code blocks
  2021-01-13 12:36 Bug: Unexpected movement of cursor when commenting code blocks yoctocell
@ 2021-01-15 18:48 ` Sébastien Miquel
  2021-01-15 20:27   ` yoctocell
  0 siblings, 1 reply; 3+ messages in thread
From: Sébastien Miquel @ 2021-01-15 18:48 UTC (permalink / raw)
  To: yoctocell, emacs-orgmode

Hi,

yoctocell writes:
> When I am inside a code block like this:
>
> and I hit "C-x C-;" to comment the line, the cursor automatically jumps
> to the second line of the code block after the comment is made.  I would
> expect the cursor to move forward one line like it usually does and this
> only happens in Org-mode, not when I edit the code block in a separate
> buffer with "C-c C-'".

I have previously proposed a patch that I think fixes this issue, see

https://orgmode.org/list/3072e244-4615-aaad-4019-621bb3d1d4f8@posteo.eu/#t

Regards,

-- 
Sébastien Miquel



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

* Re: Bug: Unexpected movement of cursor when commenting code blocks
  2021-01-15 18:48 ` Sébastien Miquel
@ 2021-01-15 20:27   ` yoctocell
  0 siblings, 0 replies; 3+ messages in thread
From: yoctocell @ 2021-01-15 20:27 UTC (permalink / raw)
  To: Sébastien Miquel; +Cc: emacs-orgmode

On 15 January 2021 19:48, Sébastien Miquel <sebastien.miquel@posteo.eu> wrote:

> I have previously proposed a patch that I think fixes this issue, see
>
> https://orgmode.org/list/3072e244-4615-aaad-4019-621bb3d1d4f8@posteo.eu/#t

I applied the patch and it the problem seems to be fixed. Thank you!

-- 
yoctocell
8B88 2502 31D7 03B1 68BC  2691 3851 020D 7E61 BBC2


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

end of thread, other threads:[~2021-01-15 20:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-13 12:36 Bug: Unexpected movement of cursor when commenting code blocks yoctocell
2021-01-15 18:48 ` Sébastien Miquel
2021-01-15 20:27   ` yoctocell

Org-mode mailing list

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://orgmode.org/list/0 list/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 list list/ https://orgmode.org/list \
		emacs-orgmode@gnu.org
	public-inbox-index list

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.emacs.orgmode
	nntp://news.gmane.io/gmane.emacs.orgmode


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git