From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id OIwLJlSktGB3NwAAgWs5BA (envelope-from ) for ; Mon, 31 May 2021 10:54:44 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 2L+gIVSktGABOgAAB5/wlQ (envelope-from ) for ; Mon, 31 May 2021 08:54:44 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id E81A0DE9A for ; Mon, 31 May 2021 10:54:42 +0200 (CEST) Received: from localhost ([::1]:44246 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lndh3-0005se-DT for larch@yhetil.org; Mon, 31 May 2021 04:54:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46250) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lndgg-0005qH-70 for emacs-orgmode@gnu.org; Mon, 31 May 2021 04:54:18 -0400 Received: from mail-pj1-x1032.google.com ([2607:f8b0:4864:20::1032]:50917) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lndge-00057g-GD for emacs-orgmode@gnu.org; Mon, 31 May 2021 04:54:17 -0400 Received: by mail-pj1-x1032.google.com with SMTP id f8so6243402pjh.0 for ; Mon, 31 May 2021 01:54:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:references:from:subject:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=UyKcOGSReQoHfxxcIqwCPL+fLjCSemj9gKWY/ZISA94=; b=ZPrCPfNkNA4s+ZfgL9x/YySSGRg0pzM9E9gEdrRC6EnvBH4EiOc9AT6j9EpZpsy40z GesGqMbFmvOJE2UBmbJK6F7TxWzk1f1HikUvv3NYIndW9MPGE1kuoOiFV2+YdozXcywE h0rCdbJ2BhfSx2qONLHrztltRMQV7rzw2pozfY/JqN4LHwt4cFqPghNToXqiKJ3zTyll StZ8Z3XXUUZWPfXSUHvhG+Kkc8kZpHsXmjmLV1PhSQ4aNHvFpq7OmeAX8jgrTw4W6TNu pBNMxz7fXDc9IzuspzBM44vazR6ZZGNTNB/B3OYxBlcLxZKrk1enJ9G0TIWI0A4KIeK/ js5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:references:from:subject:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=UyKcOGSReQoHfxxcIqwCPL+fLjCSemj9gKWY/ZISA94=; b=kvDfiSG7H3UkSNuvOKPQVfVeQ2m5TENIGvFIW38ynyQGCyqj60iKnoU0a/BjzSqO28 eN2rH8mlFdjDQZQMBJTa0qKpuC3fDSEyEpDqUqT9lpNCiXZxyHkjnKL9MFYuSXnkHBlP DFq3By3/+8IuMJL18D2LKlzPZGSjLXagwWi8c7bmxeODIwc9MOFAYvSOH4yRvZjTPTDZ pDiXj+/nx4LIClwdchHrVRlZ9VGvNXcxlYq79vxWIUVq4zrhGZYT+5ToArBwk5lFtO5M hlOzGQKwQGKvPaSekAUlkqVKGlBoD8Ycyp0/TVgwQMLDCSPrqANyZXqjfdAGRtFOf7JM 2dTQ== X-Gm-Message-State: AOAM531YKTgWrIjNMdF2FIifOxwB8aHMbamc45Xh1p4QXinj5I996hfw ghYZ7GqncFITgWyrFriwlci3scLfdno= X-Google-Smtp-Source: ABdhPJzTY+f5rNaM0orpqi0uZ4w3QyEirvbJ6tTeudPuiQOeF1axLvsSTOdyJeJ+2oHqRErv8kcQzA== X-Received: by 2002:a17:90a:ab92:: with SMTP id n18mr15472855pjq.72.1622451254316; Mon, 31 May 2021 01:54:14 -0700 (PDT) Received: from [192.168.1.183] (222-154-31-8-vdsl.sparkbb.co.nz. [222.154.31.8]) by smtp.gmail.com with ESMTPSA id m1sm10481490pfb.14.2021.05.31.01.54.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 31 May 2021 01:54:13 -0700 (PDT) To: sebastien.miquel@posteo.eu, emacs-orgmode@gnu.org References: <9e9ac180-7b77-3e04-87e4-7d1e9e02856e@posteo.eu> From: Michael Gauland Subject: Re: source blocks mangled when edited Message-ID: <2000f8ce-0f6a-91e0-f764-e65f3cc46937@gmail.com> Date: Mon, 31 May 2021 20:54:10 +1200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.0 MIME-Version: 1.0 In-Reply-To: <9e9ac180-7b77-3e04-87e4-7d1e9e02856e@posteo.eu> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-Language: en-US Received-SPF: pass client-ip=2607:f8b0:4864:20::1032; envelope-from=mikelygee@gmail.com; helo=mail-pj1-x1032.google.com X-Spam_score_int: -26 X-Spam_score: -2.7 X-Spam_bar: -- X-Spam_report: (-2.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, NICE_REPLY_A=-0.618, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1622451283; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=UyKcOGSReQoHfxxcIqwCPL+fLjCSemj9gKWY/ZISA94=; b=IAz0BxjoS5YCh9Ku68WJtiz2LLhUB4T1WbSZd11qbViu1YBw4Z2ZhmDlnWJEVPFLScdEr0 GY3x18CoQcooXfpxsgqPUlTKDhHpUjxDkveDzzbanWuocyMzzeQnob/rA2gKX5a/zbf4OX 2QV4FsTSS497PtcWYfU0RCypo3ufY03+mOChu73wBXfhIdePw7LAY+/LKaYSDkS/vw5jkT DrAUATh9F8k9aXrJCfoAEInguvMWtEBtmiKUzv2XkiMxd/tZ77fdsRV1is/4g6BpIfRB59 VW38VUcYrcBoWH9e1+xlniqh5V6EISyBQRFuw2/zolU7vfMWEYAR8184wqFsMA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1622451283; a=rsa-sha256; cv=none; b=YKRVL0PTplPq+0Hnltyi/Km/u9rj20XQhSbheiuHSkXuXoyBEoa4h0gnuOG1DJbzcapPGH ipRh/cWUt8rU58ByaoA245Auoqr4TQ0yMSqS8tSWJ/4389Cocp93osPoe81N8nKirqrWEs o3z0k1jpazOj+6P3a+MsKCz9yke+QBFKwP1SpsCtnqubv3P8YtB5wQ53aa8JKDPpqah5yz dTjmQa6D9n/m6LXU+mDo7ExpO/P4tzU4M8wm28V3906j2zvFVeUkNXRUUkL92vSQuTe6cr 3eLNQHXWsjhw5HWKJYR8flY+aRZjbkWr9cjyUImkkrYGVHsVugKHu3gyyglSDA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=ZPrCPfNk; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -1.63 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=ZPrCPfNk; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: E81A0DE9A X-Spam-Score: -1.63 X-Migadu-Scanner: scn0.migadu.com X-TUID: fiOzqnhERx2T On 31/05/21 8:15 pm, S=C3=A9bastien Miquel wrote: > 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` ? > I didn't instrument the functions, but found that there are two places that test '(if (version< emacs-version "26.1"...'. If I change that to use "version<=3D", the problem goes away (I'm still running 26.1). I don'= t know whether this is the right fix (the underlying problem may be a quirk in my system, and this is just masking it).=C2=A0 I'm hesitant to submit a patch unless someone else can replicate the problem.