From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id CHKnBuS/YGGFwQAAgWs5BA (envelope-from ) for ; Sat, 09 Oct 2021 00:02:12 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id iKleAeS/YGERNgAA1q6Kng (envelope-from ) for ; Fri, 08 Oct 2021 22:02:12 +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 4C53033A5E for ; Sat, 9 Oct 2021 00:02:11 +0200 (CEST) Received: from localhost ([::1]:46316 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYxwQ-0005zv-4D for larch@yhetil.org; Fri, 08 Oct 2021 18:02:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48898) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYxus-0005y8-4Y for emacs-orgmode@gnu.org; Fri, 08 Oct 2021 18:00:38 -0400 Received: from mail-qk1-x72e.google.com ([2607:f8b0:4864:20::72e]:45782) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mYxuo-0001cW-FX for emacs-orgmode@gnu.org; Fri, 08 Oct 2021 18:00:32 -0400 Received: by mail-qk1-x72e.google.com with SMTP id q125so10898282qkd.12 for ; Fri, 08 Oct 2021 15:00:29 -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=0gEdMPC8tupPdRfuyCNQbdQgHtpX4PSFZ4DJ09geZfA=; b=G93CChNqcVC2uP3vtkpI8YOjBNLxiR1FM7Pz9MSy7HkiAOttdS/5s4i572XX7zQcgG FG7ma1CDJLQXtobrQ04+nN+9JD3kjikPPurEK8mEG4ujz2lSbH6sYdJJHnFSG5kNXbDx zjchNHrCoqgXNwfkMWMK7WjSjN7B4MRdxBuUfNzVsPGp+9Q3x2WwTaUgB+Qh8sKMt7FM Nv2tkksiNzCODYP46IexCoxdXhSZYn94ZMrcAGlksXYwLCyXSprWLWjPSK7oYlCm62DB KKbjQuWdQfuGAyFfJw/8JgFOL3JHLm3sUkgbJ0CE6VY7ku++vqX6nVRE0jYlSosVd1QB K7PQ== 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=0gEdMPC8tupPdRfuyCNQbdQgHtpX4PSFZ4DJ09geZfA=; b=SwuJN5Ac8Tl7+TJKSbWwtnkBUH0i/TC05SFDpGhwQw046U4Mp5ARQwNH7d+B/UTxE6 5Tss0NDsRI9T8OcBPK/XTi14e7KFCpRtn3M+gm87Dv+eopJ+TKe7Hx2aG0zZsOGuxDm3 uC2bXncuPMwrovvGpkI3XyhPMgwYFVZZ9zHU9n3FB92eLFWYuefMTM1oEe4fqD6WkjC9 vk26EzUyASGVcTqC9iUw5jTdc5f3xv0YMVihGb2w2g/ziwVejyJ7xRM8Xm67Q00kJQti ZV76xx20lgNaygRfpIcqwDyGNiOuAIsZPQdMlqyLDc6sr54eu7716a1HqTqfz0PTl+Ab jFnw== X-Gm-Message-State: AOAM531ozRuG2DP/ubCYCSPmGO4zGojQuHuKhA8htvmJejCiIWD9SoeQ SMDlgYoGqtnFfLZFGvaGRxwqn1XnHuw= X-Google-Smtp-Source: ABdhPJzqofxf2+Qfkt14kmnkuTaB9UfWKfQ9wXQFNvnse0O2f/DL//qrISzJmAmhZPXerkfHlxUxAg== X-Received: by 2002:a05:620a:424f:: with SMTP id w15mr5242880qko.258.1633730428279; Fri, 08 Oct 2021 15:00:28 -0700 (PDT) Received: from smtpclient.apple (bur-inet-pa-1.disney.com. [204.128.192.31]) by smtp.gmail.com with ESMTPSA id 130sm504846qkh.99.2021.10.08.15.00.26 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 08 Oct 2021 15:00:27 -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: <2eeccc8f-859b-182e-a447-39cd5f5a9d8e@karssen.org> Date: Fri, 8 Oct 2021 15:00:25 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: 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::72e; envelope-from=mbarton98@gmail.com; helo=mail-qk1-x72e.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=1633730531; 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=0gEdMPC8tupPdRfuyCNQbdQgHtpX4PSFZ4DJ09geZfA=; b=Pf8yGPSyALlRrTou+Tlf8EFdKOH4xpAPtFGisPFc0AaVo+a0qozfWO3xjpa8kAZXJCBJ21 kdQdhl3j+ZAH9Bu//mHnjOKDfGgCzt7Iy2ifo27mJpR0VchANt5jONepjTVzumVH6L8217 5+U3r9ggSW3I0j0LhwQMFcTOgRTcFJDV46ZlmSoKDGJdu0akG3rqWewnUohsgx2c+y5vWj FmyIzCmXvBBBqKu8kqqXnQ11YoViyVOJhZ2DL/ZxLHWund9UbzKl/d2PvizZLXAKihvAV9 G32oNpS8oO6mbo2Q7pJ0dDsQZCGWTMB5nyJz1SYA2BAK50FxwBU6bVPNnrXF8w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1633730531; a=rsa-sha256; cv=none; b=JRM420KLT+hUDEXHPP7SQ0uXkvXq4wIwBYD06cme8u49oLhhqkj02+6fvvhCCq7DSb0YZF 0gbsk7tieOlP8FhSj7xc52fRURlResSUVAPUAoBUhBJyQYBBcdt6Zi3FOn4h65qFTF+GXA LwRXIRZLJ5NAb4SiKeWTJo4Bv1nY/VDoueY+wgmW4vs3r3lzUC1NXVIMiZxHaks0SJny/U pq1UtFqAj89d4dRNWaTsi/2JoSbEOIv8/kKnP20vQbDrxOPW2Fvs18oCLnudi2yRLjuV8W WT4GPCKsJmTa1ZnQuwXUNP17LEs3r4BmHusYkMxn8nLHXMwefFDgUEZj+MJiqA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=G93CChNq; 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: -2.61 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=G93CChNq; 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: 4C53033A5E X-Spam-Score: -2.61 X-Migadu-Scanner: scn0.migadu.com X-TUID: SCyg00niLGLR I can confirm this too. (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")) If I comment out this change to the function save-some-buffers, then = org-save-all-org-buffers works again. 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 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) Add save-some-buffers-root to save-some-buffers-default-predicate = (bug#46374) * 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'. (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) I think it has to do with how org-save-all-org-buffers sets the pred = argument with: (lambda () (derived-mode-p 'org-mode)) > 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