Re: [O] Bug: `comment-line` within a SRC block moves point to beginning of block [9.2 (9.2-43-gf9a8cc-elpaplus)]

2019-01-30 Thread kadal

I have the same issue with:

Org mode version 9.2 (9.2-43-gf9a8cc-elpaplus)
GNU Emacs 27.0.50 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.18.9) of 
2018-12-14


I assumed it was a bug in comment-dwim-2, but it occurs with 
comment-line too.


On 1/30/19 1:13 PM, Nicolas Goaziou wrote:

Hello,

Spencer Russell  writes:


Thanks for trying it out. Would you mind sharing your emacs and org
versions?


Sure.

Org mode version 9.2 (release_9.2-213-g5c07b4)
GNU Emacs 26.1

Could you try master branch?

Regards,






Re: [O] Bug: `comment-line` within a SRC block moves point to beginning of block [9.2 (9.2-43-gf9a8cc-elpaplus)]

2019-01-30 Thread Nicolas Goaziou
Hello,

Spencer Russell  writes:

> Thanks for trying it out. Would you mind sharing your emacs and org
> versions?

Sure.

Org mode version 9.2 (release_9.2-213-g5c07b4)
GNU Emacs 26.1

Could you try master branch?

Regards,

-- 
Nicolas Goaziou



Re: [O] Bug: `comment-line` within a SRC block moves point to beginning of block [9.2 (9.2-43-gf9a8cc-elpaplus)]

2019-01-30 Thread Spencer Russell
On Tue, Jan 29, 2019, at 3:32 PM, Nicolas Goaziou wrote:
> 
> FWIW, I cannot reproduce it.
> 

Thanks for trying it out. Would you mind sharing your emacs and org versions?

-s



Re: [O] Bug: `comment-line` within a SRC block moves point to beginning of block [9.2 (9.2-43-gf9a8cc-elpaplus)]

2019-01-29 Thread Nicolas Goaziou
Hello,

Spencer Russell  writes:

> I've been trying to troubleshoot an issue where running `comment-line`
> within a SRC block moves point to the beginning of the block, rather
> than after the commented line.
> I've boiled it down to a reproduction that duplicates the root cause.
> Open an org document, put point in a SRC block on some line besides the
> first, and run the following:
> ```
> (save-excursion
>   (org-babel-do-in-edit-buffer
> (insert "FOO")))
> ```
>
> This duplicates what happens in `org-comment-or-uncomment-region`
> in `org.el`.
> This will add "FOO" to point, as expected, but point jumps to the
> beginning of the block (at least on my setup). According to the docs of
> `org-edit-src-code`, which is used by `org-babel-do-in-edit-buffer`, it
> removes the original code and replaces it with the edited code. That
> seems like the source of the problem, because the marker saved by `save-
> excursion` is lost.

FWIW, I cannot reproduce it.

Regards,
-- 
Nicolas Goaziou