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 6B5XENgceGG/PQAAgWs5BA (envelope-from ) for ; Tue, 26 Oct 2021 17:20:56 +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 yLngC9gceGHMUwAAbx9fmQ (envelope-from ) for ; Tue, 26 Oct 2021 15:20:56 +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 8214D1B6C1 for ; Tue, 26 Oct 2021 17:20:55 +0200 (CEST) Received: from localhost ([::1]:33740 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mfOFy-00048R-I9 for larch@yhetil.org; Tue, 26 Oct 2021 11:20:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42290) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mfO0D-0000ae-97 for emacs-orgmode@gnu.org; Tue, 26 Oct 2021 11:04:37 -0400 Received: from mail-pj1-x1033.google.com ([2607:f8b0:4864:20::1033]:44963) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mfO04-0002aO-HF for emacs-orgmode@gnu.org; Tue, 26 Oct 2021 11:04:36 -0400 Received: by mail-pj1-x1033.google.com with SMTP id oa12-20020a17090b1bcc00b0019f715462a8so1938662pjb.3 for ; Tue, 26 Oct 2021 08:04:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=7bF3Ff2LRKv1vpwe/DrGSaqYDMxKcg7hUuofM9L539k=; b=Ei9KhZqwij+5NhRr2ydJVo/Cg+ypd83Jioue6YJ+69wWrm9/YAZTAl0cKURmwJGv1h /m9vcdrMvMkOODv6ca0o00WSbWFddtTQ3/Xdu0hP9SqrOpdR3qD+F3wB5LwQsh5zNHqD UNvQRajlyFKPfxd5oeJewkwaugngb3H2kbX488d92JMp49g6A/dvsyR0jmG6TLNWpvfz ao78BWqXfDoiBvepxr2w/ZoUAQgalRyE4k4iIAsRqKa9IRs0cTsS/OVEHiL6qFR0yaqU QUC1BCiHMT+vvnyPAnOHkGorrQilnRLoroOoFeJ/F/GIFyk8HZUcNqkIWkP25jguTlLR pPog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=7bF3Ff2LRKv1vpwe/DrGSaqYDMxKcg7hUuofM9L539k=; b=Nnnjyed2Tw87qhWmByHmxGiBAuVm4LLLXNsdpP0WgdAl3powDxugK6Is94V1hn4dCp QGRUMgD10dgtMQo+V1Om1CzEK/rG/kxCoHWbgYq/SbSHxXwMLPMYMWtfshvAWa7+VYie AjGrrWDcshMm6vu1y4CM5tTBU0tdN2HSI7fhoxjkFW7UwiB0jArjaY+IDz5xbS/DmxYN +2iYIBNBP4bxz87O4QwdSDI0YUkgBf9HABxQqzV79CkN7+pZTeJVbRjarPzn5+fcRtFY WvkBr6DiFDd5HUVG8lpYN6FKJU+DKnWRpHs6FhUrUlYoLB4BgDpG3Atg2XEFFH3Rfhs/ WxkQ== X-Gm-Message-State: AOAM530b8cXiKapCO6fR7UMPTcotq4glA01QjYe1d7DTtC7UsV5JDBsD ggdWhmdK/NuTnJH68+eMDDs= X-Google-Smtp-Source: ABdhPJzcMr8H+/Gnd45lQJUSY58VrcT0b71PhljUbxNVjH2cmQIygjH3o4xFV4kwQjIl2Naja/610A== X-Received: by 2002:a17:90a:1a4c:: with SMTP id 12mr44394766pjl.89.1635260667120; Tue, 26 Oct 2021 08:04:27 -0700 (PDT) Received: from localhost ([103.125.234.161]) by smtp.gmail.com with ESMTPSA id c4sm13584493pfl.53.2021.10.26.08.04.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Oct 2021 08:04:26 -0700 (PDT) From: Ihor Radchenko To: Colin Baxter =?utf-8?Q?=F0=9F=98=BA?= Subject: Re: org-persist warning when archiving In-Reply-To: <87fssng83r.fsf@yandex.com> References: <87wnm0rw3b.fsf@yandex.com> <87sfworvq8.fsf@yandex.com> <87cznsuj05.fsf@localhost> <87fssng83r.fsf@yandex.com> Date: Tue, 26 Oct 2021 23:05:52 +0800 Message-ID: <874k93vnan.fsf@localhost> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2607:f8b0:4864:20::1033; envelope-from=yantar92@gmail.com; helo=mail-pj1-x1033.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 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_ENVFROM_END_DIGIT=0.25, 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=1635261655; 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=7bF3Ff2LRKv1vpwe/DrGSaqYDMxKcg7hUuofM9L539k=; b=g/4RabXWhPZEYIOjkpVGWQeLJz2orNmrm/sKqt6xPITnE8BjfKMzabOdh0mD3UrQ/2tWND W6z3yJIole+BcQNgaLCQw3Pp2jMR55fvY2YoB3zHrFOt6YjgqgfhK4m94pbN5Aw179ZYP3 LulgcgntvsW5romYOFOrNnh0IOXbszv5MewlZAXNfd2mk3Tc+lQX16OJ/3fR4mycF4SErk JgAGM1IQBtGkZZC+MdPQxir+59Nn0tuNWQGUH/kUVA1SavUHbcruKrBIMSdJgdzFzvbtNW AS++vJ23QzupueUX4Qw+6evupfPaLCnXUx0vka15km8NyciP6gdYu7jp4eBsDg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1635261655; a=rsa-sha256; cv=none; b=rrJoCjHVt/fJkJ3GgPRd8AKGT9NU2BqoEMoupQX0/a5E8T4V+Gt4LruTUpWP58nGx/vVdP q5MfXgGfbvLqz2MU0WXrl4UyWWw9bZ4MHsBSI2zPlZI/HlsUEtLKeV/n/kTljv1aadXbWb Fke5nmxwtISL/os0IbRaB/2AN7yJx7kfLkNeDZQn64RCP1A8zr1+mDSpvQ+jMKAQWkltW/ GPhJJ4Lkntu1jV1MRFnhZNqOslFDQ7jfMup8w8nosd9x6isntqzaVP9R1FUmK1I3XPGmoM 9VaR0KIB3EWhYovlvrP4Rgjv8pYerYFXGYjhehHG4EsCgDRirUd6vfV/yyqZJA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=Ei9KhZqw; 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.26 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=Ei9KhZqw; 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: 8214D1B6C1 X-Spam-Score: -3.26 X-Migadu-Scanner: scn0.migadu.com X-TUID: Fxvnuf2uL6cb --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Colin Baxter =F0=9F=98=BA writes: > I'm running Org mode version 9.5 (release_9.5-178-gcf8906) on > emacs-28.0.60. Unfortunately, I could not apply your patch ('patch would > not apply') using either 'git apply /path/to/patch' or 'git a > /path/to/patch'. Oops. Try the updated patch. The old one was based on my working branch. Best, Ihor --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-org.el-org-mode-Do-not-inhibit-after-change-function.patch >From 722f595c7bef4801e7d0e5f476ecbb9eb63a16ab Mon Sep 17 00:00:00 2001 Message-Id: <722f595c7bef4801e7d0e5f476ecbb9eb63a16ab.1635260679.git.yantar92@gmail.com> From: Ihor Radchenko Date: Tue, 26 Oct 2021 19:19:57 +0800 Subject: [PATCH] org.el/org-mode: Do not inhibit `after-change-functions' when loading * lisp/org.el (org-mode): Let-bind `buffer-undo-list' instead of using `org-unmodified'. The latter suppresses org-element-cache handling of buffer changes. --- lisp/org.el | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index 21b2c5470..e2a02c115 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -4940,22 +4940,22 @@ (define-derived-mode org-mode outline-mode "Org" (= (point-min) (point-max))) (insert "# -*- mode: org -*-\n\n")) (unless org-inhibit-startup - (org-unmodified - (when org-startup-with-beamer-mode (org-beamer-mode)) - (when (or org-startup-align-all-tables org-startup-shrink-all-tables) - (org-table-map-tables - (cond ((and org-startup-align-all-tables - org-startup-shrink-all-tables) - (lambda () (org-table-align) (org-table-shrink))) - (org-startup-align-all-tables #'org-table-align) - (t #'org-table-shrink)) - t)) - (when org-startup-with-inline-images (org-display-inline-images)) - (when org-startup-with-latex-preview (org-latex-preview '(16))) - (unless org-inhibit-startup-visibility-stuff (org-set-startup-visibility)) - (when org-startup-truncated (setq truncate-lines t)) - (when org-startup-numerated (require 'org-num) (org-num-mode 1)) - (when org-startup-indented (require 'org-indent) (org-indent-mode 1)))) + (let ((buffer-undo-list t)) + (when org-startup-with-beamer-mode (org-beamer-mode)) + (when (or org-startup-align-all-tables org-startup-shrink-all-tables) + (org-table-map-tables + (cond ((and org-startup-align-all-tables + org-startup-shrink-all-tables) + (lambda () (org-table-align) (org-table-shrink))) + (org-startup-align-all-tables #'org-table-align) + (t #'org-table-shrink)) + t)) + (when org-startup-with-inline-images (org-display-inline-images)) + (when org-startup-with-latex-preview (org-latex-preview '(16))) + (unless org-inhibit-startup-visibility-stuff (org-set-startup-visibility)) + (when org-startup-truncated (setq truncate-lines t)) + (when org-startup-numerated (require 'org-num) (org-num-mode 1)) + (when org-startup-indented (require 'org-indent) (org-indent-mode 1)))) ;; Add a custom keymap for `visual-line-mode' so that activating ;; this minor mode does not override Org's keybindings. -- 2.32.0 --=-=-=--