From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id aPyqHQ/xI2X+5AAAauVa8A:P1 (envelope-from ) for ; Mon, 09 Oct 2023 14:24:47 +0200 Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id aPyqHQ/xI2X+5AAAauVa8A (envelope-from ) for ; Mon, 09 Oct 2023 14:24:47 +0200 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 0378232B49 for ; Mon, 9 Oct 2023 14:24:47 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=I5+xjWTd; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1696854287; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=b7y2wYokSHkUhvL3QurcIgZh+LHTNmzgatxgGIE9Mw4=; b=L1xUWzn1wsvm2wkWW4+Al2u8mL/QvR8zAFSkRJur7l5+EdDcyZLv4P+ii3ka0BZXmneOA3 u17ntUc30XksqMnzvcQr4wfoM8cjjCahV/ta6eyclGistdodtGfsjQabmV12EqvvEJ+oby FL1gQodoB/QL07TVrrd9nMCMBLuU3+hxODfMYgxwiQgjobFi2UChDqOdt75l/C72Nk66yu XzNn2zAkOef7An/N2Kzr9+Sy4xdzdr7Ma5pZTWPIkzk1SCerCMnqEC/LjsURGiKoFJ1JH7 NZM0LiBLKLepZrJ/4nzz0Uo2OdXK15ItL18vAqSr/4gIdpp7F4XI/ELYllIoWw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=I5+xjWTd; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1696854287; a=rsa-sha256; cv=none; b=miZOwMU8NTXAa8QjX5gfkmsfJ9x6GSfxJF5m42oGNpcM3xRVv0Jc4thvlsgvte4hHsMPhk 1cVFzQFYa58iYFLja560CcotcHzcL4KgdPBaXJwn3GIrbTIJ7Jv7NxkUbWnUjs17kmnYtF 5ZvGQ0fee6ZKZxN6V1IdKNpA6WArfNMSPPUAcoNBkeaKIRZiRsTCA3dSD23AwhZu4Sz4iM UQlKs2LFCAERBupeVYuAXvIWUqeGIxzqMSmkzyoln5BPLEmJCFmH0e3wjmS1EeD6LGdCKE nhPCHPNkeqtWuPEEEVgonwqWHT4RaWixKL098FfDbtVR+6GMPXygQZrDqc5H7A== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qppIb-0005FK-6k; Mon, 09 Oct 2023 08:23:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qppIW-0005Bq-SL for emacs-orgmode@gnu.org; Mon, 09 Oct 2023 08:23:46 -0400 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qppIV-0002b6-7q for emacs-orgmode@gnu.org; Mon, 09 Oct 2023 08:23:44 -0400 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-40566f89f6eso44703535e9.3 for ; Mon, 09 Oct 2023 05:23:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696854222; x=1697459022; darn=gnu.org; h=mime-version:date:references:in-reply-to:subject:cc:to:from :message-id:from:to:cc:subject:date:message-id:reply-to; bh=b7y2wYokSHkUhvL3QurcIgZh+LHTNmzgatxgGIE9Mw4=; b=I5+xjWTdjM5bEhMtYAy0PpC+h/E/84ilmKsJpGlt6GT0A3QXukMfhimg1bzRvPDbBE H3NfMcPB06Rih0+e+6ssIfhfDSgF7ZmTHXSnQOYe7LgSKQUsmKtrZGBts9veWtzoWsVU 9tuTXkbvBvAGuxCEhJGpX9NsaAiYIv+KGPLihD/S5l8bv+PrharvUDrsQDrjz5ycawtp +QV7ibM5mCVtS0Y5xFLx1ZMv3DYU3ommLl/zxGdef+3Ai6XHfQ6leTX44fFutZYAdM+p FLc1QjDVnfRoenmlFpnOT3qJ27KQbyfxhfH0gscXM22bY1+qmalZVLW76fBHtGbWRjiw bPVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696854222; x=1697459022; h=mime-version:date:references:in-reply-to:subject:cc:to:from :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=b7y2wYokSHkUhvL3QurcIgZh+LHTNmzgatxgGIE9Mw4=; b=jx6FozQZMK44nwZj+XfOEIMuqC63GrTlYZbHL+T/9uVuc7KB+bc/U+wrq3nMNKNozM SAcZaCx/2SY1xox9Zb4Y7eASlg+uGDgaenf0r84d1AYfnTPikZn+GSnpwiWwmt20EbPH ywd0nyFJBqNGAE7vqvLF+tSTSsHQ2BTWfyZWmAFCiRxuI3cX9hNTf2YF8zEBAKvuBYsP WxbG7zghTcZ3wz1SYcD8wQvLMYmyUCBWRzxV1gN3Uyjn/rK5th6IloU4WrR8R2V9EWXU qdX+oj5chfo/GfnXh2h12yIobq269ATLAPSqe1/25Bjo4Msw1MsZnNeM+TPuESZCUNHu ykyA== X-Gm-Message-State: AOJu0Yz2w+EidRYi8YPbyMgZ7fLYf2KIphXfUK5H6pgWPSEphwOZVLy4 2MiHzU8Be9H2GN3Vp/vwFNI= X-Google-Smtp-Source: AGHT+IFMw9mTsiMmbhoEbar9lRdjVnDxF+5gkVuE9I8gKv3QJU6fYxsWR0e6taesr0xWRrVM6E8ajg== X-Received: by 2002:a7b:ca4c:0:b0:3fe:1b4e:c484 with SMTP id m12-20020a7bca4c000000b003fe1b4ec484mr13131365wml.5.1696854221434; Mon, 09 Oct 2023 05:23:41 -0700 (PDT) Received: from keynux ([2a01:e0a:505:3460:169:7511:f49a:58eb]) by smtp.gmail.com with ESMTPSA id w18-20020a5d4052000000b00317e77106dbsm9499288wrp.48.2023.10.09.05.23.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 05:23:41 -0700 (PDT) Message-ID: <6523f0cd.5d0a0220.2bb6e.3bfc@mx.google.com> Received: by keynux (sSMTP sendmail emulation); Mon, 09 Oct 2023 14:23:39 +0200 From: Bruno Barbier To: Ihor Radchenko , YE , Max Nikulin Cc: emacs-orgmode@gnu.org Subject: Re: [BUG] No newline at end of exported HTML file [9.6.6 (release_9.6.6 @ /Applications/MacPorts/Emacs.app/Contents/Resources/lisp/org/)] In-Reply-To: <877cny25x4.fsf@localhost> References: <877cny25x4.fsf@localhost> Date: Mon, 09 Oct 2023 14:23:39 +0200 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=brubar.cs@gmail.com; helo=mail-wm1-x335.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, MSGID_FROM_MTA_HEADER=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.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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -9.50 X-Spam-Score: -9.50 X-Migadu-Queue-Id: 0378232B49 X-Migadu-Scanner: mx2.migadu.com X-TUID: ybTdKtEXMV3j --=-=-= Content-Type: text/plain Hi Ye, Ihor, Max, The change seems to come from this commit: commit d7a55bbd537314d2776b082bd92a1a08b3edc84e Date: Wed Sep 28 12:07:14 2022 +0800 org-latex-export-to-latex: Do not suppress major modes in babel It replaces 'write-file' with 'write-region', but, according to the documentation of 'require-final-newline', 'write-region' ignores 'require-final-newline'. See attached diff that reverts the problematic change. In summary, before this commit, Emacs was fixing exported text files (HTML, markdown, etc.) for free, adding a newline if needed for text files. It's not anymore. I'm not sure what would be the best way to fix this though. Bruno --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=diff.patch Content-Description: Revert bug diff --git a/lisp/ox.el b/lisp/ox.el index f8ccd2a9f..5ff105d3b 100644 --- a/lisp/ox.el +++ b/lisp/ox.el @@ -6893,7 +6893,7 @@ (defun org-export-to-file (with-temp-buffer (insert output) (let ((coding-system-for-write encoding)) - (write-region nil nil file))) + (write-file file))) (when (and (org-export--copy-to-kill-ring-p) (org-string-nw-p output)) (org-kill-new output)) ;; Get proper return value. --=-=-=--