I've stared having trouble editing source blocks.    When I use C-c ' to
edit block, the editing behaves as expected, but when I C-c ' to return
to the main org file, the code is altered in strange ways.  I've had
trouble coming up with a really small example, but the attached file
seems to consistently demonstrate the problem, even when running emacs
without my settings.

The file has two identical source blocks. The first generally behaves
fine, though some lines get extra indentation.

The second suffers more serious distortions. For example, the first line
changes from "digraph G {" to "aph G {".

I've seen this with other types of code as well (at least SQL and json),
so it's not specific to dot.

I'm running emacs 26.1 on Debian 10.9, with org build from git.

I'm not even sure how to start tracking this down. Any help would be
greatly appreciated!

Kind regards,

Mike Gauland

#+BEGIN_SRC dot :file diagram1.png :cmdline -Kdot -Tpng
  digraph G {
      rankdir = "LR"
       pre [label="Preprocessor"]                          
       subgraph cluster_inputs {
           label="Inputs"
           rankdir = "TB"
           input1 [label="input"]
           input2 [label="input"]
           input3 [label="∙\n∙\n∙",shape=none]
           input4 [label="input"]
       } -> pre

               pre -> final

               subgraph users {
         rankdir="TB"
         "End Users"
         "Resellers"
         "Corporate Users"
      }

      final -> "End Users"
      final -> "Resellers"
      final -> "Corporate Users"
  }
#+END_SRC

#+BEGIN_SRC dot :file diagram2.png :cmdline -Kdot -Tpng
  digraph G {
      rankdir = "LR"
       pre [label="Preprocessor"]                          
       subgraph cluster_inputs {
           label="Inputs"
           rankdir = "TB"
           input1 [label="input"]
           input2 [label="input"]
           input3 [label="∙\n∙\n∙",shape=none]
           input4 [label="input"]
       } -> pre

       pre -> final

       subgraph users {
         rankdir="TB"
         "End Users"
         "Resellers"
         "Corporate Users"
      }

      final -> "End Users"
      final -> "Resellers"
      final -> "Corporate Users"
  }
#+END_SRC

Reply via email to