From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id yNO4CuTLHGKnCwEAgWs5BA (envelope-from ) for ; Mon, 28 Feb 2022 14:19:32 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id eKifA+TLHGIJMwEAG6o9tA (envelope-from ) for ; Mon, 28 Feb 2022 14:19:32 +0100 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 CCD343826D for ; Mon, 28 Feb 2022 14:19:31 +0100 (CET) Received: from localhost ([::1]:33872 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nOfw2-0003HX-E6 for larch@yhetil.org; Mon, 28 Feb 2022 08:19:30 -0500 Received: from eggs.gnu.org ([209.51.188.92]:58138) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nOfrZ-0003GL-Of for emacs-orgmode@gnu.org; Mon, 28 Feb 2022 08:14:53 -0500 Received: from [2607:f8b0:4864:20::d34] (port=42867 helo=mail-io1-xd34.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nOfrY-0003lT-6t for emacs-orgmode@gnu.org; Mon, 28 Feb 2022 08:14:53 -0500 Received: by mail-io1-xd34.google.com with SMTP id r8so996299ioj.9 for ; Mon, 28 Feb 2022 05:14:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=RQnIjAqD88dJ6L4sQexIp2uf7lS9udZdcgmWUo35JNw=; b=YY82c4WUoRdKg2o6ogU4VVFRGLgKl50Dwr7Mp/DwJWpO6t61WfdNCwMb/NXCCGEuZZ r7KcJJvHD7y8k/s8VfX49W+9rCPOMNCyAF/VEIVjXo9/G0vhuFf6L8ODXcyCo4ijAmZb 5v/30wtchsOs9AwbqEKDFmOt1iUQwWcHHCuJKYIRXtXxzro2FXKan4B91Bq3wzVn8CoV VR3kxyRU+eg+mM4RuN6ST00AJC1CDiS5larYjQTzCMrSVA1tePaaFoRp7h0+lhfBEns0 QddOC3021amSwvqtXEXKq5V3afdMwnoqFGjPSBe7s3e+nd62k683/Rk7CdwSRs1XkCen qC4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=RQnIjAqD88dJ6L4sQexIp2uf7lS9udZdcgmWUo35JNw=; b=gubQCuVZYOf0+x4YQtDTU+SvQrWVA0V85bi6C5SFOUXq0Ih8Wfzuj3pkJGLHtQWes5 OcMlCLo5i3Kh2ulXj6du1SF1pm8M5l9vUMtTAgZx5aSu0UsvEtwKWMGl+S5icpuUCgEY ouznd+tdhqHpTJcWYUmD+xIo7/qiApn94JOKnfK5TmdUzUN1cWHHiOUa36hCeuoKvk9b lJyhI99d0Y25IuG9MSoJ7ZqCxxkAmRNCnZvj4aIfdWSvECr+Wy6YlYkq5pAJvMu35nM1 pU+rNw+9FAzZIEMWBmFBZJDIjjR34N/XtTBXtMWxklum7kjEZHuwD7E+eIHKMbog2nuH ZR6A== X-Gm-Message-State: AOAM533LW7QJKlH4m0hygndGdQ/oiyag0GOY/HbTo7FovXDhyOy262Qc 9QXdqvQDgWfDUgR9jRcIqAbWVaeX4RD+P7Nm79vu+udZvrs= X-Google-Smtp-Source: ABdhPJx8sZC0VEwUYMwFQsB2dsw1X1c9HuqxlWoFQoLCTzayluAw/Dq11Z7UuLwdqSXQQwXM97pLclKEXs77ROR3EaM= X-Received: by 2002:a02:b903:0:b0:30e:49cb:e65c with SMTP id v3-20020a02b903000000b0030e49cbe65cmr16732945jan.164.1646054087444; Mon, 28 Feb 2022 05:14:47 -0800 (PST) MIME-Version: 1.0 References: <87pmnagei5.fsf@nicolasgoaziou.fr> In-Reply-To: <87pmnagei5.fsf@nicolasgoaziou.fr> From: =?UTF-8?B?RGF2aWQgTHVrZcWh?= Date: Mon, 28 Feb 2022 14:14:36 +0100 Message-ID: Subject: Re: Protect Org export from auto-formatting hooks To: emacs-orgmode@gnu.org Content-Type: text/plain; charset="UTF-8" X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::d34 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::d34; envelope-from=dafydd.lukes@gmail.com; helo=mail-io1-xd34.google.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 5.0 requ) BAYES_40=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 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 X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1646054371; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=RQnIjAqD88dJ6L4sQexIp2uf7lS9udZdcgmWUo35JNw=; b=pekfM/yvA+ouT3gQwOZ6mW6RiLgjjHslbMkIUHTE6Shhsm9popLC/DlCJ7/JJN6JViEZZW Q8XThjaCD7OUxyJyAup1RAS9+NkVpvYVDOwdexYkLXIZ5gNk0Wxeqd0UEY6OF6Axi/p7rg 9SctbVIiqaRuxFmxMeMWzbymAy2wyIR9Q9ahE/i6M2GEmEeti6XBGkjhXq4DEyIC+StrJD ph50bMosR9q+Mmur/A2KXjH8yCq+ThYBwRP8iZRd6y7XIBx2du7uryEuxwigUD6NxhPpQK 6lqs5ryfOMXvsii2tmGl3OXDvG+5H+hlCUfNMqOApVugVWO6M50u2g5T7X/1dw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1646054371; a=rsa-sha256; cv=none; b=Wv2IZPRZXC4GhnGVOD7zcUqD7L9aCNoNrDzEiKp1W/7CSZuDHFPY5301uiCk+JAtjYoK1z 4cmd3FOLyESjCu8Oisz1idW+tH5pF/JaB1H2MItfH2D/0AGacKUgLnjayRne7i1RInzNKo AxsTBxJVKW+4M3+571ZQw40Blsv4+5hgrl/zRtGyXtgPQ8I5ni1x/JYmohwq/7Ef2cf8yx Arx2BdY7qeKIT/fsr7WnZp5ODtU5UBmeOVkcV/uiy6aSKYpPWCSEd0pq/Rdw03ilg11xpw lhRSnfs9APEWM7xoeN2R+44okQp+3o90lUWG7fqvAVnU2ai2k6/hVSCQm9/ajA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=YY82c4WU; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -4.30 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=YY82c4WU; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: CCD343826D X-Spam-Score: -4.30 X-Migadu-Scanner: scn0.migadu.com X-TUID: MkcUFsc+JAjm > What about using `write-region' instead of `write-file' and not touching > `set-auto-mode' function? Thanks, that's indeed a much better way of doing it :) One can even avoid the temp buffer altogether and write the `output' string directly with `(write-region output nil file)`. Shall I prepare a patch? Or would you rather do it yourself, since it was your idea? Best, David