From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id d/zeLr7GYGFI0QAAgWs5BA (envelope-from ) for ; Sat, 09 Oct 2021 00:31:26 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id gFsUKb7GYGFbJgAAB5/wlQ (envelope-from ) for ; Fri, 08 Oct 2021 22:31:26 +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 E6166341FB for ; Sat, 9 Oct 2021 00:31:25 +0200 (CEST) Received: from localhost ([::1]:35846 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYyOi-0002ET-6b for larch@yhetil.org; Fri, 08 Oct 2021 18:31:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55598) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYyNm-0002E5-UG for emacs-orgmode@gnu.org; Fri, 08 Oct 2021 18:30:26 -0400 Received: from mail-qt1-x82c.google.com ([2607:f8b0:4864:20::82c]:34424) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mYyNk-0006VJ-OS for emacs-orgmode@gnu.org; Fri, 08 Oct 2021 18:30:26 -0400 Received: by mail-qt1-x82c.google.com with SMTP id m26so11018668qtn.1 for ; Fri, 08 Oct 2021 15:30:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=uPOl5Zf6tsIwRuD/f8ZM4Vk6cJ6wcwBL3dtOtdHyW/M=; b=FzKAyAJ2z6h/K5nIrZhdpaKpldSFaUoi16W22dSes4haN2oJZwC+oGNeMdtfV59R+P 9YmjOo+ltlr9qP0Bk9k8rB4+I1j//WxyRHDB+FnkzFPVpdVwXkAv6GGvG7ZtK5qgXlW6 PrhfSbpcUugzJCg807X7i7GZ55ZzOaigDXlZkkNq7fJ1A4QNNhqLxVIRUE2wnt1YJWfI 2Wq0WDxMfUZK8xwIWfvs9pvoJc2GFxCd8rebt97XnWg3ixsPlDh8slGpItglVX0cYdx7 uxu/lUxRb/bXAPAbpyD60feTQffMWUcKus5mQ2d3UdFE0yGfd1447sTK5Vxda2Sn6ukG lRHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=uPOl5Zf6tsIwRuD/f8ZM4Vk6cJ6wcwBL3dtOtdHyW/M=; b=rtOYX2OL+4zf8GzfyiEjt8k8eoCOIO4TTrZ9QBu+Ej90FTZA/ce33XXa/Ovl2vvx1z B0XpYq6Ls2qRJAcUdzwUp+kXxce0T3+AOPg6qMV5ndIGJJRncRpb9JgUumG2w/6yFtPy 1sGvO3SFxER7Uq5v9vb03bKVZFxSlAes3mbBvzNvaC9ErWMTGLCjGdY1GK2VU6Jqtof6 oY3qR5jqGbSCgG7hWr6xOVKvXMoOy6NDmeOPMTot/Y8udvvd9v3pena806pryqAa5ld2 GvJXLEMEGipTuGka4rQQPajrloSwvphRZ9rP5Oi0dXE/cAe1nrVc7Nco3ZBCtdOtf9BI XIZg== X-Gm-Message-State: AOAM533XdYbtArE+efXM8QDhflVBU1EeNQtndlb4HMgKMKtd0OnaR/z3 cF73kTDXT0nXFA3kKbhwTJs= X-Google-Smtp-Source: ABdhPJzWGnk7b5yANDpimTkuX+MPF2w5jZYIhYj0D80gKh9cIEZvk7jxeQK7GcvUMYOE2Ngnh+fP8w== X-Received: by 2002:ac8:74d7:: with SMTP id j23mr1050667qtr.5.1633732223722; Fri, 08 Oct 2021 15:30:23 -0700 (PDT) Received: from smtpclient.apple (2603-8001-7a00-01a0-e5f7-945b-c8f6-fc77.res6.spectrum.com. [2603:8001:7a00:1a0:e5f7:945b:c8f6:fc77]) by smtp.gmail.com with ESMTPSA id o16sm487942qta.54.2021.10.08.15.30.22 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 08 Oct 2021 15:30:23 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Subject: Re: [BUG] org-save-all-org-buffers reapplies startup visibility [9.5 (release_9.5 @ /usr/local/share/emacs/29.0.50/lisp/org/)] From: Mark Barton In-Reply-To: Date: Fri, 8 Oct 2021 15:30:21 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <082D5B9E-CD76-498A-A1C7-6A941CB8221B@gmail.com> References: <676d5553-1ce8-546b-7788-20273e1edbdb@ctpowe.net> <2eeccc8f-859b-182e-a447-39cd5f5a9d8e@karssen.org> To: "Lennart C. Karssen" , Juri Linkov X-Mailer: Apple Mail (2.3654.120.0.1.13) Received-SPF: pass client-ip=2607:f8b0:4864:20::82c; envelope-from=mbarton98@gmail.com; helo=mail-qt1-x82c.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: orgmode 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=1633732286; 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=uPOl5Zf6tsIwRuD/f8ZM4Vk6cJ6wcwBL3dtOtdHyW/M=; b=fuqlav0QMXFsETTq8YqXbVWQBupyJo1xmytBMpdahlFc79FAZmMafEuZWQs0nT+YEwZU8Q +ueEDNBJ5imVTjm2v3Fey/FJjTiBcfSkuMxWvzd9FmNOFRIbrtEUmgoK8DfX8PB80TCzB2 xJKeejr0wFV41hPsJo0dNGFi/gH2V+aqEAc+BRkPr6c3+PD0QZOwDql34uMq39wrCePoJ8 R8Ix6Pb+s52Wjm69PXXlbHWN3j+eDN6a2W1UcR2z1BYI9ojiSQb5XBfq1+xiy6k7vJEFCH nDDwwqkEF0d4Cm9WyY07c6FpjzIZsdngmiAmj65z1EmDc7F8e0HONP7853Znxg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1633732286; a=rsa-sha256; cv=none; b=Oule1NJU3UenpdRRNEs4fhQa7NMIg91qjK0Lm4SiPhJzqmn6kTCePjQw3HDIp29xxJf4rS h9TkFnhrSFQ5RulHqc1WkT83rcM9Jg1h1m+fuxITszR/kSXGWi8Hy4z9HUeTw0oW2T6pEP MSaT4yHfDz7HISHTpJkpPTqqIRaJfT7+HQ1vJsipujbHsyCrzMo3Yt0Lhewdyb39ELzBY1 z8wLgGGaDjJ+YZZ157YDGxpaN0IKTrv03y3GpfFA5ptyZokEvagNBwx+/AE7wd8ZtjiYB+ vkHQUpqhcyd54Cms5lEshb8lJo4FY/BNq5iVAp34kPCifuIVDKfxETOSFBpE7g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=FzKAyAJ2; 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.51 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=FzKAyAJ2; 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: E6166341FB X-Spam-Score: -3.51 X-Migadu-Scanner: scn1.migadu.com X-TUID: 7lWAj6KLwyUb The debugger shows that pred gets set to org-mode rather than the = function to test for org mode. Debugger entered--returning value: org-mode (setq pred pred-fun) * (progn (setq pred pred-fun)) * (if (functionp pred-fun) (progn (setq pred pred-fun))) * (let ((pred-fun (and (functionp pred) (funcall pred)))) (if (functionp = pred-fun) (progn (setq pred pred-fun)))) * (closure (backup-extract-version-start t) (&optional arg pred) "Save = some modified file-visiting buffers. Asks us..." (interactive "P") (if = pred nil (setq pred save-some-buffers-default-predicate)) (let = ((pred-fun (and (functionp pred) (funcall pred)))) (if (functionp = pred-fun) (progn (setq pred pred-fun)))) (let* ((switched-buffer nil) = (save-some-buffers--switch-window-callback #'(lambda (buffer) (setq = switched-buffer buffer))) queried autosaved-buffers files-done = abbrevs-done) (unwind-protect (let ((wconfig = (current-window-configuration))) (unwind-protect (progn (let ... ...) = (setq files-done ...) (and save-abbrevs abbrevs-changed ...) (or queried = ... abbrevs-done ...)) (set-window-configuration wconfig))) (if = switched-buffer (progn (pop-to-buffer-same-window = switched-buffer))))))(t #) * apply((closure (backup-extract-version-start t) (&optional arg pred) = "Save some modified file-visiting buffers. Asks us..." (interactive = "P") (if pred nil (setq pred save-some-buffers-default-predicate)) (let = ((pred-fun (and (functionp pred) (funcall pred)))) (if (functionp = pred-fun) (progn (setq pred pred-fun)))) (let* ((switched-buffer nil) = (save-some-buffers--switch-window-callback #'(lambda (buffer) (setq = switched-buffer buffer))) queried autosaved-buffers files-done = abbrevs-done) (unwind-protect (let ((wconfig = (current-window-configuration))) (unwind-protect (progn (let ... ...) = (setq files-done ...) (and save-abbrevs abbrevs-changed ...) (or queried = ... abbrevs-done ...)) (set-window-configuration wconfig))) (if = switched-buffer (progn (pop-to-buffer-same-window switched-buffer)))))) = (t #)) * save-some-buffers(t #) org-save-all-org-buffers() funcall-interactively(org-save-all-org-buffers) command-execute(org-save-all-org-buffers record) execute-extended-command(nil "org-save-all-org-buffers" nil) funcall-interactively(execute-extended-command nil = "org-save-all-org-buffers" nil) command-execute(execute-extended-command) > On Oct 8, 2021, at 3:00 PM, Mark Barton wrote: >=20 > I can confirm this too. >=20 > (defun org-save-all-org-buffers () > "Save all Org buffers without user confirmation." > (interactive) > (message "Saving all Org buffers...") > (save-some-buffers t (lambda () (derived-mode-p 'org-mode))) > (when (featurep 'org-id) (org-id-locations-save)) > (message "Saving all Org buffers... done")) >=20 > If I comment out this change to the function save-some-buffers, then = org-save-all-org-buffers works again. >=20 > a9ad3d477441feefa3bf6107d58281cb64e0e78a > Author: Juri Linkov > AuthorDate: Fri Aug 13 10:10:29 2021 +0300 > Commit: Juri Linkov > CommitDate: Fri Aug 13 10:10:29 2021 +0300 >=20 > Parent: c4d34d24e3 CC Mode: Enhance C++ Mode raw strings to = multi-line strings for any language > Merged: emacs-27 feature/native-comp > Contained: master > Follows: emacs-27.1 (8875) >=20 > Add save-some-buffers-root to save-some-buffers-default-predicate = (bug#46374) >=20 > * lisp/files.el (save-some-buffers-default-predicate): Add choice > 'save-some-buffers-root'. > (save-some-buffers-root): New predicate function. > (save-some-buffers): Check if 'pred' returns a lexically-bound lambda, > then use it as 'pred'. >=20 >=20 > (defun save-some-buffers (&optional arg pred) > "Save some modified file-visiting buffers. Asks user about each = one. > You can answer `y' or SPC to save, `n' or DEL not to save, `C-r' > @@ -5758,6 +5772,11 @@ save-some-buffers > (interactive "P") > (unless pred > (setq pred save-some-buffers-default-predicate)) > + ;; Allow `pred' to be a function that returns a predicate > + ;; with lexical bindings in its original environment (bug#46374). > + (let ((pred-fun (and (functionp pred) (funcall pred)))) > + (when (functionp pred-fun) > + (setq pred pred-fun))) > (let* ((switched-buffer nil) > (save-some-buffers--switch-window-callback > (lambda (buffer) >=20 > I think it has to do with how org-save-all-org-buffers sets the pred = argument with: > (lambda () (derived-mode-p 'org-mode)) >=20 >> On Oct 8, 2021, at 4:55 AM, Lennart C. Karssen = wrote: >>=20 >> Dear list, >>=20 >> Confirmed. >>=20 >> This is to confirm Micheal's overservation that >> `org-save-all-org-buffers' doesn't save any Org buffers any more in >> Emacs 28, compiled a few days ago from commit d86b2e59c and Org 9.5 = from >> Elpa, running on Ubuntu Linux 21.04. >> I can't say if this is because of the upgrade of Org 9.5 or the newly >> compiled Emacs as I did both at the same time. >> Command used for testing: >> emacs -Q -L ~/.emacs.d/elpa/org-9.5/ /tmp/test.org >>=20 >>=20 >> Best regards, >>=20 >> Lennart Karssen. >>=20 >> On 05-10-2021 21:51, Michael Powe wrote: >>>=20 >>> forgot to hit 'reply all.' >>>=20 >>>=20 >>> -------- Forwarded Message -------- >>> Subject: Re: [BUG] org-save-all-org-buffers reapplies startup >>> visibility [9.5 (release_9.5 @ = /usr/local/share/emacs/29.0.50/lisp/org/)] >>> Date: Tue, 5 Oct 2021 15:47:42 -0400 >>> From: Michael Powe >>> To: Bhavin Gandhi >>>=20 >>>=20 >>>=20 >>> Hello, >>>=20 >>> I hesitate to reply, but here's a report from Windows 10. >>>=20 >>> works as expected >>> C:\Emacs\emacs-28\bin\runemacs.exe -Q -L >>> C:\Users\micha\AppData\Roaming\.emacs.d\elpa\org-9.5\ 'G:\My >>> Drive\org\daily.org' >>> GNU Emacs 28.0.50 (build 1, x86_64-w64-mingw32) of 2021-08-11 >>> Org mode version 9.5 (9.5-g0a86ad @ >>> c:/Users/micha/AppData/Roaming/.emacs.d/elpa/org-9.5/) >>>=20 >>> Now for the bad news. >>>=20 >>> does not save files at all! >>> C:\Emacs\emacs29\bin\runemacs.exe -Q 'G:\My Drive\org\daily.org' >>> GNU Emacs 29.0.50 (build 1, x86_64-w64-mingw32) of 2021-10-02 >>> Org mode version 9.5 (release_9.5 @ >>> c:/Emacs/emacs29/share/emacs/29.0.50/lisp/org/) >>>=20 >>> Upon invoking the save, contents of the file shift to the left, then >>> shift back; and that's it. >>>=20 >>> HTH. >>>=20 >>> mp >>>=20 >>> Bhavin Gandhi wrote on 10/5/2021 13:53: >>>> Hello Marcel, >>>>=20 >>>> On Tue, 5 Oct 2021 at 19:14, Marcel van der Boom = wrote: >>>>> [=E2=80=A6] >>>>> - emacs -Q test.org >>>>> - make sure the outline is unfolded >>>>> - make a change so test.org is 'dirty' >>>>> - M-x org-save-all-org-buffers >>>>>=20 >>>>> Observed behaviour: >>>>> The outline in test.org will collapse and only show 'Header one' >>>>>=20 >>>>> Expected behaviour: >>>>> Outline state does not change on calling `org-save-all-buffers` >>>>>=20 >>>> I tried to follow the above steps with Emacs 27.1, and Org mode = latest >>>> main branch as well as the release_9.5 tag. The only different step = I >>>> took was this: >>>>=20 >>>> emacs -Q -L ~/src/org-mode/lisp/ ~/test.org >>>>=20 >>>> When I modify the test.org and call org-save-all-org-buffers, all = the >>>> headings remain unfolded. I tried to switch to a different buffer = and >>>> called the function, but still it remained in overview state. Maybe >>>> someone with the latest Emacs build from master can try to = reproduce? >>>>=20 >>>=20 >>> --=20 >>> Sent from Postbox >>=20 >> --=20 >> *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* >> L.C. Karssen >> 's-Hertogenbosch >> The Netherlands >>=20 >> lennart@karssen.org >> http://blog.karssen.org >> GPG key ID: A88F554A >> -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- >>=20 >=20