emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Sébastien Miquel" <sebastien.miquel@posteo.eu>
To: Michael Gauland <mikelygee@gmail.com>, emacs-orgmode@gnu.org
Subject: Re: source blocks mangled when edited
Date: Mon, 31 May 2021 08:15:46 +0000	[thread overview]
Message-ID: <9e9ac180-7b77-3e04-87e4-7d1e9e02856e@posteo.eu> (raw)
In-Reply-To: <e5e4e0cc-14a8-a9f8-6911-5244d77bab29@gmail.com>

Hi Michael,

Michael Gauland writes:
> 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'm unable to reproduce with a recent emacs version.

> I'm not even sure how to start tracking this down. Any help would be
> greatly appreciated!
The relevant functions are `org-edit-src-exit` and perhaps
`org-src--contents-for-write-back`.

Can you instrument these functions to see what's happening ? Is
`org-src--contents-for-write-back` populating the buffer correctly ?
Does the `replace-buffer-contents` call in `org-edit-src-exit` return
`t` ?

Regards,

-- 
Sébastien Miquel



  parent reply	other threads:[~2021-05-31  8:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9e9ac180-7b77-3e04-87e4-7d1e9e02856e@posteo.eu \
    --to=sebastien.miquel@posteo.eu \
    --cc=emacs-orgmode@gnu.org \
    --cc=mikelygee@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).