From: Ihor Radchenko <yantar92@gmail.com>
To: Al Haji-Ali <abdo.haji.ali@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [BUG] org-agenda-prepare-buffers does not save restrictions
Date: Sat, 09 Jul 2022 11:57:43 +0800 [thread overview]
Message-ID: <874jzr9buw.fsf@localhost> (raw)
In-Reply-To: <x1o5yk8rl94.fsf@lxstaff02.mail-host-address-is-not-set>
Al Haji-Ali <abdo.haji.ali@gmail.com> writes:
> On 08/07/2022, Ihor Radchenko wrote:
>> Could you please create a proper patch
>
> See attached. I made a further change to use `with-current-buffer` instead of
> `set-buffer+save-excursion`.
Thanks!
Two more comments.
> * lisp/org.el (org-agenda-prepare-buffers): Call
> `save-restriction'/`save-excursion' for every buffer in the agenda
> instead of just once for the current buffer. Use `with-current-buffer'
> instead of `set-buffer'/`save-excursion'.
Please use double space between sentences.
> + (save-excursion
> + (save-restriction
> + (widen)
A more concise way is
(org-with-wide-buffer ...)
Best,
Ihor
next prev parent reply other threads:[~2022-07-09 3:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-07 11:25 [BUG] org-agenda-prepare-buffers does not save restrictions Al Haji-Ali
2022-07-08 4:21 ` Ihor Radchenko
2022-07-08 9:45 ` Al Haji-Ali
2022-07-09 3:57 ` Ihor Radchenko [this message]
2022-07-10 8:58 ` Al Haji-Ali
2022-07-10 10:06 ` Ihor Radchenko
Reply instructions:
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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874jzr9buw.fsf@localhost \
--to=yantar92@gmail.com \
--cc=abdo.haji.ali@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* 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
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
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).