emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* source blocks mangled when edited
@ 2021-05-31  3:39 Michael Gauland
  2021-05-31  4:21 ` Samuel Wales
  2021-05-31  8:15 ` Sébastien Miquel
  0 siblings, 2 replies; 9+ messages in thread
From: Michael Gauland @ 2021-05-31  3:39 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 926 bytes --]

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


[-- Attachment #2: bug.org --]
[-- Type: text/plain, Size: 1326 bytes --]

#+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


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-06-27 13:55 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-31  3:39 source blocks mangled when edited Michael Gauland
2021-05-31  4:21 ` Samuel Wales
2021-05-31  8:01   ` Michael Gauland
2021-05-31  8:15 ` Sébastien Miquel
2021-05-31  8:54   ` Michael Gauland
2021-05-31  9:42     ` Sébastien Miquel
2021-05-31 10:02       ` Michael Gauland
2021-06-01  8:20         ` [PATCH] " Sébastien Miquel
2021-06-27 13:54           ` Nicolas Goaziou

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).