From: Mark Barton <firstname.lastname@example.org>
To: "Lennart C. Karssen" <email@example.com>,
Juri Linkov <firstname.lastname@example.org>
Cc: orgmode <email@example.com>
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: Fri, 8 Oct 2021 15:00:25 -0700 [thread overview]
Message-ID: <C5A43881-2EB1-4DF8-85E7-E7E83C1C9EB4@gmail.com> (raw)
I can confirm this too.
(defun org-save-all-org-buffers ()
"Save all Org buffers without user confirmation."
(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.
Author: Juri Linkov <firstname.lastname@example.org>
AuthorDate: Fri Aug 13 10:10:29 2021 +0300
Commit: Juri Linkov <email@example.com>
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
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): 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
(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)
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 <firstname.lastname@example.org> wrote:
> Dear list,
> 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
> Best regards,
> Lennart Karssen.
> On 05-10-2021 21:51, Michael Powe wrote:
>> forgot to hit 'reply all.'
>> -------- 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 <email@example.com>
>> To: Bhavin Gandhi <firstname.lastname@example.org>
>> I hesitate to reply, but here's a report from Windows 10.
>> 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
>> GNU Emacs 28.0.50 (build 1, x86_64-w64-mingw32) of 2021-08-11
>> Org mode version 9.5 (9.5-g0a86ad @
>> Now for the bad news.
>> 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 @
>> Upon invoking the save, contents of the file shift to the left, then
>> shift back; and that's it.
>> Bhavin Gandhi wrote on 10/5/2021 13:53:
>>> Hello Marcel,
>>> On Tue, 5 Oct 2021 at 19:14, Marcel van der Boom <email@example.com> wrote:
>>>> - 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
>>>> Observed behaviour:
>>>> The outline in test.org will collapse and only show 'Header one'
>>>> Expected behaviour:
>>>> Outline state does not change on calling `org-save-all-buffers`
>>> 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:
>>> emacs -Q -L ~/src/org-mode/lisp/ ~/test.org
>>> 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?
>> Sent from Postbox <https://www.postbox-inc.com>
> L.C. Karssen
> The Netherlands
> GPG key ID: A88F554A
next prev parent reply other threads:[~2021-10-08 22:02 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <firstname.lastname@example.org>
2021-10-05 19:51 ` Fwd: [BUG] org-save-all-org-buffers reapplies startup visibility [9.5 (release_9.5 @ /usr/local/share/emacs/29.0.50/lisp/org/)] Michael Powe
2021-10-08 11:55 ` Lennart C. Karssen
2021-10-08 22:00 ` Mark Barton [this message]
2021-10-08 22:30 ` Mark Barton
2021-10-09 16:38 ` No Wayman
2021-10-09 18:43 ` Mark Barton
2021-10-05 13:14 Marcel van der Boom
2021-10-05 17:53 ` Bhavin Gandhi
2021-10-06 2:08 ` No Wayman
2021-10-09 19:33 ` Kyle Meyer
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).