* [BUG] Bulk scattering breaks when logging rescheduling [9.7 (9.7-??-6eb773053 @ /home/shortcut/.emacs.d/.local/straight/build-28.1/org/)]
@ 2023-08-22 19:05 spookygostee
2023-08-23 9:01 ` Ihor Radchenko
0 siblings, 1 reply; 2+ messages in thread
From: spookygostee @ 2023-08-22 19:05 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1.1: Type: text/plain, Size: 2086 bytes --]
Bulk scattering agenda items when the user wants to log reschedules does not work.
Steps to reproduce:
1. Set `org-log-reschedule' to the value `"time"'
Alternatively, customize “Org Log Reschedule” to “Record timestamp with note”.
2. Add an org mode file with the following contents to the agenda file list
┌────
│ Testing scatter 1
│ SCHEDULED: <2023-08-22 Tue>
│ Testing scatter 2
│ SCHEDULED: <2023-08-22 Tue>
│ Testing scatter 3
│ SCHEDULED: <2023-08-22 Tue>
└────
(As in previous reports, I can’t paste these as actual headings. Their structure is irrelevant.)
3. Mark all of previous headings for bulk action in the agenda
4. Bulk scatter the marked headings (`B S', by default)
5. Fill out the prompted note with anything and hit `C-c C-c' to finish
You will note Emacs reports that only `Testing scatter 1' has been rescheduled, has a note, and all headings remain marked. Emacs will also /not/ prompt you for notes for the other headings or reschedule them- the process terminates here. This issue does not occur when `org-log-reschedule' is set to its default value: “No logging”.
The expected behavior is that either Emacs will prompt me for more notes for the remaining headings, or at the very least will scatter them.
I have written and attached a rudimentary patch which “solves” this problem by storing `org-log-reschedule'’s value, scattering with “No logging” set, and then restoring it. I think it is up for debate whether or not the logging behavior in the case of a bulk scatter should respect the user’s settings, or prompt just once at the beginning for a note (copying it to all subsequent scattered headlines), or if it should be ignored entirely (as in my patch).
Emacs : GNU Emacs 28.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.20, cairo version 1.16.0)
of 2022-05-31
Package: Org mode version 9.7 (9.7-??-6eb773053 @ /home/shortcut/.emacs.d/.local/straight/build-28.1/org/)
-/shortcut/
[-- Attachment #1.2: Type: text/html, Size: 7051 bytes --]
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-On-main-fixing-bulk-scattering.patch --]
[-- Type: text/x-diff, Size: 837 bytes --]
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index bafd8b7f8..609d59a4c 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -11201,8 +11201,12 @@ The prefix arg is passed through to the command if possible."
(let* ((date (calendar-gregorian-from-absolute
(+ (org-today) distance)))
(time (org-encode-time
- 0 0 0 (nth 1 date) (nth 0 date) (nth 2 date))))
- (org-agenda-schedule nil time))))))))
+ 0 0 0 (nth 1 date) (nth 0 date) (nth 2 date)))
+ (log-state org-log-reschedule))
+ (setq org-log-reschedule nil)
+ (org-agenda-schedule nil time)
+ (setq org-log-reschedule log-state)
+ )))))))
(?f
(setq cmd
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [BUG] Bulk scattering breaks when logging rescheduling [9.7 (9.7-??-6eb773053 @ /home/shortcut/.emacs.d/.local/straight/build-28.1/org/)]
2023-08-22 19:05 [BUG] Bulk scattering breaks when logging rescheduling [9.7 (9.7-??-6eb773053 @ /home/shortcut/.emacs.d/.local/straight/build-28.1/org/)] spookygostee
@ 2023-08-23 9:01 ` Ihor Radchenko
0 siblings, 0 replies; 2+ messages in thread
From: Ihor Radchenko @ 2023-08-23 9:01 UTC (permalink / raw)
To: spookygostee; +Cc: emacs-orgmode
spookygostee@gmail.com writes:
> Bulk scattering agenda items when the user wants to log reschedules does not work.
>
> Steps to reproduce:
> 1. Set `org-log-reschedule' to the value `"time"'
Should value 'note.
Confirmed.
The proper fix is re-writing note taking system to use recursive edit.
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-08-23 9:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-22 19:05 [BUG] Bulk scattering breaks when logging rescheduling [9.7 (9.7-??-6eb773053 @ /home/shortcut/.emacs.d/.local/straight/build-28.1/org/)] spookygostee
2023-08-23 9:01 ` Ihor Radchenko
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).