Re: [BUG] defaults make it hard to edit Elisp blocks in org buffers

2024-01-18 Thread Ihor Radchenko
gerard.vermeu...@posteo.net writes: >> I cannot think of any common use where the two approches differ, and >> it is indeed simpler. The possibility that the block does not have the >> common indentation still stands. > > As far as I understand, the effect also occurs when the block has a > common

Re: [BUG] defaults make it hard to edit Elisp blocks in org buffers

2024-01-18 Thread gerard . vermeulen
On 18.01.2024 17:45, Sébastien Miquel wrote: Ihor Radchenko writes: If I recall correctly, in order to fix this, in =org-indent-line=, before calling =TAB= in the native buffer, one should check the current line indentation and if it is less than =block-content-ind=, start by adding this much

Re: [BUG] defaults make it hard to edit Elisp blocks in org buffers

2024-01-18 Thread Sébastien Miquel
Ihor Radchenko writes: If I recall correctly, in order to fix this, in =org-indent-line=, before calling =TAB= in the native buffer, one should check the current line indentation and if it is less than =block-content-ind=, start by adding this much indentation to the current line. This could b

Re: [BUG] defaults make it hard to edit Elisp blocks in org buffers

2024-01-18 Thread Ihor Radchenko
Sébastien Miquel writes: > The issue is that when you press return, you insert a newline, with no > indentation, then call =org-indent-line= which edits the block in a > native buffer. This is supposed to remove any common indentation, but > there is now none. Then it reinserts the code in the or

Re: [BUG] defaults make it hard to edit Elisp blocks in org buffers

2024-01-17 Thread Sébastien Miquel
Hi, The issue is that when you press return, you insert a newline, with no indentation, then call =org-indent-line= which edits the block in a native buffer. This is supposed to remove any common indentation, but there is now none. Then it reinserts the code in the org-buffer, adding a new common

[BUG] defaults make it hard to edit Elisp blocks in org buffers

2024-01-17 Thread gerard . vermeulen
* Why I do (setopt org-src-preserve-indention t) Sometimes, I want to do small Elisp edits without calling org-edit-source-code. Below, I describe a long standing bug (several years) that is also present in main. I use smartparens, but it reproduces also in a clean environment (minimal init.el)