From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id mM0qKXtktGB0OAEAgWs5BA (envelope-from ) for ; Mon, 31 May 2021 06:22:19 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id MMxSJHtktGDQagAAbx9fmQ (envelope-from ) for ; Mon, 31 May 2021 04:22:19 +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 E5B5427701 for ; Mon, 31 May 2021 06:22:18 +0200 (CEST) Received: from localhost ([::1]:44562 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lnZRQ-00088H-Mg for larch@yhetil.org; Mon, 31 May 2021 00:22:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58986) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lnZQz-000881-8p for emacs-orgmode@gnu.org; Mon, 31 May 2021 00:21:49 -0400 Received: from mail-lf1-x12c.google.com ([2a00:1450:4864:20::12c]:41494) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lnZQx-0001Xd-Fv for emacs-orgmode@gnu.org; Mon, 31 May 2021 00:21:49 -0400 Received: by mail-lf1-x12c.google.com with SMTP id v8so14839029lft.8 for ; Sun, 30 May 2021 21:21:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=lr77XNFWO5DIqdZ0zIleX9BEx2zSxHUNnSd2lhEeVj4=; b=YUUcPwI14aA0MqZeKD2mcmWPVVZWTevq0LcxlJj/SCqCqmIpW70SRp3mS0PUbdwHJA bE3zodAQz+ineciwiDQIWaj/z/RGkRxrAXn5RB+5Oe9y8Utsc0jsSiUtMAHeMoI9WIoJ 9sAmaK74gNwfS4JsksqpbWqNafGRmN3LpL5imymSFuNX6ZfNg9jRIThCyVDWwJullz4P Xn/MrWJRcBiA+JAoNv+gLEEy+Aq8p7TCrPc8/dXAE+lL9v6fHi6ldO6cBnTZeHfYodD5 SUpcozDuXbvVByIWpA6yvE8Xtl8tLSFGvx81CPdtTu11x/TXNDiLI2UY6EihWhaq1O7f 9ygQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=lr77XNFWO5DIqdZ0zIleX9BEx2zSxHUNnSd2lhEeVj4=; b=CDrBzQykTIdd6xIa9QuRxwxVraI4sx/1j6AwAy/zBwLVVeMSqZ2qmqhWpkgUAPrpzd +WfafV+HyX4tUEiKj7hysvN71B7SPPgn1IgLj8ly/4oH7OYlPmw5q5rpG9T2zSx0kPbJ 3nxjIlIrFWWFjnuVNjuMnbM2gaVajrF9cg/vjM7hgmaiqpBEQvWZEMAI95VNonwcGNde t5mLXaENAS3wwvUkipBmVWTtDMpC3HxDVv1a9qsWGdV2wRDCRo1GEMhnn40LGGC6zQXU q4ynnUzgvudL0ea5buOMgnOA2fWUnfqLcZOQVladsSz84po1OlH6mVasgJjj7jwRyCry LHLg== X-Gm-Message-State: AOAM533FJmi/dSXnb+4dDJAa8T1ht86OhSOi9tS1ZC0igXNc/cLLUIjx be3QS7xAkg4TigNmUUvO6DvB3fljclYqR+fhNAw= X-Google-Smtp-Source: ABdhPJyYD79t9OqV2nybs0Hu87dmoApa0TIQf6BzzLKH08VJ0ce66qbSbkXOhkSFY3bkgEO3CAjdSuWk1Yn2FW0t5zA= X-Received: by 2002:a05:6512:2108:: with SMTP id q8mr13296001lfr.169.1622434904401; Sun, 30 May 2021 21:21:44 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:ab3:6d6b:0:0:0:0:0 with HTTP; Sun, 30 May 2021 21:21:43 -0700 (PDT) In-Reply-To: References: From: Samuel Wales Date: Sun, 30 May 2021 21:21:43 -0700 Message-ID: Subject: Re: source blocks mangled when edited To: Michael Gauland Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::12c; envelope-from=samologist@gmail.com; helo=mail-lf1-x12c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, 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: , Cc: emacs-orgmode@gnu.org 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=1622434939; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=lr77XNFWO5DIqdZ0zIleX9BEx2zSxHUNnSd2lhEeVj4=; b=iIYvXyYL6HJjD/PTfq9LnnbigE0oJFNeqWOtXw0Y04J9kLlSmrAXPC6hIoCJxSHx9AKkZg 2nNNty/pEy/2yq1f0GILVLRewG0vkYrDve/xoTY/F7vuQ3uUwmxzerf3kbjSi94jmXseuW MIXO7Pssl6wOv1lPNeAWsx7zHrMUIQhEfVLM5mOOvF3f9fqfDYkIpAKk/heNZd5f73OeEh ZjLfa86iLdsA5zV0DDdlLJIFxFBnzJMqVUIdqCiXCl6i15aZlmZsa9nr1h2582ESwz7yy8 V/jzWB/vpyD/B8aaaZPsnaA4iR73CS/qsV8KSfiMT/pmOoQdNfq8hsyEjZzxwQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1622434939; a=rsa-sha256; cv=none; b=T19TNs3RYOH4ozBguMkllQfqUvuv+UnMgq4GbMo9RlgY5gcv8XlkwpiTkP9M2H1SKOQSP3 rlmuYzStBhlFcuqvvPk/2GJNfyNLGWkVoMJh1hvl1dJI1X6hEz/tNJ6HvUx6xKasR5NnY+ bOSQMQ1R+igXLtG5WlBiqrzeGxYKzG8V1dkQ6guBCXVRSLKTmbGwSyy3BlwHnswBX5rila /EK6QtGVV/2FSeDU5+NTCkOW384Xyjeftu6wg1chA6xQmxL6DyR3ct/hrlnE2/2p7yudNm 8rdLrpBs+D28Ieh3vNe+ugFlJDfjTGT5Ck7PSKb0HuC9Q9S2hNFC64W3/QbU7g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=YUUcPwI1; 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: -3.13 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=YUUcPwI1; 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: E5B5427701 X-Spam-Score: -3.13 X-Migadu-Scanner: scn0.migadu.com X-TUID: G7GCzTWn86D5 idk if this will help as you probably know all of it already. butg you asked for any help so here goes. i run maint, not master or any emacs versions. weird that you are missing 3 cols? =3D=3D=3D here are notes on my workaround which wfm in the meantime if you are willing to do the same thing. i was having trouble getting exported indentation for example blocks. ;; fix default for source and example block indentation ;; ;; when you edit a source or data block, org will by default ;; remove some leading whitespace and then add 2 spaces, so the ;; whole block in org is indented by 2. ;; ;; (the deleted rectangle seems to be the maximum amount of ;; whitespace common to all lines in each block.) ;; ;; initial tabs get converted to spaces. example blocks get ;; unindented during export incorrectly. mistakes are possible. ;; this as non-nil prevents all that. see led for more. ;; ;; we EITHER unindent all and set this non-nil, OR put up with ;; stripping of leading whitespace from blocks where we don't ;; want the indentation stripped. ;; ;; /i prefer t./ it is not possible in babel to indent without ;; having the special feature of removing the whitespace ;; rectangle. ;; ;; you can use -i to locally do t. there isn't an arg that ;; locally does the reverse of -i. i.e. to do nil. ;; ;; i have gotten comfortable with no indentation and imo it is a good default for newcomers and does not surprise. ;; ;; source blocks might actually work without indentation even ;; with the default value, but then when you edit it indents. (setq org-src-preserve-indentation t) ;; (setq org-src-preserve-indentation nil) ;; ;; only has effect if org-src-preserve-indentation is nil ;; (setq org-edit-src-content-indentation 0) On 5/30/21, Michael Gauland wrote: > I've stared having trouble editing source blocks.=C2=A0=C2=A0=C2=A0 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.=C2=A0 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 > > --=20 The Kafka Pandemic Please learn what misopathy is. https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged= .html