Re: [BUG] Unintuitive indentation behavior when editing org-src blocks

2025-05-11 Thread Ihor Radchenko
Ihor Radchenko writes: >>> May you elaborate on the edge cases you encountered? >>> It may be a good idea to add such cases to the tests as well. >> >> I think they all reduced to the case where adding the spaces increased >> the minimum indent of the block, in which case `org-indent-line' would

Re: [BUG] Unintuitive indentation behavior when editing org-src blocks

2025-04-11 Thread Ihor Radchenko
l...@phdk.org writes: >> Applied, onto main. > Great! > >> May you elaborate on the edge cases you encountered? >> It may be a good idea to add such cases to the tests as well. > > I think they all reduced to the case where adding the spaces increased > the minimum indent of the block, in which ca

Re: [BUG] Unintuitive indentation behavior when editing org-src blocks

2025-03-31 Thread lra
> Applied, onto main. Great! > May you elaborate on the edge cases you encountered? > It may be a good idea to add such cases to the tests as well. I think they all reduced to the case where adding the spaces increased the minimum indent of the block, in which case `org-indent-line' would remove

Re: [BUG] Unintuitive indentation behavior when editing org-src blocks

2025-03-29 Thread Ihor Radchenko
l...@phdk.org writes: > Thanks for the comments, I've attached the updated patch. > >> 1. Use `insert' rather than `insert-char' that is for interactive use. >> 2. Use more readable ?\t notation > > I realized that just inserting the spaces actually did mess up things > in some edge-cases so I cha

Re: [BUG] Unintuitive indentation behavior when editing org-src blocks

2025-03-27 Thread lra
Hi Ihor Thanks for the comments, I've attached the updated patch. > 1. Use `insert' rather than `insert-char' that is for interactive use. > 2. Use more readable ?\t notation I realized that just inserting the spaces actually did mess up things in some edge-cases so I changed approach. It feels

Re: [BUG] Unintuitive indentation behavior when editing org-src blocks

2025-03-25 Thread Ihor Radchenko
l...@phdk.org writes: > When adding a newline to an org-src block with > `org-src-tab-acts-natively' set to t, if there's a non-whitespace > character following the pointer at insertion, all other lines are > indented by an additional `org-edit-src-content-indentation' > regardless of their origin

Re: [BUG] Unintuitive indentation behavior when editing org-src blocks

2025-03-25 Thread Henrik Ahlgren
l...@phdk.org writes: > [1] I think this is what this thread was about: > https://list.orgmode.org/CALp=Ckko1Ck7-3K+bfKXLVSqDJvmHWYEZutkj5J2v3t=quv...@mail.gmail.com/T/#tO >   > Which was closed as not a bug, but since I feel I'm misunderstanding > either the original report or Ihor's answer I tho