From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id EKvYAtAH5WTExwAASxT56A (envelope-from ) for ; Tue, 22 Aug 2023 21:09:04 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id aLn1AdAH5WTGegAAG6o9tA (envelope-from ) for ; Tue, 22 Aug 2023 21:09:04 +0200 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 4C23F6B139 for ; Tue, 22 Aug 2023 21:09:02 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=C0Fa04OY; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=key1; d=yhetil.org; t=1692731343; a=rsa-sha256; cv=none; b=N3hkLANFAbQluL5f2sdbMLcUzPNpO8s+ELeGFL5CkYkaL53gJKD0zy4TUhw4Mtzz5GF1fT rLXkR0n8E9uE9qUeGqI8JYhMlhACtK/y7KyDy64Bktm3Z2dZcPabHpV8efFu3kcnSl96Ej TKEj/SeVNi21lFJ+mUTc5+dZp2cYf2FNTAF6dw+jJd8xkxsbV3mnwvtgzAXRwutANgVOP7 gNYuKctVoBtz9AVo559y9Gcw2tERxZQx7IJ2yAFQzJcotTk5O/fZMpUXeMvlteOsBUzyaD ImOE597ZL7GNXTfK9Y7eXsROaF3gWy1TR5y3zQZQB6kHIXNtAGw1DjYxECdH9w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=C0Fa04OY; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1692731343; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=McVoVmC2/HO+AtYMxTYMKA4nXqlqP5ghud3MlJSy+d0=; b=WURMFaqTMbivNIHXOnFLm/hdGHpoqTbvMKmZS7joImyZGuxFbJ2f6L7ynjwbBwp1BOQHTm RO5S6f8U8lJhKDV3o4CD/C+rsAATFWS9gz4JNtcX7DJaJQ5+Q/ne0QNgTk/hL2LH5W4hoY A3p74SsbwVFIi79wGnSINwygghSnpnu26pXxXoruMQu8/nVIJ0jL7INlp4zrvYWK8zcXSV btDGBmwwiI2RCIzoTqxftEpjCzHxahyoI1RDhkIFc2VFYluBwFVu+t7rOCqjjHZp3S7ns9 TeImWYwBoWLRNvqwfMMG/dvj7HJmMgsu+ivGGfVNCPgFrNk/dWrrRpK6PqXUOw== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qYWjm-0007KH-SD; Tue, 22 Aug 2023 15:08:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qYWjl-0007GA-Sn for emacs-orgmode@gnu.org; Tue, 22 Aug 2023 15:08:21 -0400 Received: from mail-oi1-x233.google.com ([2607:f8b0:4864:20::233]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qYWjh-0006dS-2l for emacs-orgmode@gnu.org; Tue, 22 Aug 2023 15:08:20 -0400 Received: by mail-oi1-x233.google.com with SMTP id 5614622812f47-3a7d7e5fb03so3610852b6e.3 for ; Tue, 22 Aug 2023 12:08:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692731295; x=1693336095; h=mime-version:message-id:user-agent:date:subject:to:from:from:to:cc :subject:date:message-id:reply-to; bh=McVoVmC2/HO+AtYMxTYMKA4nXqlqP5ghud3MlJSy+d0=; b=C0Fa04OY/SkijDyXcK2Q6On22K935omYeQE2vMA6RQYUxysnrLoL8Jtq2Qd6COKxng yueLblkfy1wLd6MuC/dffpazk81rRT6BmIJDRqKz9JRd9mUvjeksqzH0BHJZMUIoEUb3 onHgO3kI5rG6nQisTBu074S9njReNysNgJhy5ta6z2joDhC9AeMX3F8Slz5CerNk+Cc8 XCC8G+RXExWSRGUpswG7X3KH3Uz7/1+nV3AJ3Kwj5GB9n7yNKLnG4TbFoovjZRXJNsjp 4/Q/bP4NLsUbY6BPSxjaZPa0/ZPgmk+2P+Du0d+7h1pClP2YD2w7M7fIYjqs5bTLo/Ls NBAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692731295; x=1693336095; h=mime-version:message-id:user-agent:date:subject:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=McVoVmC2/HO+AtYMxTYMKA4nXqlqP5ghud3MlJSy+d0=; b=LNRsS/TNJOihPMg2EU3zZ5XZaFVfy3wF1chQIVA7Xhn/BhzrGxH8Y0numiplYeOfiL gEOi0+B4LSIzXMrx8dqnXJLnb1U0X/84VFhlP4gMWTuhWifUfID87+k3kWsyBRRLmiF6 4ofZriCCGCazCZzXdb8vjURYuiSsH4vPOX2S7nZAMW4RodPazWWt5GlY1VW86S6qymEu BcOu84z1ioZ/68+03k6UDXd2GG4wjeeY9Z4HAhUIlVGDv+SH5jRc+tg9/2G/WWooxrXI s3ew2NTsFis34ALdQrd9B2wrVrnGDB/IILobuIgSKSg0Rm3UrO87retumizxCAHRdpmi KCTQ== X-Gm-Message-State: AOJu0YzaSfY69bRlT3DU/H3O+WozB1A2hwoRPFBCRITeZwfnND64HO4P rZ70tgBQEfhZnMmHvGwAjuu60VpkTGQ= X-Google-Smtp-Source: AGHT+IEeoPsYbitmXi/+jG4icLOD/26f4dFF6N4Q17eBmOS5eV/gAacI2RdWJmhS2dzWI4nI/l/4Fg== X-Received: by 2002:a05:6808:138b:b0:3a7:5cc1:69b0 with SMTP id c11-20020a056808138b00b003a75cc169b0mr16524508oiw.7.1692731294779; Tue, 22 Aug 2023 12:08:14 -0700 (PDT) Received: from damien ([70.241.102.222]) by smtp.gmail.com with ESMTPSA id l10-20020a056808020a00b003a7750aae7dsm5129528oie.0.2023.08.22.12.08.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Aug 2023 12:08:14 -0700 (PDT) From: spookygostee@gmail.com To: emacs-orgmode@gnu.org Subject: [BUG] Bulk scattering breaks when logging rescheduling [9.7 (9.7-??-6eb773053 @ /home/shortcut/.emacs.d/.local/straight/build-28.1/org/)] Date: Tue, 22 Aug 2023 14:05:10 -0500 User-agent: mu4e 1.10.4; emacs 28.1 Message-ID: <87a5ui6gkj.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2607:f8b0:4864:20::233; envelope-from=spookygostee@gmail.com; helo=mail-oi1-x233.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_FROM=0.001, HTML_MESSAGE=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.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx0.migadu.com X-Spam-Score: -9.57 X-Migadu-Queue-Id: 4C23F6B139 X-Migadu-Spam-Score: -9.57 X-TUID: D8nCvdIRrJ6U --=-=-= Content-Type: multipart/alternative; boundary="==-=-=" --==-=-= Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Bulk scattering agenda items when the user wants to log reschedules does no= t work.=20 Steps to reproduce:=20 1. Set `org-log-reschedule' to the value `"time"' Alternatively, customize =E2=80=9COrg Log Reschedule=E2=80=9D to =E2=80= =9CRecord timestamp with note=E2=80=9D. 2. Add an org mode file with the following contents to the agenda file list =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80 =E2=94=82 Testing scatter 1 =E2=94=82 SCHEDULED: <2023-08-22 Tue> =E2=94=82 Testing scatter 2 =E2=94=82 SCHEDULED: <2023-08-22 Tue> =E2=94=82 Testing scatter 3 =E2=94=82 SCHEDULED: <2023-08-22 Tue> =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80 (As in previous reports, I can=E2=80=99t 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 reschedu= led, has a note, and all headings remain marked. Emacs will also /not/ prom= pt you for notes for the other headings or reschedule them- the process ter= minates here. This issue does not occur when `org-log-reschedule' is set to= its default value: =E2=80=9CNo logging=E2=80=9D. The expected behavior is that either Emacs will prompt me for more notes fo= r the remaining headings, or at the very least will scatter them. I have written and attached a rudimentary patch which =E2=80=9Csolves=E2=80= =9D this problem by storing `org-log-reschedule'=E2=80=99s value, scatterin= g with =E2=80=9CNo logging=E2=80=9D 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=E2=80=99s 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/ --==-=-= Content-Type: text/html; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable

Bulk scattering agenda items when the user wants to log reschedules does no= t work.=20

Steps to reproduce:=20

  1. Set org-log-reschedule to the value "time"

    Alternatively, customize =E2=80=9COrg Log Reschedule=E2=80=9D to =E2=80=9CR= ecord timestamp with note=E2=80=9D.

  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=E2=80=99t paste these as actual headings. Th= eir structure is irrelevant.)

  3. Mark all of previous headings for bulk action in the agenda
  4. Bulk scatter the marked headings (B S, by def= ault)
  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<= /code> has been rescheduled, has a note, and all headings remain marked. Em= acs will also not prompt you for notes for the other headings or res= chedule them- the process terminates here. This issue does not occur when <= code style=3D"font-size:11pt;font-family:SFMono-Regular, Menlo, Monaco, Con= solas, "Liberation Mono", "Courier New", monospace;;bac= kground:#f9f9f9;">org-log-reschedule is set to its default value: = =E2=80=9CNo logging=E2=80=9D.

The expected behavior is that either Emacs will prompt me for more notes fo= r the remaining headings, or at the very least will scatter them.

I have written and attached a rudimentary patch which =E2=80=9Csolves=E2=80= =9D this problem by storing org-log-reschedule=E2= =80=99s value, scattering with =E2=80=9CNo logging=E2=80=9D set, and then r= estoring it. I think it is up for debate whether or not the logging behavio= r in the case of a bulk scatter should respect the user=E2=80=99s settings,= or prompt just once at the beginning for a note (copying it to all subsequ= ent scattered headlines), or if it should be ignored entirely (as in my pat= ch).

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.emac= s.d/.local/straight/build-28.1/org/)

-shortcut

--==-=-=-- --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-On-main-fixing-bulk-scattering.patch 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 --=-=-=--