emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [BUG]: unexpected behavior related to org-indent-block


From: gerard . vermeulen
Subject: Re: [BUG]: unexpected behavior related to org-indent-block
Date: Thu, 11 Jan 2024 14:14:14 +0000



On 11.01.2024 13:37, Ihor Radchenko wrote:
gerard.vermeulen@posteo.net writes:

Below, I show 2 commands to be run with point on a source block.
I expect that those commands modify an Org file identically, but
they do not.  It fails when `org-indent-block' is called in a
loop after each `(insert (org-element-interpret-data copy))' and
it works when `org-indent-block' is called in a separate loop
after insertion of all `(org-element-interpret-data copy)'s:
...
Example block:
---
#+begin_src emacs-lisp
<point>
#+end_src
---
make-2-indent-fails results in
---
#+begin_src emacs-lisp
copy 1
#+end_src

I cannot reproduce.
I am seeing

make-2-indent-fails results in
---
#+begin_src emacs-lisp
copy 1
#+end_src
#+begin_src emacs-lisp
copy 2
#+end_src
<point>

On the latest main.

This is strange:
I pulled the latest main and created a clean org-emacs directory
where I put a minimal init.el reading:

(when (eq system-type 'darwin)
  (setopt ns-alternate-modifier nil
          ns-command-modifier 'meta
          ns-right-command-modifier 'super))

(push (expand-file-name "~/VCS/org-mode/lisp") load-path)
(require 'org)

After emacs --init-directory org-emacs, I get (code in the
result blocks got now indented):

Example block:
---
#+begin_src emacs-lisp
<point>
#+end_src
---
make-2-indent-fails results in
---
#+begin_src emacs-lisp
  copy 1
#+end_src
---
make-2-indent-works results in
---
#+begin_src emacs-lisp
  copy 1
#+end_src
#+begin_src emacs-lisp
  copy 2
#+end_src
---
I have no idea what I can do now.
My Emacs is also recent main and built by me with minimal configure options.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]